Function at 0x413b1b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4334
call fcn.00432710
push ebx
mov ebx, dword [ebp + 0x14]
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x413b4c
cmp ebx, 2
je 0x413bd0
cmp ebx, 1
je 0x413bd0
jmp 0x413bec
mov eax, dword [esi + 4]
mov edi, dword [ebp + 8]
cmp edi, eax
je 0x413b94
cmp eax, 0xffffffff
je 0x413b63
push dword [esi]
call fcn.004134c4
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x413bec
cmp edi, dword [eax + 0x10]
jge 0x413b7a
push eax
call fcn.00412ebb
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x413b89
push eax
call fcn.00412ef9
jmp 0x413b79
push dword [esi]
call fcn.004131d0
pop ecx
mov dword [esi + 4], edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi]
call fcn.004132b8
mov edi, eax
add esp, 0xc
test edi, edi
jle 0x413bb4
mov eax, 0x600
jmp 0x413e0b
push dword [esi]
call fcn.004134c4
or dword [esi + 4], 0xffffffff
mov eax, edi
neg eax
sbb eax, eax
pop ecx
and eax, 0x5000000
jmp 0x413e0b
cmp dword [esi + 4], 0xffffffff
je 0x413bde
push dword [esi]
call fcn.004134c4
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 8]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x413bf6
mov eax, 0x10000
jmp 0x413e0b
cmp edi, dword [eax + 0x10]
jge 0x413c02
push eax
call fcn.00412ebb
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x413c11
push eax
call fcn.00412ef9
jmp 0x413c01
lea eax, [ebp - 0x12c]
mov ecx, esi
push eax
push edi
call fcn.0041368f
test byte [ebp - 0x24], 0x10
je 0x413c62
cmp ebx, 1
je 0x413e02
lea eax, [ebp - 0x334]
push 0x103
push eax
lea eax, [ebp - 0x128]
push eax
call fcn.00413e12
lea eax, [ebp - 0x334]
add esi, 0x138
push eax
push esi
call fcn.00413a75
add esp, 0x14
jmp 0x413e02
cmp ebx, 1
jne 0x413c6f
mov eax, dword [ebp + 0xc]
jmp 0x413d4e
mov ebx, dword [ebp + 0xc]
mov edi, ebx
mov ecx, ebx
mov ax, word [ebx]
test ax, ax
je 0x413d38
cmp ax, 0x2f
je 0x413c8e
cmp ax, 0x5c
jne 0x413c91
lea edi, [ecx + 2]
inc ecx
inc ecx
mov ax, word [ecx]
test ax, ax
jne 0x413c82
cmp edi, ebx
je 0x413d38
lea eax, [ebp - 0x334]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_wcscpy]
sub edi, ebx
pop ecx
sar edi, 1
pop ecx
and word [ebp + edi*2 - 0x336], 0
cmp word [ebp - 0x334], 0x2f
je 0x413ce4
cmp word [ebp - 0x334], 0x5c
je 0x413ce4
cmp word [ebp - 0x332], 0x3a
je 0x413ce4
and byte [ebp + 0xf], 0
jmp 0x413ce8
mov byte [ebp + 0xf], 1
mov edi, dword [sym.imp.MSVCRT.dll_wcsstr]
lea eax, [ebp - 0x334]
push 0x43f844
push eax
call edi
mov dword [ebp + 8], eax
lea eax, [ebp - 0x334]
push 0x43f83c
push eax
call edi
add esp, 0x10
test eax, eax
setne al
cmp dword [ebp + 8], 0
setne cl
or al, cl
or al, byte [ebp + 0xf]
jne 0x413d38
lea eax, [ebp - 0x334]
push eax
lea eax, [esi + 0x138]
push eax
call fcn.00413a75
pop ecx
pop ecx
xor eax, eax
push eax
push dword [ebp - 0x24]
push 2
push eax
push eax
push 0x40000000
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0xc], eax
jne 0x413d60
mov eax, 0x200
jmp 0x413e0b
push dword [esi]
call fcn.004131d0
mov edi, 0x4000
lea eax, [ebp - 0x4334]
push edi
push eax
push dword [esi]
xor bl, bl
call fcn.004132b8
add esp, 0x10
test eax, eax
jl 0x413db5
je 0x413db7
lea ecx, [ebp + 8]
push 0
push ecx
push eax
lea eax, [ebp - 0x4334]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x413db5
lea eax, [ebp - 0x4334]
push edi
push eax
push dword [esi]
call fcn.004132b8
add esp, 0xc
jmp 0x413d80
mov bl, 1
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x413dde
test bl, bl
jne 0x413dde
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x14], 1
je 0x413ded
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esi]
call fcn.004134c4
test eax, eax
setl al
test bl, bl
pop ecx
jne 0x413e06
test al, al
jne 0x413e06
xor eax, eax
jmp 0x413e0b
mov eax, 0x400
pop edi
pop esi
pop ebx
leave
ret 0x10