Function at 0x414960
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x344
mov eax, dword [0x58deec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, ecx
cmp eax, 3
je 0x4149ad
cmp eax, 2
je 0x414a93
cmp eax, 1
je 0x414a93
pop edi
pop esi
mov eax, 0x10000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x414a17
cmp eax, 0xffffffff
je 0x4149c7
mov eax, dword [esi]
push eax
call fcn.00412600
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x414995
cmp edi, dword [eax + 0x10]
jge 0x4149e3
push eax
call fcn.00412370
add esp, 4
mov ecx, dword [esi]
cmp dword [ecx + 0x10], edi
jge 0x414a02
lea ebx, [ebx]
mov edx, dword [esi]
push edx
call fcn.004123c0
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x4149f0
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.004144a0
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [ebp + 0x10]
mov edx, dword [esi]
lea eax, [ebp - 0x339]
push eax
push ecx
push ebx
push edx
call fcn.00414620
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x414a46
mov eax, dword [esi]
push eax
call fcn.00412600
add esp, 4
mov dword [esi + 4], 0xffffffff
cmp byte [ebp - 0x339], 0
jne 0x414b44
test edi, edi
jle 0x414a6f
pop edi
pop esi
mov eax, 0x600
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
lea eax, [edi + 0x6a]
neg eax
sbb eax, eax
pop edi
and eax, 0x4fff000
pop esi
add eax, 0x1000
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
or edi, 0xffffffff
cmp dword [esi + 4], edi
je 0x414aa6
mov ecx, dword [esi]
push ecx
call fcn.00412600
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [ebp + 8]
cmp edi, dword [eax + 4]
jge 0x414995
cmp edi, dword [eax + 0x10]
jge 0x414ac5
push eax
call fcn.00412370
add esp, 4
mov edx, dword [esi]
cmp dword [edx + 0x10], edi
jge 0x414ae2
lea esp, [esp]
mov eax, dword [esi]
push eax
call fcn.004123c0
mov ecx, dword [esi]
add esp, 4
cmp dword [ecx + 0x10], edi
jl 0x414ad0
lea edx, [ebp - 0x338]
push edx
push edi
mov ecx, esi
call fcn.004127d0
test byte [ebp - 0x230], 0x10
je 0x414b59
cmp dword [ebp + 0x14], 1
je 0x414b44
mov al, byte [ebx]
cmp al, 0x2f
je 0x414b14
cmp al, 0x5c
je 0x414b14
test al, al
je 0x414b34
cmp byte [ebx + 1], 0x3a
jne 0x414b34
push ebx
push 0
call fcn.00412d90
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
push ebx
add esi, 0x140
push esi
call fcn.00412d90
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
cmp dword [ebp + 0x14], 1
je 0x414bf8
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
test al, al
je 0x414b83
lea ecx, [ecx]
cmp al, 0x2f
je 0x414b78
cmp al, 0x5c
jne 0x414b7b
lea edi, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x414b70
lea edx, [ebp - 0x108]
mov eax, ebx
sub edx, ebx
lea ecx, [ecx]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x414b90
cmp edi, ebx
jne 0x414c15
mov byte [ebp - 0x108], cl
push edi
lea ecx, [ebp - 0x108]
push ecx
lea ebx, [esi + 0x140]
push ebx
lea edx, [ebp - 0x20c]
push str._s_s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push ebx
call fcn.00412d90
add esp, 0x1c
mov ecx, dword [ebp - 0x230]
push 0
push ecx
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x414c74
pop edi
pop esi
mov eax, 0x200
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10
mov eax, edi
sub eax, ebx
mov byte [ebp + eax - 0x108], 0
mov al, byte [ebp - 0x108]
cmp al, 0x2f
je 0x414c44
cmp al, 0x5c
je 0x414c44
test al, al
je 0x414ba4
cmp byte [ebp - 0x107], 0x3a
jne 0x414ba4
push edi
lea ecx, [ebp - 0x108]
push ecx
lea edx, [ebp - 0x20c]
push str._s_s
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
lea eax, [ebp - 0x108]
push eax
push 0
call fcn.00412d90
add esp, 0x18
jmp 0x414bd5
mov eax, dword [esi + 0x138]
mov ecx, dword [esi]
push eax
push ecx
call fcn.004144a0
add esp, 8
cmp dword [esi + 0x13c], 0
jne 0x414ca2
push 0x4000
call fcn.00415021
add esp, 4
mov dword [esi + 0x13c], eax
mov dword [ebp - 0x340], 0
lea esp, [esp]
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi]
lea edx, [ebp - 0x339]
push edx
push 0x4000
push eax
push ecx
call fcn.00414620
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x414d10
test edi, edi
js 0x414d04
jle 0x414cf7
mov eax, dword [esi + 0x13c]
push 0
lea edx, [ebp - 0x344]
push edx
push edi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x414d1c
cmp byte [ebp - 0x339], 0
jne 0x414d28
test edi, edi
jne 0x414cb0
mov dword [ebp - 0x340], 0x5000000
jmp 0x414d44
mov dword [ebp - 0x340], 0x1000
jmp 0x414d44
mov dword [ebp - 0x340], 0x400
jmp 0x414d44
lea ecx, [ebp - 0x21c]
push ecx
lea edx, [ebp - 0x22c]
push edx
lea eax, [ebp - 0x224]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x414d51
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi]
push ecx
call fcn.00412600
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x340]
add esp, 4
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005156a7
mov esp, ebp
pop ebp
ret 0x10