Function at 0x409371
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x65c
mov eax, dword [0x49d094]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
push edi
cmp dword [esi + 4], 0xffffffff
je 0x409399
mov ecx, dword [esi]
call fcn.00408ad3
mov ecx, dword [esi]
or dword [esi + 4], 0xffffffff
mov edi, dword [ebp + 8]
cmp edi, dword [ecx + 4]
jl 0x4093bd
mov eax, 0x10000
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004582a0
leave
ret 0x10
cmp edi, dword [ecx + 0x10]
jge 0x4093d0
call fcn.00408526
jmp 0x4093d0
mov ecx, eax
call fcn.0040855d
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x4093c9
lea eax, [ebp - 0x650]
mov ecx, esi
push eax
push edi
call fcn.00408c70
test byte [ebp - 0x444], 0x10
movzx eax, word [ebx]
je 0x40941d
cmp eax, 0x2f
je 0x409410
cmp eax, 0x5c
je 0x409410
test ax, ax
je 0x409408
cmp word [ebx + 2], 0x3a
je 0x409410
lea ecx, [esi + 0x244]
jmp 0x409412
xor ecx, ecx
mov edx, ebx
call fcn.00409245
xor eax, eax
jmp 0x4093ac
push 0x5c
mov edx, ebx
mov dword [ebp - 0x658], 0x2f
mov ecx, ebx
pop edi
jmp 0x40944b
cmp ax, word [ebp - 0x658]
je 0x409443
cmp ax, di
je 0x409443
add ecx, 2
jmp 0x409448
lea edx, [ecx + 2]
mov ecx, edx
movzx eax, word [ecx]
test ax, ax
jne 0x409430
lea edi, [ebp - 0x210]
mov ecx, ebx
sub edi, ebx
movzx eax, word [ecx]
mov word [edi + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x40945a
xor edi, edi
cmp edx, ebx
jne 0x40947a
xor eax, eax
mov word [ebp - 0x210], ax
jmp 0x4094bc
mov eax, edx
sub eax, ebx
and eax, 0xfffffffe
cmp eax, 0x208
jae 0x40960a
xor ecx, ecx
mov word [ebp + eax - 0x210], cx
mov ax, word [ebp - 0x210]
push 0x2f
pop ecx
cmp ax, cx
je 0x4094e2
push 0x5c
pop ecx
cmp ax, cx
je 0x4094e2
test ax, ax
je 0x4094bc
cmp word [ebp - 0x20e], 0x3a
je 0x4094e2
push edx
lea eax, [ebp - 0x210]
push eax
lea ebx, [esi + 0x244]
push ebx
lea eax, [ebp - 0x418]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
jmp 0x409501
push edx
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x418]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
mov ebx, edi
lea edx, [ebp - 0x210]
mov ecx, ebx
call fcn.00409245
push edi
push dword [ebp - 0x444]
lea eax, [ebp - 0x418]
push 2
push edi
push edi
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x658], eax
cmp eax, 0xffffffff
jne 0x409540
mov eax, 0x200
jmp 0x4093ac
mov edx, dword [esi + 0x23c]
mov ecx, dword [esi]
call fcn.00408741
cmp dword [esi + 0x240], edi
jne 0x409566
push 0x4000
call fcn.004582f1
pop ecx
mov dword [esi + 0x240], eax
mov edx, dword [esi + 0x240]
lea eax, [ebp - 0x651]
mov ecx, dword [esi]
push eax
push 0x4000
call fcn.00408892
mov ebx, eax
pop ecx
pop ecx
cmp ebx, 0xffffff96
je 0x4095eb
test ebx, ebx
js 0x4095ba
jle 0x4095ad
push edi
lea eax, [ebp - 0x41c]
push eax
push ebx
push dword [esi + 0x240]
push dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4095c1
cmp byte [ebp - 0x651], 0
jne 0x4095c8
test ebx, ebx
jne 0x409566
mov edi, 0x5000000
jmp 0x4095f0
mov edi, 0x400
jmp 0x4095f0
lea eax, [ebp - 0x430]
push eax
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x438]
push eax
push dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x4095f0
mov edi, 0x1000
push dword [ebp - 0x658]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
call fcn.00408ad3
mov eax, edi
jmp 0x4093ac
call fcn.0045843f
int3