Function at 0x478390
Capabilities:
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x5e7800
mov eax, dword fs:[0]
push eax
sub esp, 0x2c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x40]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x2678]
lea eax, [eax + eax*4]
lea ecx, [eax*8 + 0x2678]
lea ebp, [edi + 0x2418]
xor ebx, ebx
mov eax, ebp
mov dword [esp + 0x18], ecx
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
lea edx, [eax + 2]
jmp 0x4783f0
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4783f0
sub eax, edx
sar eax, 1
push eax
push ebp
lea esi, [esp + 0x2c]
call fcn.00402770
mov dword [esp + 0x48], ebx
mov edx, dword [esp + 0x18]
push ebx
push edx
mov eax, esi
push eax
call fcn.00439990
add esp, 0xc
test al, al
sete byte [esp + 0x17]
or esi, 0xffffffff
mov dword [esp + 0x48], esi
cmp dword [esp + 0x3c], 8
jb 0x478441
mov ecx, dword [esp + 0x28]
push ecx
call fcn.0059b877
add esp, 4
cmp byte [esp + 0x17], 0
jne 0x4784ea
mov dword [esp + 0x18], esi
mov dword [esp + 0x48], 1
mov eax, ebp
mov dword [esp + 0x3c], 7
mov dword [esp + 0x38], ebx
mov word [esp + 0x28], bx
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x478470
sub eax, edx
sar eax, 1
push eax
push ebp
lea esi, [esp + 0x2c]
call fcn.00402770
cmp dword [esp + 0x3c], 8
mov eax, dword [esp + 0x28]
jae 0x478499
lea eax, [esp + 0x28]
push ebx
push 0x80
push 3
push ebx
push 3
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
setne al
test al, al
sete byte [esp + 0x17]
cmp dword [esp + 0x3c], 8
mov dword [esp + 0x18], ebx
jb 0x4784d7
mov edx, dword [esp + 0x28]
push edx
call fcn.0059b877
add esp, 4
cmp byte [esp + 0x17], 0
je 0x478500
cmp ebx, 0xffffffff
je 0x4784ea
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret
lea eax, [edi + 8]
test eax, eax
je 0x4784de
cmp ebx, 0xffffffff
je 0x4784ea
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x2678
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4784de
cmp dword [esp + 0x1c], 0x2678
jne 0x4784de
mov eax, dword [edi + 0x2690]
test eax, eax
je 0x47854b
push eax
call fcn.0059b877
add esp, 4
mov dword [edi + 0x2690], 0
mov eax, dword [edi + 0x2678]
xor ecx, ecx
mov edx, 0x28
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0059b872
xor ebp, ebp
add esp, 4
cmp dword [edi + 0x2678], ebp
mov dword [edi + 0x2690], eax
jbe 0x4785d6
mov dword [esp + 0x18], ebp
mov edi, edi
mov esi, dword [edi + 0x2690]
add esi, dword [esp + 0x18]
push ebp
call fcn.004782b0
mov eax, dword [edi + 0x2690]
add eax, dword [esp + 0x18]
je 0x4784e3
push 0
lea ecx, [esp + 0x24]
push ecx
mov esi, 0x28
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4784e3
cmp dword [esp + 0x20], esi
jne 0x4784e3
add dword [esp + 0x18], esi
add ebp, 1
cmp ebp, dword [edi + 0x2678]
jb 0x478580
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov ecx, dword [esp + 0x40]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x38
ret