Function at 0x409b30
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x5c0db0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, ecx
cmp eax, 3
je 0x409b7d
cmp eax, 2
je 0x409c63
cmp eax, 1
je 0x409c63
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x409be7
cmp eax, 0xffffffff
je 0x409b97
mov eax, dword [esi]
push eax
call fcn.00407740
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x409b65
cmp edi, dword [eax + 0x10]
jge 0x409bb3
push eax
call fcn.004074b0
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x409bd2
lea ebx, [ebx]
mov edx, dword [esi]
push edx
call fcn.00407500
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x409bc0
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.00409670
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi]
lea eax, [ebp - 0x339]
push eax
push ecx
push ebx
push edx
call fcn.004097f0
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x409c16
mov eax, dword [esi]
push eax
call fcn.00407740
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [ebp - 0x339], 0
jne 0x409d14
test edi, edi
jle 0x409c3f
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
lea eax, [edi + 0x6a]
neg eax
sbb eax, eax
pop edi
and eax, 0x4fff000
pop esi
add eax, 0x1000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x409c76
mov ecx, dword [esi]
push ecx
call fcn.00407740
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jge 0x409b65
cmp edi, dword [eax + 0x10]
jge 0x409c95
push eax
call fcn.004074b0
add esp, 4
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x409cb2
lea esp, [esp]
mov eax, dword [esi]
push eax
call fcn.00407500
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0x10], edi
jl 0x409ca0
lea edx, [ebp - 0x338]
push edx
push edi
mov ecx, esi
call fcn.00407960
test byte [ebp - 0x230], 0x10
je 0x409d29
cmp dword [ebp + 0x14], 1
je 0x409d14
mov al, byte [ebx]
cmp al, 0x2f
je 0x409ce4
cmp al, 0x5c
je 0x409ce4
test al, al
je 0x409d04
cmp byte [ebx + 1], 0x3a
jne 0x409d04
push ebx
push 0
call fcn.00407f20
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
push ebx
add esi, 0x140
push esi
call fcn.00407f20
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x409dc8
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
test al, al
je 0x409d53
lea ecx, [ecx]
cmp al, 0x2f
je 0x409d48
cmp al, 0x5c
jne 0x409d4b
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x409d40
lea edx, [ebp - 0x108]
mov eax, ebx
sub edx, ebx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x409d60
cmp edi, ebx
jne 0x409de5
mov byte [ebp - 0x108], cl
push edi
lea ecx, [ebp - 0x108]
push ecx
lea ebx, [esi + 0x140]
push ebx
lea edx, [ebp - 0x20c]
push 0x56e870
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push ebx
call fcn.00407f20
add esp, 0x1c
mov ecx, dword [ebp - 0x230]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x409e44
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10
mov eax, edi
sub eax, ebx
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x409e14
cmp al, 0x5c
je 0x409e14
test al, al
je 0x409d74
cmp byte [ebp - 0x107], 0x3a
jne 0x409d74
push edi
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.00407f20
add esp, 0x18
jmp 0x409da5
mov eax, dword [esi + 0x138]
mov ecx, dword [esi]
push eax
push ecx
call fcn.00409670
add esp, 8
cmp dword [esi + 0x13c], 0
jne 0x409e72
push 0x4000
call fcn.0040a945
add esp, 4
mov dword [esi + 0x13c], eax
mov dword [ebp - 0x340], 0
lea esp, [esp]
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi]
lea edx, [ebp - 0x339]
push edx
push 0x4000
push eax
push ecx
call fcn.004097f0
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x409ee0
test edi, edi
js 0x409ed4
jle 0x409ec7
mov eax, dword [esi + 0x13c]
push 0
lea edx, [ebp - 0x344]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x409eec
cmp byte [ebp - 0x339], 0
jne 0x409ef8
test edi, edi
jne 0x409e80
mov dword [ebp - 0x340], 0x5000000
jmp 0x409f14
mov dword [ebp - 0x340], 0x1000
jmp 0x409f14
mov dword [ebp - 0x340], 0x400
jmp 0x409f14
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x409f21
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
push ecx
call fcn.00407740
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x340]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005087f8
mov esp, ebp
pop ebp
ret 0x10