Function at 0x40e5d1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x37c
mov dword [ebp - 0x374], ecx
cmp dword [ebp + 0x14], 3
je 0x40e5fc
cmp dword [ebp + 0x14], 2
je 0x40e5fc
cmp dword [ebp + 0x14], 1
je 0x40e5fc
mov eax, 0x10000
jmp 0x40ec2f
cmp dword [ebp + 0x14], 3
jne 0x40e75d
mov eax, dword [ebp - 0x374]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x40e6ca
mov edx, dword [ebp - 0x374]
cmp dword [edx + 4], 0xffffffff
je 0x40e635
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
push ecx
call fcn.0040d6c9
add esp, 4
mov edx, dword [ebp - 0x374]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x40e65c
mov eax, 0x10000
jmp 0x40ec2f
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x40e67d
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
push ecx
call fcn.0040ca67
add esp, 4
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x40e6a0
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
push eax
call fcn.0040cad5
add esp, 4
jmp 0x40e67d
mov ecx, dword [ebp - 0x374]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
push ecx
call fcn.0040cef4
add esp, 8
mov edx, dword [ebp - 0x374]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x13c]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x374]
mov edx, dword [ecx]
push edx
call fcn.0040d183
add esp, 0x10
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0
jg 0x40e717
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax]
push ecx
call fcn.0040d6c9
add esp, 4
mov edx, dword [ebp - 0x374]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x13c]
and eax, 0xff
test eax, eax
je 0x40e72d
xor eax, eax
jmp 0x40ec2f
cmp dword [ebp - 0x138], 0
jle 0x40e740
mov eax, 0x600
jmp 0x40ec2f
cmp dword [ebp - 0x138], 0xffffff96
jne 0x40e753
mov eax, 0x1000
jmp 0x40ec2f
mov eax, 0x5000000
jmp 0x40ec2f
mov ecx, dword [ebp - 0x374]
cmp dword [ecx + 4], 0xffffffff
je 0x40e77a
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
push eax
call fcn.0040d6c9
add esp, 4
mov ecx, dword [ebp - 0x374]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x40e7a1
mov eax, 0x10000
jmp 0x40ec2f
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x40e7c2
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
push eax
call fcn.0040ca67
add esp, 4
mov ecx, dword [ebp - 0x374]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x40e7e5
mov ecx, dword [ebp - 0x374]
mov edx, dword [ecx]
push edx
call fcn.0040cad5
add esp, 4
jmp 0x40e7c2
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x374]
call fcn.0040da86
mov edx, dword [ebp - 0x24]
and edx, 0x10
test edx, edx
je 0x40e8bf
cmp dword [ebp + 0x14], 1
jne 0x40e816
xor eax, eax
jmp 0x40ec2f
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x144]
movsx edx, byte [ecx]
cmp edx, 0x2f
je 0x40e863
mov eax, dword [ebp - 0x144]
movsx ecx, byte [eax]
cmp ecx, 0x5c
je 0x40e863
mov edx, dword [ebp - 0x144]
movsx eax, byte [edx]
test eax, eax
je 0x40e857
mov ecx, dword [ebp - 0x144]
movsx edx, byte [ecx + 1]
cmp edx, 0x3a
je 0x40e863
mov dword [ebp - 0x378], 0
jmp 0x40e86d
mov dword [ebp - 0x378], 1
mov al, byte [ebp - 0x378]
mov byte [ebp - 0x140], al
mov ecx, dword [ebp - 0x140]
and ecx, 0xff
test ecx, ecx
je 0x40e89c
mov edx, dword [ebp - 0x144]
push edx
push 0
call fcn.0040e493
add esp, 8
jmp 0x40e8b8
mov eax, dword [ebp - 0x144]
push eax
mov ecx, dword [ebp - 0x374]
add ecx, 0x140
push ecx
call fcn.0040e493
add esp, 8
xor eax, eax
jmp 0x40ec2f
cmp dword [ebp + 0x14], 1
jne 0x40e8d3
mov edx, dword [ebp + 0xc]
mov dword [ebp - 0x130], edx
jmp 0x40ea83
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x150]
mov dword [ebp - 0x35c], ecx
mov edx, dword [ebp - 0x35c]
mov dword [ebp - 0x14c], edx
mov eax, dword [ebp - 0x14c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40e93d
mov edx, dword [ebp - 0x14c]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x40e91d
mov ecx, dword [ebp - 0x14c]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x40e92c
mov eax, dword [ebp - 0x14c]
add eax, 1
mov dword [ebp - 0x35c], eax
mov ecx, dword [ebp - 0x14c]
add ecx, 1
mov dword [ebp - 0x14c], ecx
jmp 0x40e8f4
mov edx, dword [ebp - 0x150]
push edx
lea eax, [ebp - 0x358]
push eax
call sub.MSVCRT.dll_strcpy
add esp, 8
mov ecx, dword [ebp - 0x35c]
cmp ecx, dword [ebp - 0x150]
jne 0x40e96a
mov byte [ebp - 0x358], 0
jmp 0x40e97e
mov edx, dword [ebp - 0x35c]
sub edx, dword [ebp - 0x150]
mov byte [ebp + edx - 0x358], 0
movsx eax, byte [ebp - 0x358]
cmp eax, 0x2f
je 0x40e9b9
movsx ecx, byte [ebp - 0x358]
cmp ecx, 0x5c
je 0x40e9b9
movsx edx, byte [ebp - 0x358]
test edx, edx
je 0x40e9ad
movsx eax, byte [ebp - 0x357]
cmp eax, 0x3a
je 0x40e9b9
mov dword [ebp - 0x37c], 0
jmp 0x40e9c3
mov dword [ebp - 0x37c], 1
mov cl, byte [ebp - 0x37c]
mov byte [ebp - 0x148], cl
mov edx, dword [ebp - 0x148]
and edx, 0xff
test edx, edx
je 0x40ea15
mov eax, dword [ebp - 0x35c]
push eax
lea ecx, [ebp - 0x358]
push ecx
push str._s_s
lea edx, [ebp - 0x254]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x358]
push eax
push 0
call fcn.0040e493
add esp, 8
jmp 0x40ea5f
mov ecx, dword [ebp - 0x35c]
push ecx
lea edx, [ebp - 0x358]
push edx
mov eax, dword [ebp - 0x374]
add eax, 0x140
push eax
push str._s_s_s
lea ecx, [ebp - 0x254]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea edx, [ebp - 0x358]
push edx
mov eax, dword [ebp - 0x374]
add eax, 0x140
push eax
call fcn.0040e493
add esp, 8
push 0
mov ecx, dword [ebp - 0x24]
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x254]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0xffffffff
jne 0x40ea96
mov eax, 0x200
jmp 0x40ec2f
mov eax, dword [ebp - 0x374]
mov ecx, dword [eax + 0x138]
push ecx
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
push eax
call fcn.0040cef4
add esp, 8
mov ecx, dword [ebp - 0x374]
cmp dword [ecx + 0x13c], 0
jne 0x40eae8
push 0x4000
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x370], eax
mov edx, dword [ebp - 0x374]
mov eax, dword [ebp - 0x370]
mov dword [edx + 0x13c], eax
mov dword [ebp - 0x134], 0
cmp dword [ebp - 0x134], 0
jne 0x40ebd6
lea ecx, [ebp - 0x364]
push ecx
push 0x4000
mov edx, dword [ebp - 0x374]
mov eax, dword [edx + 0x13c]
push eax
mov ecx, dword [ebp - 0x374]
mov edx, dword [ecx]
push edx
call fcn.0040d183
add esp, 0x10
mov dword [ebp - 0x360], eax
cmp dword [ebp - 0x360], 0xffffff96
jne 0x40eb47
mov dword [ebp - 0x134], 0x1000
jmp 0x40ebd6
cmp dword [ebp - 0x360], 0
jge 0x40eb5c
mov dword [ebp - 0x134], 0x5000000
jmp 0x40ebd6
cmp dword [ebp - 0x360], 0
jle 0x40ebaa
push 0
lea eax, [ebp - 0x368]
push eax
mov ecx, dword [ebp - 0x360]
push ecx
mov edx, dword [ebp - 0x374]
mov eax, dword [edx + 0x13c]
push eax
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x36c], eax
cmp dword [ebp - 0x36c], 0
jne 0x40ebaa
mov dword [ebp - 0x134], 0x400
jmp 0x40ebd6
mov edx, dword [ebp - 0x364]
and edx, 0xff
test edx, edx
je 0x40ebbc
jmp 0x40ebd6
cmp dword [ebp - 0x360], 0
jne 0x40ebd1
mov dword [ebp - 0x134], 0x5000000
jmp 0x40ebd6
jmp 0x40eaf2
cmp dword [ebp - 0x134], 0
jne 0x40ebf8
lea eax, [ebp - 0x10]
push eax
lea ecx, [ebp - 0x20]
push ecx
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x130]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x40ec0b
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x374]
mov eax, dword [edx]
push eax
call fcn.0040d6c9
add esp, 4
cmp dword [ebp - 0x134], 0
je 0x40ec2d
mov eax, dword [ebp - 0x134]
jmp 0x40ec2f
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10