Function at 0x412c1c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x380
mov dword [ebp - 0x378], ecx
cmp dword [ebp + 0x14], 3
je 0x412c47
cmp dword [ebp + 0x14], 2
je 0x412c47
cmp dword [ebp + 0x14], 1
je 0x412c47
mov eax, 0x10000
jmp 0x41329e
cmp dword [ebp + 0x14], 3
jne 0x412da8
mov eax, dword [ebp - 0x378]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x412d15
mov edx, dword [ebp - 0x378]
cmp dword [edx + 4], 0xffffffff
je 0x412c80
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
push ecx
call fcn.00411d26
add esp, 4
mov edx, dword [ebp - 0x378]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x412ca7
mov eax, 0x10000
jmp 0x41329e
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x412cc8
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
push ecx
call fcn.004110b5
add esp, 4
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x412ceb
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
push eax
call fcn.00411123
add esp, 4
jmp 0x412cc8
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
push ecx
call fcn.00411542
add esp, 8
mov edx, dword [ebp - 0x378]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x244]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx]
push edx
call fcn.004117d1
add esp, 0x10
mov dword [ebp - 0x240], eax
cmp dword [ebp - 0x240], 0
jg 0x412d62
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
push ecx
call fcn.00411d26
add esp, 4
mov edx, dword [ebp - 0x378]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x244]
and eax, 0xff
test eax, eax
je 0x412d78
xor eax, eax
jmp 0x41329e
cmp dword [ebp - 0x240], 0
jle 0x412d8b
mov eax, 0x600
jmp 0x41329e
cmp dword [ebp - 0x240], 0xffffff96
jne 0x412d9e
mov eax, 0x1000
jmp 0x41329e
mov eax, 0x5000000
jmp 0x41329e
mov ecx, dword [ebp - 0x378]
cmp dword [ecx + 4], 0xffffffff
je 0x412dc5
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
push eax
call fcn.00411d26
add esp, 4
mov ecx, dword [ebp - 0x378]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x412dec
mov eax, 0x10000
jmp 0x41329e
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x412e0d
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
push eax
call fcn.004110b5
add esp, 4
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x412e30
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx]
push edx
call fcn.00411123
add esp, 4
jmp 0x412e0d
lea eax, [ebp - 0x12c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x378]
call fcn.0041200f
mov edx, dword [ebp - 0x24]
and edx, 0x10
neg edx
sbb edx, edx
neg edx
mov byte [ebp - 0x23c], dl
mov eax, dword [ebp - 0x23c]
and eax, 0xff
test eax, eax
je 0x412f21
cmp dword [ebp + 0x14], 1
jne 0x412e78
xor eax, eax
jmp 0x41329e
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24c], ecx
mov edx, dword [ebp - 0x24c]
movsx eax, byte [edx]
cmp eax, 0x2f
je 0x412ec5
mov ecx, dword [ebp - 0x24c]
movsx edx, byte [ecx]
cmp edx, 0x5c
je 0x412ec5
mov eax, dword [ebp - 0x24c]
movsx ecx, byte [eax]
test ecx, ecx
je 0x412eb9
mov edx, dword [ebp - 0x24c]
movsx eax, byte [edx + 1]
cmp eax, 0x3a
je 0x412ec5
mov dword [ebp - 0x37c], 0
jmp 0x412ecf
mov dword [ebp - 0x37c], 1
mov cl, byte [ebp - 0x37c]
mov byte [ebp - 0x248], cl
mov edx, dword [ebp - 0x248]
and edx, 0xff
test edx, edx
je 0x412efe
mov eax, dword [ebp - 0x24c]
push eax
push 0
call fcn.00412a26
add esp, 8
jmp 0x412f1a
mov ecx, dword [ebp - 0x24c]
push ecx
mov edx, dword [ebp - 0x378]
add edx, 0x140
push edx
call fcn.00412a26
add esp, 8
xor eax, eax
jmp 0x41329e
mov byte [ebp - 0x238], 0
cmp dword [ebp + 0x14], 1
jne 0x412f3c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x130], eax
jmp 0x4130f3
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x258], ecx
mov edx, dword [ebp - 0x258]
mov dword [ebp - 0x360], edx
mov eax, dword [ebp - 0x360]
mov dword [ebp - 0x254], eax
mov ecx, dword [ebp - 0x254]
movsx edx, byte [ecx]
test edx, edx
je 0x412fa6
mov eax, dword [ebp - 0x254]
movsx ecx, byte [eax]
cmp ecx, 0x2f
je 0x412f86
mov edx, dword [ebp - 0x254]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x412f95
mov ecx, dword [ebp - 0x254]
add ecx, 1
mov dword [ebp - 0x360], ecx
mov edx, dword [ebp - 0x254]
add edx, 1
mov dword [ebp - 0x254], edx
jmp 0x412f5d
push 0x104
mov eax, dword [ebp - 0x258]
push eax
lea ecx, [ebp - 0x35c]
push ecx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov edx, dword [ebp - 0x360]
cmp edx, dword [ebp - 0x258]
jne 0x412fd9
mov byte [ebp - 0x35c], 0
jmp 0x412fed
mov eax, dword [ebp - 0x360]
sub eax, dword [ebp - 0x258]
mov byte [ebp + eax - 0x35c], 0
movsx ecx, byte [ebp - 0x35c]
cmp ecx, 0x2f
je 0x413028
movsx edx, byte [ebp - 0x35c]
cmp edx, 0x5c
je 0x413028
movsx eax, byte [ebp - 0x35c]
test eax, eax
je 0x41301c
movsx ecx, byte [ebp - 0x35b]
cmp ecx, 0x3a
je 0x413028
mov dword [ebp - 0x380], 0
jmp 0x413032
mov dword [ebp - 0x380], 1
mov dl, byte [ebp - 0x380]
mov byte [ebp - 0x250], dl
mov eax, dword [ebp - 0x250]
and eax, 0xff
test eax, eax
je 0x413083
mov ecx, dword [ebp - 0x360]
push ecx
lea edx, [ebp - 0x35c]
push edx
push 0x51ad90
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x10
lea ecx, [ebp - 0x35c]
push ecx
push 0
call fcn.00412a26
add esp, 8
jmp 0x4130cf
mov edx, dword [ebp - 0x360]
push edx
lea eax, [ebp - 0x35c]
push eax
mov ecx, dword [ebp - 0x378]
add ecx, 0x140
push ecx
push 0x51ad98
lea edx, [ebp - 0x238]
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
lea eax, [ebp - 0x35c]
push eax
mov ecx, dword [ebp - 0x378]
add ecx, 0x140
push ecx
call fcn.00412a26
add esp, 8
push 0
mov edx, dword [ebp - 0x24]
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [ebp - 0x130], eax
cmp dword [ebp - 0x130], 0xffffffff
jne 0x413106
mov eax, 0x200
jmp 0x41329e
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax]
push ecx
call fcn.00411542
add esp, 8
mov edx, dword [ebp - 0x378]
cmp dword [edx + 0x13c], 0
jne 0x413158
push 0x4000
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [ebp - 0x374], eax
mov eax, dword [ebp - 0x378]
mov ecx, dword [ebp - 0x374]
mov dword [eax + 0x13c], ecx
mov dword [ebp - 0x134], 0
cmp dword [ebp - 0x134], 0
jne 0x413245
lea edx, [ebp - 0x368]
push edx
push 0x4000
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 0x378]
mov eax, dword [edx]
push eax
call fcn.004117d1
add esp, 0x10
mov dword [ebp - 0x364], eax
cmp dword [ebp - 0x364], 0xffffff96
jne 0x4131b7
mov dword [ebp - 0x134], 0x1000
jmp 0x413245
cmp dword [ebp - 0x364], 0
jge 0x4131cc
mov dword [ebp - 0x134], 0x5000000
jmp 0x413245
cmp dword [ebp - 0x364], 0
jle 0x41321a
push 0
lea ecx, [ebp - 0x36c]
push ecx
mov edx, dword [ebp - 0x364]
push edx
mov eax, dword [ebp - 0x378]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 0x130]
push edx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov dword [ebp - 0x370], eax
cmp dword [ebp - 0x370], 0
jne 0x41321a
mov dword [ebp - 0x134], 0x400
jmp 0x413245
mov eax, dword [ebp - 0x368]
and eax, 0xff
test eax, eax
je 0x41322b
jmp 0x413245
cmp dword [ebp - 0x364], 0
jne 0x413240
mov dword [ebp - 0x134], 0x5000000
jmp 0x413245
jmp 0x413162
mov ecx, dword [ebp - 0x378]
mov edx, dword [ecx]
push edx
call fcn.00411d26
add esp, 4
cmp dword [ebp - 0x134], 0
jne 0x413278
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 0x41328b
mov ecx, dword [ebp - 0x130]
push ecx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
cmp dword [ebp - 0x134], 0
je 0x41329c
mov eax, dword [ebp - 0x134]
jmp 0x41329e
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10