Function at 0x414060
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68c
mov eax, dword [0x49f868]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x650], ecx
cmp dword [ebp + 0x14], 3
je 0x414095
cmp dword [ebp + 0x14], 2
je 0x414095
cmp dword [ebp + 0x14], 1
je 0x414095
mov eax, 0x10000
jmp 0x41475a
cmp dword [ebp + 0x14], 3
jne 0x4141f2
mov eax, dword [ebp - 0x650]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
je 0x414163
mov edx, dword [ebp - 0x650]
cmp dword [edx + 4], 0xffffffff
je 0x4140ce
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.004196d0
add esp, 4
mov edx, dword [ebp - 0x650]
mov dword [edx + 4], 0xffffffff
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 4]
jl 0x4140f5
mov eax, 0x10000
jmp 0x41475a
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx + 0x10]
jge 0x414116
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.004197d0
add esp, 4
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
mov ecx, dword [eax + 0x10]
cmp ecx, dword [ebp + 8]
jge 0x414139
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
push eax
call fcn.00419850
add esp, 4
jmp 0x414116
mov ecx, dword [ebp - 0x650]
mov edx, dword [ecx + 0x23c]
push edx
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.00419a40
add esp, 8
mov edx, dword [ebp - 0x650]
mov eax, dword [ebp + 8]
mov dword [edx + 4], eax
lea ecx, [ebp - 0x416]
push ecx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp - 0x650]
mov edx, dword [ecx]
push edx
call fcn.00419fc0
add esp, 0x10
mov dword [ebp - 0x674], eax
cmp dword [ebp - 0x674], 0
jg 0x4141b0
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.004196d0
add esp, 4
mov edx, dword [ebp - 0x650]
mov dword [edx + 4], 0xffffffff
movzx eax, byte [ebp - 0x416]
test eax, eax
je 0x4141c2
xor eax, eax
jmp 0x41475a
cmp dword [ebp - 0x674], 0
jle 0x4141d5
mov eax, 0x600
jmp 0x41475a
cmp dword [ebp - 0x674], 0xffffff96
jne 0x4141e8
mov eax, 0x1000
jmp 0x41475a
mov eax, 0x5000000
jmp 0x41475a
mov ecx, dword [ebp - 0x650]
cmp dword [ecx + 4], 0xffffffff
je 0x41420f
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
push eax
call fcn.004196d0
add esp, 4
mov ecx, dword [ebp - 0x650]
mov dword [ecx + 4], 0xffffffff
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 4]
jl 0x414236
mov eax, 0x10000
jmp 0x41475a
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
mov ecx, dword [ebp + 8]
cmp ecx, dword [eax + 0x10]
jge 0x414257
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
push eax
call fcn.004197d0
add esp, 4
mov ecx, dword [ebp - 0x650]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
cmp eax, dword [ebp + 8]
jge 0x41427a
mov ecx, dword [ebp - 0x650]
mov edx, dword [ecx]
push edx
call fcn.00419850
add esp, 4
jmp 0x414257
lea eax, [ebp - 0x64c]
push eax
mov ecx, dword [ebp + 8]
push ecx
mov ecx, dword [ebp - 0x650]
call fcn.00413130
mov edx, dword [ebp - 0x440]
and edx, 0x10
je 0x414373
cmp dword [ebp + 0x14], 1
jne 0x4142ac
xor eax, eax
jmp 0x41475a
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x664], eax
mov ecx, 2
imul ecx, ecx, 0
mov edx, dword [ebp - 0x664]
movzx eax, word [edx + ecx]
cmp eax, 0x2f
je 0x41431c
mov ecx, 2
imul ecx, ecx, 0
mov edx, dword [ebp - 0x664]
movzx eax, word [edx + ecx]
cmp eax, 0x5c
je 0x41431c
mov ecx, 2
imul ecx, ecx, 0
mov edx, dword [ebp - 0x664]
movzx eax, word [edx + ecx]
test eax, eax
je 0x414310
mov ecx, 2
shl ecx, 0
mov edx, dword [ebp - 0x664]
movzx eax, word [edx + ecx]
cmp eax, 0x3a
je 0x41431c
mov dword [ebp - 0x67c], 0
jmp 0x414326
mov dword [ebp - 0x67c], 1
mov cl, byte [ebp - 0x67c]
mov byte [ebp - 0x656], cl
movzx edx, byte [ebp - 0x656]
test edx, edx
je 0x414350
mov eax, dword [ebp - 0x664]
push eax
push 0
call fcn.00412da0
add esp, 8
jmp 0x41436c
mov ecx, dword [ebp - 0x664]
push ecx
mov edx, dword [ebp - 0x650]
add edx, 0x244
push edx
call fcn.00412da0
add esp, 8
xor eax, eax
jmp 0x41475a
cmp dword [ebp + 0x14], 1
jne 0x414387
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x66c], eax
jmp 0x4145aa
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x670], ecx
mov edx, dword [ebp - 0x670]
mov dword [ebp - 0x660], edx
mov eax, dword [ebp - 0x660]
mov dword [ebp - 0x65c], eax
mov ecx, dword [ebp - 0x65c]
movzx edx, word [ecx]
test edx, edx
je 0x4143f1
mov eax, dword [ebp - 0x65c]
movzx ecx, word [eax]
cmp ecx, 0x2f
je 0x4143d1
mov edx, dword [ebp - 0x65c]
movzx eax, word [edx]
cmp eax, 0x5c
jne 0x4143e0
mov ecx, dword [ebp - 0x65c]
add ecx, 2
mov dword [ebp - 0x660], ecx
mov edx, dword [ebp - 0x65c]
add edx, 2
mov dword [ebp - 0x65c], edx
jmp 0x4143a8
mov eax, dword [ebp - 0x670]
push eax
lea ecx, [ebp - 0x20c]
push ecx
call fcn.0042087b
add esp, 8
mov edx, dword [ebp - 0x660]
cmp edx, dword [ebp - 0x670]
jne 0x414448
mov eax, 2
imul eax, eax, 0
mov dword [ebp - 0x684], eax
cmp dword [ebp - 0x684], 0x208
jae 0x414431
jmp 0x414436
call fcn.004205d8
xor ecx, ecx
mov edx, dword [ebp - 0x684]
mov word [ebp + edx - 0x20c], cx
jmp 0x414481
mov eax, dword [ebp - 0x660]
sub eax, dword [ebp - 0x670]
sar eax, 1
shl eax, 1
mov dword [ebp - 0x680], eax
cmp dword [ebp - 0x680], 0x208
jae 0x41446c
jmp 0x414471
call fcn.004205d8
xor ecx, ecx
mov edx, dword [ebp - 0x680]
mov word [ebp + edx - 0x20c], cx
mov eax, 2
imul eax, eax, 0
movzx ecx, word [ebp + eax - 0x20c]
cmp ecx, 0x2f
je 0x4144e0
mov edx, 2
imul edx, edx, 0
movzx eax, word [ebp + edx - 0x20c]
cmp eax, 0x5c
je 0x4144e0
mov ecx, 2
imul ecx, ecx, 0
movzx edx, word [ebp + ecx - 0x20c]
test edx, edx
je 0x4144d4
mov eax, 2
shl eax, 0
movzx ecx, word [ebp + eax - 0x20c]
cmp ecx, 0x3a
je 0x4144e0
mov dword [ebp - 0x678], 0
jmp 0x4144ea
mov dword [ebp - 0x678], 1
mov dl, byte [ebp - 0x678]
mov byte [ebp - 0x655], dl
movzx eax, byte [ebp - 0x655]
test eax, eax
je 0x414537
mov ecx, dword [ebp - 0x660]
push ecx
lea edx, [ebp - 0x20c]
push edx
push str._s_s
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
lea ecx, [ebp - 0x20c]
push ecx
push 0
call fcn.00412da0
add esp, 8
jmp 0x414583
mov edx, dword [ebp - 0x660]
push edx
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x650]
add ecx, 0x244
push ecx
push str._s_s_s
lea edx, [ebp - 0x414]
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x14
lea eax, [ebp - 0x20c]
push eax
mov ecx, dword [ebp - 0x650]
add ecx, 0x244
push ecx
call fcn.00412da0
add esp, 8
push 0
mov edx, dword [ebp - 0x440]
push edx
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x66c], eax
cmp dword [ebp - 0x66c], 0xffffffff
jne 0x4145bd
mov eax, 0x200
jmp 0x41475a
mov ecx, dword [ebp - 0x650]
mov edx, dword [ecx + 0x23c]
push edx
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.00419a40
add esp, 8
mov edx, dword [ebp - 0x650]
cmp dword [edx + 0x240], 0
jne 0x41460f
push 0x4000
call fcn.0041b7fe
add esp, 4
mov dword [ebp - 0x68c], eax
mov eax, dword [ebp - 0x650]
mov ecx, dword [ebp - 0x68c]
mov dword [eax + 0x240], ecx
mov dword [ebp - 0x654], 0
cmp dword [ebp - 0x654], 0
jne 0x4146f8
lea edx, [ebp - 0x415]
push edx
push 0x4000
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax + 0x240]
push ecx
mov edx, dword [ebp - 0x650]
mov eax, dword [edx]
push eax
call fcn.00419fc0
add esp, 0x10
mov dword [ebp - 0x668], eax
cmp dword [ebp - 0x668], 0xffffff96
jne 0x41466e
mov dword [ebp - 0x654], 0x1000
jmp 0x4146f8
cmp dword [ebp - 0x668], 0
jge 0x414683
mov dword [ebp - 0x654], 0x5000000
jmp 0x4146f8
cmp dword [ebp - 0x668], 0
jle 0x4146d1
push 0
lea ecx, [ebp - 0x41c]
push ecx
mov edx, dword [ebp - 0x668]
push edx
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax + 0x240]
push ecx
mov edx, dword [ebp - 0x66c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x688], eax
cmp dword [ebp - 0x688], 0
jne 0x4146d1
mov dword [ebp - 0x654], 0x400
jmp 0x4146f8
movzx eax, byte [ebp - 0x415]
test eax, eax
je 0x4146de
jmp 0x4146f8
cmp dword [ebp - 0x668], 0
jne 0x4146f3
mov dword [ebp - 0x654], 0x5000000
jmp 0x4146f8
jmp 0x414619
cmp dword [ebp - 0x654], 0
jne 0x414723
lea ecx, [ebp - 0x42c]
push ecx
lea edx, [ebp - 0x43c]
push edx
lea eax, [ebp - 0x434]
push eax
mov ecx, dword [ebp - 0x66c]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x414736
mov edx, dword [ebp - 0x66c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x650]
mov ecx, dword [eax]
push ecx
call fcn.004196d0
add esp, 4
cmp dword [ebp - 0x654], 0
je 0x414758
mov eax, dword [ebp - 0x654]
jmp 0x41475a
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0041e8d2
mov esp, ebp
pop ebp
ret 0x10