Function at 0x409fb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x650
mov eax, dword [0x459e00]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
test eax, eax
jne 0x409fe7
mov eax, 0x10000
mov dword [0x45bb54], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434758
mov esp, ebp
pop ebp
ret
cmp dword [eax], 1
je 0x40a005
mov eax, 0x80000
mov dword [0x45bb54], eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00434758
mov esp, ebp
pop ebp
ret
push esi
push edi
mov edi, dword [eax + 4]
or esi, 0xffffffff
cmp dword [edi + 4], esi
je 0x40a01d
mov eax, dword [edi]
push eax
call fcn.00407ae0
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], esi
mov esi, dword [ebp + 0xc]
cmp esi, dword [eax + 4]
jl 0x40a034
mov eax, 0x10000
jmp 0x40a2fe
cmp esi, dword [eax + 0x10]
jge 0x40a042
push eax
call fcn.00407840
add esp, 4
mov ecx, dword [edi]
cmp dword [ecx + 0x10], esi
jge 0x40a0a9
lea esp, [esp]
mov esi, dword [edi]
test esi, esi
je 0x40a09d
cmp dword [esi + 0x18], 0
je 0x40a09d
mov eax, dword [esi + 0x10]
inc eax
cmp eax, dword [esi + 4]
je 0x40a09d
mov edx, dword [esi + 0x50]
add edx, dword [esi + 0x4c]
mov ecx, dword [esi + 0x48]
push 0
push 0
push 0
push 0
push 0
mov dword [esi + 0x10], eax
push 0
lea edx, [edx + ecx + 0x2e]
add dword [esi + 0x14], edx
lea eax, [esi + 0x78]
push eax
lea ecx, [esi + 0x28]
push ecx
push esi
call fcn.004074a0
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov edx, dword [edi]
mov eax, dword [ebp + 0xc]
cmp dword [edx + 0x10], eax
jl 0x40a050
mov esi, eax
lea ecx, [ebp - 0x644]
push ecx
push esi
mov ecx, edi
call fcn.00409720
test byte [ebp - 0x438], 0x10
movzx eax, word [ebx]
je 0x40a103
cmp eax, 0x2f
je 0x40a0da
cmp eax, 0x5c
je 0x40a0da
test ax, ax
je 0x40a0ec
cmp word [ebx + 2], 0x3a
jne 0x40a0ec
push ebx
push 0
call fcn.00409d90
add esp, 8
xor eax, eax
jmp 0x40a2fe
push ebx
add edi, 0x244
push edi
call fcn.00409d90
add esp, 8
xor eax, eax
jmp 0x40a2fe
mov esi, ebx
mov ecx, ebx
test ax, ax
je 0x40a12b
lea esp, [esp]
cmp ax, 0x2f
je 0x40a11c
cmp ax, 0x5c
jne 0x40a11f
lea esi, [ecx + 2]
movzx eax, word [ecx + 2]
add ecx, 2
test ax, ax
jne 0x40a110
push ebx
lea edx, [ebp - 0x20c]
push 0x104
push edx
call fcn.00435095
add esp, 0xc
cmp esi, ebx
jne 0x40a1b0
xor eax, eax
mov word [ebp - 0x20c], ax
push esi
lea eax, [ebp - 0x20c]
push eax
lea ebx, [edi + 0x244]
push ebx
lea ecx, [ebp - 0x414]
push str._s_s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push ebx
call fcn.00409d90
add esp, 0x1c
mov eax, dword [ebp - 0x438]
push 0
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x414]
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x40a21a
mov eax, 0x200
jmp 0x40a2fe
mov ecx, esi
sub ecx, ebx
sar ecx, 1
xor edx, edx
mov word [ebp + ecx*2 - 0x20c], dx
mov ax, word [ebp - 0x20c]
cmp ax, 0x2f
je 0x40a1ea
cmp ax, 0x5c
je 0x40a1ea
test ax, ax
je 0x40a14d
cmp word [ebp - 0x20a], 0x3a
jne 0x40a14d
push esi
lea eax, [ebp - 0x20c]
push eax
lea ecx, [ebp - 0x414]
push str._s_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
lea edx, [ebp - 0x20c]
push edx
push 0
call fcn.00409d90
add esp, 0x18
jmp 0x40a17e
mov edx, dword [edi + 0x23c]
mov eax, dword [edi]
push edx
push eax
call fcn.004091f0
add esp, 8
cmp dword [edi + 0x240], 0
jne 0x40a248
push 0x4000
call fcn.0043429d
add esp, 4
mov dword [edi + 0x240], eax
mov dword [ebp - 0x64c], 0
mov edx, dword [edi + 0x240]
mov eax, dword [edi]
lea ecx, [ebp - 0x645]
push ecx
push 0x4000
push edx
push eax
call fcn.00409370
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x40a2b2
test esi, esi
js 0x40a2a6
jle 0x40a299
mov edx, dword [edi + 0x240]
push 0
lea ecx, [ebp - 0x650]
push ecx
push esi
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
test eax, eax
je 0x40a2be
cmp byte [ebp - 0x645], 0
jne 0x40a2ca
test esi, esi
jne 0x40a252
mov dword [ebp - 0x64c], 0x5000000
jmp 0x40a2e6
mov dword [ebp - 0x64c], 0x1000
jmp 0x40a2e6
mov dword [ebp - 0x64c], 0x400
jmp 0x40a2e6
lea eax, [ebp - 0x424]
push eax
lea ecx, [ebp - 0x434]
push ecx
lea edx, [ebp - 0x42c]
push edx
push ebx
call dword [sym.imp.KERNEL32.DLL_SetFileTime]
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, dword [edi]
push eax
call fcn.00407ae0
mov eax, dword [ebp - 0x64c]
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov dword [0x45bb54], eax
pop ebx
call fcn.00434758
mov esp, ebp
pop ebp
ret