Function at 0x40b2a0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x39c
mov eax, dword [0x5b8584]
xor eax, ebp
mov dword [ebp - 8], eax
mov dword [ebp - 0x384], ecx
cmp dword [ebp + 0x14], 3
je 0x40b2d5
cmp dword [ebp + 0x14], 2
je 0x40b2d5
cmp dword [ebp + 0x14], 1
je 0x40b2d5
mov eax, 0x10000
jmp 0x40b934
cmp dword [ebp + 0x14], 3
jne 0x40b432
mov eax, dword [ebp - 0x384]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x40b3a3
mov edx, dword [ebp - 0x384]
cmp dword [edx + 4], 0xffffffff
je 0x40b30e
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.0040a300
add esp, 4
mov edx, dword [ebp - 0x384]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x40b335
mov eax, 0x10000
jmp 0x40b934
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x40b356
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.004098b0
add esp, 4
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x40b379
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
push eax
call fcn.00409920
add esp, 4
jmp 0x40b356
mov ecx, dword [ebp - 0x384]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.00409c60
add esp, 8
mov edx, dword [ebp - 0x384]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x141]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x384]
mov edx, dword [ecx]
push edx
call fcn.00409ef0
add esp, 0x10
mov dword [ebp - 0x140], eax
cmp dword [ebp - 0x140], 0
jg 0x40b3f0
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.0040a300
add esp, 4
mov edx, dword [ebp - 0x384]
mov dword [edx + 4], 0xffffffff
movzx eax, byte [ebp - 0x141]
test eax, eax
je 0x40b402
xor eax, eax
jmp 0x40b934
cmp dword [ebp - 0x140], 0
jle 0x40b415
mov eax, 0x600
jmp 0x40b934
cmp dword [ebp - 0x140], 0xffffff96
jne 0x40b428
mov eax, 0x1000
jmp 0x40b934
mov eax, 0x5000000
jmp 0x40b934
mov ecx, dword [ebp - 0x384]
cmp dword [ecx + 4], 0xffffffff
je 0x40b44f
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
push eax
call fcn.0040a300
add esp, 4
mov ecx, dword [ebp - 0x384]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x40b476
mov eax, 0x10000
jmp 0x40b934
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x40b497
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
push eax
call fcn.004098b0
add esp, 4
mov ecx, dword [ebp - 0x384]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x40b4ba
mov ecx, dword [ebp - 0x384]
mov edx, dword [ecx]
push edx
call fcn.00409920
add esp, 4
jmp 0x40b497
lea eax, [ebp - 0x138]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x384]
call fcn.0040a650
mov edx, dword [ebp - 0x30]
and edx, 0x10
je 0x40b58d
cmp dword [ebp + 0x14], 1
jne 0x40b4e9
xor eax, eax
jmp 0x40b934
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x148], eax
mov ecx, dword [ebp - 0x148]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x40b536
mov eax, dword [ebp - 0x148]
movsx ecx, byte [eax]
cmp ecx, 0x5c
je 0x40b536
mov edx, dword [ebp - 0x148]
movsx eax, byte [edx]
test eax, eax
je 0x40b52a
mov ecx, dword [ebp - 0x148]
movsx edx, byte [ecx + 1]
cmp edx, 0x3a
je 0x40b536
mov dword [ebp - 0x388], 0
jmp 0x40b540
mov dword [ebp - 0x388], 1
mov al, byte [ebp - 0x388]
mov byte [ebp - 0x142], al
movzx ecx, byte [ebp - 0x142]
test ecx, ecx
je 0x40b56a
mov edx, dword [ebp - 0x148]
push edx
push 0
call fcn.0040b060
add esp, 8
jmp 0x40b586
mov eax, dword [ebp - 0x148]
push eax
mov ecx, dword [ebp - 0x384]
add ecx, 0x140
push ecx
call fcn.0040b060
add esp, 8
xor eax, eax
jmp 0x40b934
cmp dword [ebp + 0x14], 1
jne 0x40b59e
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
jmp 0x40b799
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x150]
mov dword [ebp - 0x154], ecx
mov edx, dword [ebp - 0x154]
mov dword [ebp - 0x36c], edx
mov eax, dword [ebp - 0x36c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40b608
mov edx, dword [ebp - 0x36c]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x40b5e8
mov ecx, dword [ebp - 0x36c]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x40b5f7
mov eax, dword [ebp - 0x36c]
add eax, 1
mov dword [ebp - 0x154], eax
mov ecx, dword [ebp - 0x36c]
add ecx, 1
mov dword [ebp - 0x36c], ecx
jmp 0x40b5bf
mov edx, dword [ebp - 0x150]
mov dword [ebp - 0x38c], edx
lea eax, [ebp - 0x368]
mov dword [ebp - 0x390], eax
mov ecx, dword [ebp - 0x390]
mov dword [ebp - 0x394], ecx
mov edx, dword [ebp - 0x38c]
mov al, byte [edx]
mov byte [ebp - 0x395], al
mov ecx, dword [ebp - 0x390]
mov dl, byte [ebp - 0x395]
mov byte [ecx], dl
mov eax, dword [ebp - 0x38c]
add eax, 1
mov dword [ebp - 0x38c], eax
mov ecx, dword [ebp - 0x390]
add ecx, 1
mov dword [ebp - 0x390], ecx
cmp byte [ebp - 0x395], 0
jne 0x40b62c
mov edx, dword [ebp - 0x154]
cmp edx, dword [ebp - 0x150]
jne 0x40b686
mov byte [ebp - 0x368], 0
jmp 0x40b69a
mov eax, dword [ebp - 0x154]
sub eax, dword [ebp - 0x150]
mov byte [ebp + eax - 0x368], 0
movsx ecx, byte [ebp - 0x368]
cmp ecx, 0x2f
je 0x40b6d5
movsx edx, byte [ebp - 0x368]
cmp edx, 0x5c
je 0x40b6d5
movsx eax, byte [ebp - 0x368]
test eax, eax
je 0x40b6c9
movsx ecx, byte [ebp - 0x367]
cmp ecx, 0x3a
je 0x40b6d5
mov dword [ebp - 0x39c], 0
jmp 0x40b6df
mov dword [ebp - 0x39c], 1
mov dl, byte [ebp - 0x39c]
mov byte [ebp - 0x149], dl
movzx eax, byte [ebp - 0x149]
test eax, eax
je 0x40b72c
mov ecx, dword [ebp - 0x154]
push ecx
lea edx, [ebp - 0x368]
push edx
push 0x5686ac
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea ecx, [ebp - 0x368]
push ecx
push 0
call fcn.0040b060
add esp, 8
jmp 0x40b778
mov edx, dword [ebp - 0x154]
push edx
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp - 0x384]
add ecx, 0x140
push ecx
push 0x5686b4
lea edx, [ebp - 0x260]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp - 0x384]
add ecx, 0x140
push ecx
call fcn.0040b060
add esp, 8
push 0
mov edx, dword [ebp - 0x30]
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
jne 0x40b7a9
mov eax, 0x200
jmp 0x40b934
mov ecx, dword [ebp - 0x384]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.00409c60
add esp, 8
mov edx, dword [ebp - 0x384]
cmp dword [edx + 0x13c], 0
jne 0x40b7fb
push 0x4000
call fcn.0040be9b
add esp, 4
mov dword [ebp - 0x380], eax
mov eax, dword [ebp - 0x384]
mov ecx, dword [ebp - 0x380]
mov dword [eax + 0x13c], ecx
mov dword [ebp - 0x13c], 0
cmp dword [ebp - 0x13c], 0
jne 0x40b8e1
lea edx, [ebp - 0x371]
push edx
push 0x4000
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 0x384]
mov eax, dword [edx]
push eax
call fcn.00409ef0
add esp, 0x10
mov dword [ebp - 0x370], eax
cmp dword [ebp - 0x370], 0xffffff96
jne 0x40b85a
mov dword [ebp - 0x13c], 0x1000
jmp 0x40b8e1
cmp dword [ebp - 0x370], 0
jge 0x40b86f
mov dword [ebp - 0x13c], 0x5000000
jmp 0x40b8e1
cmp dword [ebp - 0x370], 0
jle 0x40b8ba
push 0
lea ecx, [ebp - 0x37c]
push ecx
mov edx, dword [ebp - 0x370]
push edx
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x378], eax
cmp dword [ebp - 0x378], 0
jne 0x40b8ba
mov dword [ebp - 0x13c], 0x400
jmp 0x40b8e1
movzx eax, byte [ebp - 0x371]
test eax, eax
je 0x40b8c7
jmp 0x40b8e1
cmp dword [ebp - 0x370], 0
jne 0x40b8dc
mov dword [ebp - 0x13c], 0x5000000
jmp 0x40b8e1
jmp 0x40b805
cmp dword [ebp - 0x13c], 0
jne 0x40b900
lea ecx, [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x40b910
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x384]
mov ecx, dword [eax]
push ecx
call fcn.0040a300
add esp, 4
cmp dword [ebp - 0x13c], 0
je 0x40b932
mov eax, dword [ebp - 0x13c]
jmp 0x40b934
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.0050342b
mov esp, ebp
pop ebp
ret 0x10