Function at 0x409e21
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x431440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push esi
mov esi, ecx
push edi
mov edi, dword [ebp + 0xc]
cmp eax, 3
je 0x409e5b
cmp eax, 2
je 0x409e52
cmp eax, 1
jne 0x409f28
cmp eax, 3
jne 0x409f0c
mov ebx, dword [ebp + 8]
cmp ebx, dword [esi + 4]
je 0x409eac
cmp dword [esi + 4], 0xffffffff
je 0x409e71
push dword [esi]
call fcn.0040c7f0
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp ebx, dword [eax + 4]
jge 0x409f28
cmp ebx, dword [eax + 0x10]
jge 0x409e94
push eax
call fcn.0040c852
jmp 0x409e93
push eax
call fcn.0040c891
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409e8d
push dword [esi + 0x138]
push eax
call fcn.0040c99c
pop ecx
pop ecx
mov dword [esi + 4], ebx
lea eax, [ebp - 0x339]
push eax
push dword [ebp + 0x10]
push edi
push dword [esi]
call fcn.0040cc4d
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x409ed3
push dword [esi]
call fcn.0040c7f0
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x339], 0
jne 0x409f6a
test edi, edi
jle 0x409efa
mov eax, 0x600
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040d5ca
leave
ret 0x10
cmp edi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x409ee9
cmp dword [esi + 4], 0xffffffff
je 0x409f1a
push dword [esi]
call fcn.0040c7f0
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
mov ebx, dword [ebp + 8]
cmp ebx, dword [eax + 4]
jl 0x409f2f
mov eax, 0x10000
jmp 0x409ee9
cmp ebx, dword [eax + 0x10]
jge 0x409f43
push eax
call fcn.0040c852
jmp 0x409f42
push eax
call fcn.0040c891
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], ebx
jl 0x409f3c
lea eax, [ebp - 0x338]
mov ecx, esi
push eax
push ebx
call fcn.00409776
xor edx, edx
inc edx
test byte [ebp - 0x230], 0x10
je 0x409faa
cmp dword [ebp + 0x14], edx
jne 0x409f71
xor eax, eax
jmp 0x409ee9
mov al, byte [edi]
cmp al, 0x2f
je 0x409f92
cmp al, 0x5c
je 0x409f92
test al, al
je 0x409f85
cmp byte [edi + 1], 0x3a
je 0x409f92
mov byte [ebp - 0x340], 0
mov edx, dword [ebp - 0x340]
xor ecx, ecx
lea eax, [esi + 0x140]
test dl, dl
push edi
cmove ecx, eax
push ecx
call fcn.00409597
pop ecx
pop ecx
jmp 0x409f6a
xor ebx, ebx
cmp dword [ebp + 0x14], edx
je 0x40a0a8
mov al, byte [edi]
mov ecx, edi
mov dword [ebp - 0x340], edi
jmp 0x409fd9
cmp al, 0x2f
je 0x409fcc
cmp al, 0x5c
je 0x409fcc
inc ecx
jmp 0x409fd7
lea eax, [ecx + 1]
mov dword [ebp - 0x340], eax
mov ecx, eax
mov al, byte [ecx]
test al, al
jne 0x409fc1
push edi
lea eax, [ebp - 0x108]
push 0x104
push eax
call fcn.004110f3
mov ecx, dword [ebp - 0x340]
add esp, 0xc
cmp ecx, edi
jne 0x40a004
mov byte [ebp - 0x108], bl
jmp 0x40a035
mov eax, ecx
sub eax, edi
cmp eax, 0x104
jae 0x40a18a
mov byte [ebp + eax - 0x108], bl
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x40a05b
cmp al, 0x5c
je 0x40a05b
test al, al
je 0x40a035
cmp byte [ebp - 0x107], 0x3a
je 0x40a05b
push ecx
lea eax, [ebp - 0x108]
push eax
lea edi, [esi + 0x140]
push edi
lea eax, [ebp - 0x20c]
push str._s_s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
jmp 0x40a07a
push ecx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push 0x426598
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov edi, ebx
lea eax, [ebp - 0x108]
push eax
push edi
call fcn.00409597
pop ecx
pop ecx
push ebx
push dword [ebp - 0x230]
lea eax, [ebp - 0x20c]
push 2
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40a0b7
mov eax, 0x200
jmp 0x409ee9
push dword [esi + 0x138]
push dword [esi]
call fcn.0040c99c
pop ecx
pop ecx
cmp dword [esi + 0x13c], ebx
jne 0x40a0df
push 0x4000
call fcn.0040dce9
pop ecx
mov dword [esi + 0x13c], eax
lea eax, [ebp - 0x339]
push eax
push 0x4000
push dword [esi + 0x13c]
push dword [esi]
call fcn.0040cc4d
add esp, 0x10
mov dword [ebp - 0x340], eax
cmp eax, 0xffffff96
je 0x40a164
test eax, eax
js 0x40a138
jle 0x40a12c
push ebx
lea ecx, [ebp - 0x344]
push ecx
push eax
push dword [esi + 0x13c]
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40a13f
mov eax, dword [ebp - 0x340]
cmp byte [ebp - 0x339], bl
jne 0x40a146
test eax, eax
jne 0x40a0df
mov ebx, 0x5000000
jmp 0x40a169
mov ebx, 0x400
jmp 0x40a169
lea eax, [ebp - 0x21c]
push eax
lea eax, [ebp - 0x22c]
push eax
lea eax, [ebp - 0x224]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x40a169
mov ebx, 0x1000
cmp dword [ebp + 0x14], 1
je 0x40a176
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.0040c7f0
xor eax, eax
test ebx, ebx
pop ecx
cmovne eax, ebx
jmp 0x409ee9
call fcn.0040dc0e
int3