Function at 0x4080a0
Capabilities:
Write file on windows

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x7c
movzx eax, word [0x450060]
movzx edi, word [0x450062]
mov byte [0x4506c5], 0
imul esi, dword [esp + 0x90], 0xa48
mov edx, dword [esp + 0x94]
mov dword [0x4506c0], 0x75c55aa
shl eax, 0x10
or eax, edi
mov byte [0x4506c4], dl
movzx edx, dl
mov ecx, dword [esi + 0x4509c0]
add eax, 1
imul edx, edx, 0x1e0
lea ebx, [esi + 0x4507c0]
mov dword [esp + 0x6c], eax
xor eax, eax
mov word [0x4506c6], ax
lea eax, [ecx + ecx*4 - 5]
shl eax, 4
add edx, eax
lea eax, [edx + 0x457380]
mov ebp, dword [edx + 0x457380]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov edi, dword [eax + 4]
mov dword [esp + 0x38], ecx
mov ecx, dword [eax + 0x10]
mov dword [esp + 0x34], edx
mov edx, dword [eax + 0x14]
mov dword [esp + 0x2c], ecx
mov ecx, dword [eax + 0x18]
mov dword [esp + 0x24], edx
mov edx, dword [eax + 0x1c]
mov dword [esp + 0x3c], ecx
mov ecx, dword [eax + 0x20]
mov dword [esp + 0x30], edx
mov edx, dword [eax + 0x24]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x40], edx
mov ecx, dword [eax + 0x28]
mov dword [0x4506cc], edi
mov edi, dword [esp + 0x38]
mov edx, dword [eax + 0x2c]
mov dword [esp + 0x44], ecx
mov dword [0x4506d0], edi
mov edi, dword [esp + 0x34]
mov ecx, dword [eax + 0x30]
mov dword [esp + 0x48], edx
mov dword [0x4506d4], edi
mov edi, dword [esp + 0x2c]
mov edx, dword [eax + 0x34]
mov dword [esp + 0x4c], ecx
mov dword [0x4506d8], edi
mov edi, dword [esp + 0x24]
mov ecx, dword [eax + 0x38]
mov dword [esp + 0x50], edx
mov dword [0x4506dc], edi
mov edi, dword [esp + 0x3c]
mov edx, dword [eax + 0x3c]
mov dword [esp + 0x54], ecx
mov dword [0x4506e0], edi
mov edi, dword [esp + 0x30]
mov ecx, dword [eax + 0x40]
mov dword [esp + 0x58], edx
mov dword [0x4506e4], edi
mov edi, dword [esp + 0x28]
mov edx, dword [eax + 0x48]
mov dword [esp + 0x5c], ecx
mov dword [0x4506c8], ebp
mov ecx, dword [eax + 0x44]
lea ebp, [esi + 0x22c]
add esi, 0x4509ec
mov eax, dword [eax + 0x4c]
mov dword [0x4506e8], edi
mov edi, dword [esp + 0x40]
mov dword [esp + 8], 4
mov dword [esp], 0xffffffff
mov dword [0x4506ec], edi
mov edi, dword [esp + 0x44]
mov dword [0x450710], edx
mov dword [0x4506f0], edi
mov edi, dword [esp + 0x48]
mov dword [0x45070c], ecx
mov dword [0x4506f4], edi
mov edi, dword [esp + 0x4c]
mov dword [0x450714], eax
mov dword [0x4506f8], edi
mov edi, dword [esp + 0x50]
mov dword [0x4506fc], edi
mov edi, dword [esp + 0x54]
mov dword [0x450700], edi
mov edi, dword [esp + 0x58]
mov dword [0x450704], edi
mov edi, dword [esp + 0x5c]
mov dword [0x450708], edi
lea edi, [esp + 0x6c]
mov dword [esp + 4], edi
call fcn.00401f50
mov dword [esp + 8], 0x58
mov dword [esp + 4], 0x4506c0
mov dword [esp], eax
call fcn.00401f50
mov edx, dword [ebx + 0x240]
mov dword [0x450718], eax
test edx, edx
jne 0x408320
imul ebx, dword [esp + 0x90], 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 0x408368
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 0xc], 1
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov eax, dword [ebx + 0x20c]
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 0x408297
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x40830f
mov dword [ebx + 0x240], 1
add esp, 0x7c
pop ebx
pop esi
pop edi
pop ebp
ret