Function at 0x4059fe
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x551008]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0xa4], eax
mov ebx, ecx
push edi
cmp esi, 0xd
jae 0x405a2e
or eax, 0xffffffff
jmp 0x405c2e
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x4059e2
push eax
xor edi, edi
mov dword [ebp - 0x90], 0x4059f0
push ecx
mov edx, ebx
mov dword [ebp - 0x68], edi
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x6c], edi
call fcn.00426f3b
pop ecx
xor eax, eax
mov dword [ebp - 0x58], edi
pop ecx
inc eax
mov dword [ebp - 0x34], edi
sub esi, 5
mov dword [ebp - 0x30], eax
push 8
mov dword [ebp - 0x80], esi
mov ecx, edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x50], edi
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x2c], eax
pop esi
movzx eax, byte [ebx + esi + 4]
shld edi, ecx, 8
cdq
shl ecx, 8
add ecx, eax
adc edi, edx
sub esi, 1
jne 0x405a81
sub dword [ebp - 0x80], 8
lea eax, [ebx + 0xd]
push ecx
mov dword [ebp - 0x84], ecx
mov dword [ebp - 0x8c], ecx
mov dword [ebp - 0x88], eax
call fcn.004e3322
pop ecx
mov ebx, eax
push esi
pop edi
test ebx, ebx
je 0x405ad1
push dword [ebp - 0x84]
push edi
push ebx
call fcn.004e5020
add esp, 0xc
jmp 0x405ad3
mov ebx, edi
lea eax, [ebp - 0x84]
mov dword [ebp - 0x84], edi
push eax
push ecx
lea eax, [ebp - 0x80]
mov edx, ebx
push eax
push dword [ebp - 0x88]
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x7c]
call fcn.00426ddd
add esp, 0x14
mov esi, eax
lea eax, [ebp - 0x94]
push dword [ebp - 0x6c]
push eax
call dword [ebp - 0x90]
push dword [ebp - 0x68]
lea eax, [ebp - 0x94]
mov dword [ebp - 0x6c], edi
push eax
call dword [ebp - 0x90]
add esp, 0x10
mov dword [ebp - 0x68], edi
test esi, esi
je 0x405b36
or edi, 0xffffffff
jmp 0x405c21
mov eax, dword [ebx]
lea esi, [ebx + 4]
mov ecx, dword [esi]
push 4
pop edx
add esi, edx
mov dword [ebp - 0xa0], ecx
push eax
mov dword [ebp - 0x80], eax
mov ecx, dword [esi]
add esi, edx
mov dword [ebp - 0x9c], ecx
mov ecx, dword [esi]
add esi, edx
mov dword [ebp - 0x84], ecx
mov ecx, dword [esi]
add esi, edx
mov dword [ebp - 0x8c], ecx
call fcn.004e3322
mov dword [ebp - 0x88], eax
pop ecx
test eax, eax
je 0x405b8f
push dword [ebp - 0x80]
push edi
push eax
call fcn.004e5020
mov eax, dword [ebp - 0x88]
add esp, 0xc
jmp 0x405b97
mov eax, edi
mov dword [ebp - 0x88], edi
push dword [ebp - 0x80]
mov edx, dword [ebp - 0x9c]
mov ecx, dword [ebp - 0xa0]
push eax
mov eax, dword [ebp - 0x84]
push dword [ebp - 0x8c]
add eax, edx
add eax, ecx
add eax, esi
push eax
push dword [ebp - 0x84]
lea eax, [edx + ecx]
add eax, esi
push eax
push edx
lea eax, [ecx + esi]
mov edx, ecx
push eax
mov ecx, esi
call fcn.00426fad
mov esi, dword [ebp - 0x88]
add esp, 0x20
test eax, eax
je 0x405be6
xor edi, edi
inc edi
jmp 0x405c16
push edi
lea eax, [ebp - 0x98]
mov dword [ebp - 0x98], edi
push eax
push dword [ebp - 0x80]
push esi
push dword [ebp - 0xa4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405c13
mov eax, dword [ebp - 0x80]
cmp dword [ebp - 0x98], eax
je 0x405c16
or edi, 0xffffffff
test esi, esi
je 0x405c21
push esi
call fcn.004e32ed
pop ecx
test ebx, ebx
je 0x405c2c
push ebx
call fcn.004e32ed
pop ecx
mov eax, edi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e302f
leave
ret