Function at 0x4125d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x380
mov dword [ebp - 4], ecx
cmp dword [ebp + 0x14], 3
je 0x4125f8
cmp dword [ebp + 0x14], 2
je 0x4125f8
cmp dword [ebp + 0x14], 1
je 0x4125f8
mov eax, 0x10000
jmp 0x412b79
cmp dword [ebp + 0x14], 3
jne 0x412716
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x4126a2
mov edx, dword [ebp - 4]
cmp dword [edx + 4], 0xffffffff
je 0x412628
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004175e0
add esp, 4
mov edx, dword [ebp - 4]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x412649
mov eax, 0x10000
jmp 0x412b79
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x412664
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004176e0
add esp, 4
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x412681
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.00417760
add esp, 4
jmp 0x412664
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 0x138]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.00417830
add esp, 8
mov edx, dword [ebp - 4]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 6]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.00417d30
add esp, 0x10
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jg 0x4126dd
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004175e0
add esp, 4
mov edx, dword [ebp - 4]
mov dword [edx + 4], 0xffffffff
movzx eax, byte [ebp - 6]
test eax, eax
je 0x4126ec
xor eax, eax
jmp 0x412b79
cmp dword [ebp - 0x30], 0
jle 0x4126fc
mov eax, 0x600
jmp 0x412b79
cmp dword [ebp - 0x30], 0xffffff96
jne 0x41270c
mov eax, 0x1000
jmp 0x412b79
mov eax, 0x5000000
jmp 0x412b79
mov ecx, dword [ebp - 4]
cmp dword [ecx + 4], 0xffffffff
je 0x41272d
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.004175e0
add esp, 4
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x41274e
mov eax, 0x10000
jmp 0x412b79
mov edx, dword [ebp - 4]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x412769
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.004176e0
add esp, 4
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x412786
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.00417760
add esp, 4
jmp 0x412769
lea eax, [ebp - 0x27c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 4]
call fcn.00411790
nop
mov edx, dword [ebp - 0x174]
and edx, 0x10
je 0x412856
cmp dword [ebp + 0x14], 1
jne 0x4127b6
xor eax, eax
jmp 0x412b79
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x14], eax
mov ecx, 1
imul edx, ecx, 0
mov eax, dword [ebp - 0x14]
movsx ecx, byte [eax + edx]
cmp ecx, 0x2f
je 0x412814
mov edx, 1
imul eax, edx, 0
mov ecx, dword [ebp - 0x14]
movsx edx, byte [ecx + eax]
cmp edx, 0x5c
je 0x412814
mov eax, 1
imul ecx, eax, 0
mov edx, dword [ebp - 0x14]
movsx eax, byte [edx + ecx]
test eax, eax
je 0x41280b
mov ecx, 1
shl ecx, 0
mov edx, dword [ebp - 0x14]
movsx eax, byte [edx + ecx]
cmp eax, 0x3a
je 0x412814
mov dword [ebp - 0x38], 0
jmp 0x41281b
mov dword [ebp - 0x38], 1
mov cl, byte [ebp - 0x38]
mov byte [ebp - 7], cl
movzx edx, byte [ebp - 7]
test edx, edx
je 0x412839
mov eax, dword [ebp - 0x14]
push eax
push 0
call fcn.004115e0
add esp, 8
jmp 0x41284f
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x140
push edx
call fcn.004115e0
add esp, 8
xor eax, eax
jmp 0x412b79
cmp dword [ebp + 0x14], 1
jne 0x412867
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x24], eax
jmp 0x412a1d
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2c], ecx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
movsx edx, byte [ecx]
test edx, edx
je 0x4128ad
mov eax, dword [ebp - 0x18]
movsx ecx, byte [eax]
cmp ecx, 0x2f
je 0x412899
mov edx, dword [ebp - 0x18]
movsx eax, byte [edx]
cmp eax, 0x5c
jne 0x4128a2
mov ecx, dword [ebp - 0x18]
add ecx, 1
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
jmp 0x412879
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0x150]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x34]
mov cl, byte [eax]
mov byte [ebp - 5], cl
mov edx, dword [ebp - 0x28]
mov al, byte [ebp - 5]
mov byte [edx], al
mov ecx, dword [ebp - 0x34]
add ecx, 1
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x28]
add edx, 1
mov dword [ebp - 0x28], edx
cmp byte [ebp - 5], 0
jne 0x4128c2
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x2c]
jne 0x412904
mov ecx, 1
imul edx, ecx, 0
mov byte [ebp + edx - 0x150], 0
jmp 0x412912
mov eax, dword [ebp - 0x1c]
sub eax, dword [ebp - 0x2c]
mov byte [ebp + eax - 0x150], 0
mov ecx, 1
imul edx, ecx, 0
movsx eax, byte [ebp + edx - 0x150]
cmp eax, 0x2f
je 0x41296e
mov ecx, 1
imul edx, ecx, 0
movsx eax, byte [ebp + edx - 0x150]
cmp eax, 0x5c
je 0x41296e
mov ecx, 1
imul edx, ecx, 0
movsx eax, byte [ebp + edx - 0x150]
test eax, eax
je 0x412965
mov ecx, 1
shl ecx, 0
movsx edx, byte [ebp + ecx - 0x150]
cmp edx, 0x3a
je 0x41296e
mov dword [ebp - 0x3c], 0
jmp 0x412975
mov dword [ebp - 0x3c], 1
mov al, byte [ebp - 0x3c]
mov byte [ebp - 8], al
movzx ecx, byte [ebp - 8]
test ecx, ecx
je 0x4129b6
mov edx, dword [ebp - 0x1c]
push edx
lea eax, [ebp - 0x150]
push eax
push str._s_s
lea ecx, [ebp - 0x380]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea edx, [ebp - 0x150]
push edx
push 0
call fcn.004115e0
add esp, 8
jmp 0x4129f9
mov eax, dword [ebp - 0x1c]
push eax
lea ecx, [ebp - 0x150]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x140
push edx
push str._s_s_s
lea eax, [ebp - 0x380]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [ebp - 0x150]
push ecx
mov edx, dword [ebp - 4]
add edx, 0x140
push edx
call fcn.004115e0
add esp, 8
push 0
mov eax, dword [ebp - 0x174]
push eax
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x380]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0xffffffff
jne 0x412a2d
mov eax, 0x200
jmp 0x412b79
mov edx, dword [ebp - 4]
mov eax, dword [edx + 0x138]
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
call fcn.00417830
add esp, 8
mov eax, dword [ebp - 4]
cmp dword [eax + 0x13c], 0
jne 0x412a6d
push 0x4000
call fcn.00421291
add esp, 4
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x40]
mov dword [ecx + 0x13c], edx
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
jne 0x412b27
push 0x4000
push 0
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x13c]
push ecx
call fcn.00435830
add esp, 0xc
lea edx, [ebp - 9]
push edx
push 0x4000
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 4]
mov eax, dword [edx]
push eax
call fcn.00417d30
add esp, 0x10
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffff96
jne 0x412aca
mov dword [ebp - 0x10], 0x1000
jmp 0x412b27
cmp dword [ebp - 0x20], 0
jge 0x412ad9
mov dword [ebp - 0x10], 0x5000000
jmp 0x412b27
cmp dword [ebp - 0x20], 0
jle 0x412b0f
push 0
lea ecx, [ebp - 0x4c]
push ecx
mov edx, dword [ebp - 0x20]
push edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 0x13c]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0
jne 0x412b0f
mov dword [ebp - 0x10], 0x400
jmp 0x412b27
movzx eax, byte [ebp - 9]
test eax, eax
jne 0x412b20
cmp dword [ebp - 0x20], 0x4000
jge 0x412b22
jmp 0x412b27
jmp 0x412a74
cmp dword [ebp - 0x10], 0
jne 0x412b4d
lea ecx, [ebp - 0x160]
push ecx
lea edx, [ebp - 0x170]
push edx
lea eax, [ebp - 0x168]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
nop
cmp dword [ebp + 0x14], 1
je 0x412b5e
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
nop
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
push ecx
call fcn.004175e0
add esp, 4
cmp dword [ebp - 0x10], 0
je 0x412b77
mov eax, dword [ebp - 0x10]
jmp 0x412b79
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10