Function at 0x407a80
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
movzx eax, word [0x450060]
movzx edx, word [0x450062]
mov dword [0x4506c0], 0xe5c55aa
mov byte [0x4506c5], 0
lea edi, [esp + 0x2c]
shl eax, 0x10
or eax, edx
add eax, 1
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x54]
mov byte [0x4506c4], al
xor eax, eax
mov word [0x4506c6], ax
mov eax, dword [0x4565a4]
mov dword [0x4506c8], eax
movzx eax, word [0x4565a8]
mov word [0x4506cc], ax
movzx eax, word [0x4565b0]
mov word [0x4506ce], ax
mov eax, dword [0x4565cc]
mov dword [0x4506d0], eax
movzx eax, word [0x4565d0]
mov word [0x4506d4], ax
movzx eax, word [0x4565d8]
mov word [0x4506d6], ax
mov eax, dword [0x4565f4]
mov dword [0x4506d8], eax
movzx eax, word [0x4565f8]
mov word [0x4506dc], ax
movzx eax, word [0x456600]
mov word [0x4506de], ax
mov eax, dword [0x45661c]
mov dword [0x4506e0], eax
movzx eax, word [0x456620]
mov word [0x4506e4], ax
movzx eax, word [0x456628]
mov word [0x4506e6], ax
mov eax, dword [0x456644]
mov dword [0x4506e8], eax
movzx eax, word [0x456648]
mov word [0x4506ec], ax
movzx eax, word [0x456650]
mov word [0x4506ee], ax
mov eax, dword [0x45666c]
mov dword [0x4506f0], eax
movzx eax, word [0x456670]
mov word [0x4506f4], ax
movzx eax, word [0x456678]
mov word [0x4506f6], ax
mov eax, dword [0x456694]
mov dword [0x4506f8], eax
movzx eax, word [0x456698]
mov word [0x4506fc], ax
movzx eax, word [0x4566a0]
mov word [0x4506fe], ax
mov eax, dword [0x4566bc]
mov dword [0x450700], eax
movzx eax, word [0x4566c0]
mov word [0x450704], ax
movzx eax, word [0x4566c8]
mov word [0x450706], ax
mov eax, dword [0x4566e4]
mov dword [0x450708], eax
movzx eax, word [0x4566e8]
mov word [0x45070c], ax
movzx eax, word [0x4566f0]
mov dword [esp + 8], 4
mov word [0x45070e], ax
mov eax, dword [0x45670c]
mov dword [esp + 4], edi
mov dword [0x450710], eax
movzx eax, word [0x456710]
mov dword [esp], 0xffffffff
mov word [0x450714], ax
movzx eax, word [0x456718]
mov word [0x450716], ax
call fcn.00401f50
mov dword [esp + 8], 0x58
mov dword [esp + 4], 0x4506c0
mov dword [esp], eax
call fcn.00401f50
mov dword [0x450718], eax
imul eax, dword [esp + 0x50], 0xa48
mov edx, dword [eax + 0x450a00]
lea ebp, [eax + 0x22c]
lea esi, [eax + 0x4509ec]
test edx, edx
jne 0x407d00
imul ebx, dword [esp + 0x50], 0xa48
mov dword [ebp + 0x4507c0], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov eax, dword [ebx + 0x4509d4]
mov dword [esp + 0x10], esi
mov dword [ebx + 0x4509fc], eax
movzx eax, byte [0x4506c2]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov eax, dword [ebx + 0x4509cc]
add ebx, 0x4507c0
mov dword [esp + 4], 0x4506c0
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x407d50
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
lea ebx, [eax + 0x4507c0]
mov eax, dword [eax + 0x4509cc]
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
mov eax, dword [ebx + 0x214]
sub esp, 0x10
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov dword [ebx + 0x240], 0
sub esp, 4
jmp 0x407c82
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x407cf7
mov dword [ebx + 0x240], 1
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret