Function at 0x4058df
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
push ebx
push esi
xor esi, esi
push edi
push esi
push esi
push esi
push 0x42a800
call dword [0x442234]
mov edi, eax
cmp edi, esi
mov dword [ebp - 0x20], edi
je 0x405b13
push 8
push edi
call dword [0x442250]
push 0xa
push edi
mov dword [ebp - 8], eax
call dword [0x442250]
push 0xc
push edi
mov dword [ebp - 0xc], eax
call dword [0x442250]
cmp eax, 8
mov dword [ebp - 0x10], eax
ja 0x405941
push 0x18
push edi
call dword [0x442250]
mov ebx, 0x100
jmp 0x405943
xor ebx, ebx
push edi
call dword [0x442294]
cmp eax, esi
mov dword [ebp - 4], eax
je 0x405af8
mov eax, dword [ebp - 8]
push esi
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x7c], eax
mov ax, word [ebp - 0x10]
mov word [ebp - 0x76], ax
lea eax, [ebp - 0x18]
push esi
push eax
lea eax, [ebp - 0x84]
push 1
push eax
push edi
mov dword [ebp - 0x84], 0x28
mov word [ebp - 0x78], 1
mov dword [ebp - 0x74], esi
mov dword [ebp - 0x70], esi
mov dword [ebp - 0x6c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], ebx
mov dword [ebp - 0x60], ebx
call dword [0x44228c]
cmp eax, esi
mov dword [ebp - 0x1c], eax
je 0x405b03
push eax
push dword [ebp - 4]
call dword [0x442124]
cmp eax, esi
je 0x405b03
cmp eax, 0xffffffff
je 0x405b03
push 0xcc0020
push esi
push esi
push edi
push dword [ebp - 0xc]
push dword [ebp - 8]
push esi
push esi
push dword [ebp - 4]
call dword [0x442290]
test eax, eax
je 0x405b03
cmp ebx, esi
je 0x405a00
lea eax, [ebp - 0x484]
push eax
push ebx
push esi
push dword [ebp - 4]
call dword [0x442178]
mov ebx, eax
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
imul edi, dword [ebp - 0xc]
imul edi, ecx
mov eax, ebx
push esi
shr edi, 3
shl eax, 2
mov dword [ebp - 8], eax
push 0x80
lea edx, [eax + edi + 0x36]
add eax, 0x36
push 2
mov dword [ebp - 0x26], eax
mov eax, dword [ebp - 0xc]
push esi
push esi
push 0x40000000
push dword [ebp + 8]
mov dword [ebp - 0x50], eax
mov ax, word [ebp - 0x10]
mov word [ebp - 0x30], 0x4d42
mov dword [ebp - 0x2e], edx
mov word [ebp - 0x2a], si
mov word [ebp - 0x28], si
mov dword [ebp - 0x58], 0x28
mov dword [ebp - 0x54], ecx
mov word [ebp - 0x4c], 1
mov word [ebp - 0x4a], ax
mov dword [ebp - 0x48], esi
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x38], ebx
mov dword [ebp - 0x34], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x405ae3
lea ecx, [ebp - 0x14]
push esi
push ecx
lea ecx, [ebp - 0x30]
push 0xe
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x58]
push 0x28
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp ebx, esi
je 0x405ac5
lea eax, [ebp - 0x14]
push esi
push eax
lea eax, [ebp - 0x484]
push dword [ebp - 8]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0x14]
push esi
push eax
push edi
push dword [ebp - 0x18]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop esi
push dword [ebp - 0x1c]
call dword [0x4421ac]
push dword [ebp - 4]
call dword [0x442110]
mov edi, dword [ebp - 0x20]
push edi
call dword [0x442110]
mov eax, esi
jmp 0x405b15
push edi
call dword [0x442110]
push dword [ebp - 4]
call dword [0x442110]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret