Function at 0x4072e0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x268
mov eax, dword [0x42f040]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
mov ebx, ecx
push esi
mov esi, dword [ebp + 0xc]
push edi
cmp dword [ebx + 8], 0xffffffff
mov edi, dword [ebp + 8]
mov dword [ebp - 0x258], ebx
mov dword [ebp - 0x264], edi
je 0x4075bf
test esi, esi
js 0x4075bf
mov ecx, dword [ebx + 0x2a4]
mov eax, 0x67b23a55
sub ecx, dword [ebx + 0x2a0]
imul ecx
sar edx, 7
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jge 0x4075bf
cmp dword [edi + 0x108], 0
jbe 0x4075aa
mov ecx, dword [ebx + 0x2a0]
mov eax, dword [edi + 0x104]
imul edx, esi, 0x13c
mov dword [ebp - 0x260], edx
cmp eax, dword [edx + ecx + 0x108]
ja 0x4075bf
cmp dword [ebp + 0x10], 0
je 0x4074bf
lea eax, [edi + 4]
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.00415abf
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.0041600b
lea ebx, [ebp - 0x114]
add esp, 8
lea ecx, [ebx + 1]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x4073b2
sub ebx, ecx
test ebx, ebx
jle 0x40743a
cmp byte [ebp - 0x114], 0x20
je 0x4073d6
cmp byte [ebp + ebx - 0x115], 0x20
jne 0x40743a
lea esi, [ebx + 1]
push esi
call fcn.0040dd96
add esp, 4
mov dword [ebp - 0x268], eax
lea ecx, [ebp - 0x114]
mov edi, eax
push ecx
push esi
push eax
call fcn.00415abf
mov edx, edi
add esp, 0xc
cmp byte [edx], 0x20
jne 0x407408
inc edi
cmp byte [edi], 0x20
je 0x407402
lea eax, [edx - 1]
add eax, ebx
cmp byte [eax], 0x20
jne 0x407418
dec eax
cmp byte [eax], 0x20
je 0x407412
lea ecx, [ebp - 0x114]
mov byte [eax + 1], 0
sub ecx, edi
mov al, byte [edi]
lea edi, [edi + 1]
mov byte [ecx + edi - 1], al
test al, al
jne 0x407424
push edx
call fcn.0040db91
add esp, 4
mov ebx, dword [ebp - 0x258]
lea eax, [ebp - 0x114]
push eax
lea eax, [ebp - 0x254]
mov ecx, 0x4f
lea edi, [ebp - 0x254]
mov esi, dword [ebx + 0x2a0]
add esi, dword [ebp - 0x260]
push pe_nt_image_headers32
rep movsd dword es:[edi], dword [esi]
push eax
call fcn.00415abf
mov edx, dword [ebp - 0x264]
lea esi, [ebp - 0x254]
mov edi, dword [ebx + 0x2a0]
add esp, 0xc
mov ecx, 0x4f
mov eax, dword [edx + 0x104]
mov dword [ebp - 0x154], eax
mov eax, dword [edx + 0x108]
mov dword [ebp - 0x150], eax
mov eax, dword [edx + 0x114]
mov edx, dword [ebp - 0x260]
add edi, edx
mov dword [ebp - 0x144], eax
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp - 0x264]
mov ecx, dword [ebx + 8]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ecx, 0xffffffff
je 0x407508
mov eax, dword [ebx + 0x2a0]
push 0
mov dword [ebp - 0x258], 0
mov eax, dword [eax + edx + 0x10c]
lea edx, [ebp - 0x258]
push edx
push eax
push ecx
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
jne 0x407508
call esi
mov eax, dword [ebx + 8]
cmp eax, 0xffffffff
je 0x407536
push 0
lea ecx, [ebp - 0x258]
mov dword [ebp - 0x258], 0
push ecx
push dword [edi + 0x104]
push dword [edi + 0x140]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebx + 8]
mov edi, dword [ebp - 0x260]
cmp ecx, 0xffffffff
je 0x40757a
mov eax, dword [ebx + 0x114]
lea edx, [ebp - 0x258]
push 0
add eax, edi
mov dword [ebp - 0x258], 0
push edx
push eax
push ecx
mov dword [ebp - 0x25c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x25c], eax
cmp eax, 0xffffffff
jne 0x40757a
call esi
mov ecx, dword [ebx + 8]
cmp ecx, 0xffffffff
je 0x4075aa
push 0
lea eax, [ebp - 0x258]
mov dword [ebp - 0x258], 0
push eax
mov eax, dword [ebx + 0x2a0]
push 0x13c
add eax, edi
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov al, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0040d81c
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp - 8]
xor al, al
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d81c
mov esp, ebp
pop ebp
ret 0xc