Function at 0x10013f00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x350
mov eax, dword [0x1012e750]
xor eax, esp
mov dword [esp + 0x34c], eax
push ebx
mov ebx, dword [esp + 0x35c]
push ebp
push esi
push edi
mov edi, ecx
mov ecx, dword [esp + 0x370]
cmp ecx, 3
je 0x10013f3b
cmp ecx, 2
je 0x10013f3b
cmp ecx, 1
jne 0x1001408c
mov eax, dword [edi + 4]
cmp ecx, 3
jne 0x10014068
mov ebp, dword [esp + 0x364]
cmp ebp, eax
je 0x10013ff9
cmp eax, 0xffffffff
je 0x10013f65
push dword [edi]
call fcn.10012360
add esp, 4
mov eax, dword [edi]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [eax + 4]
jge 0x1001408c
cmp dword [eax + 0x10], ebp
jle 0x10013f8a
push eax
call fcn.10012310
mov eax, dword [edi]
add esp, 4
cmp dword [eax + 0x10], ebp
jge 0x10013fe7
mov esi, eax
nop
mov eax, esi
test esi, esi
je 0x10013fe0
cmp dword [esi + 0x18], 0
je 0x10013fe0
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x10013fe0
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.100127b0
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
mov esi, eax
cmp dword [eax + 0x10], ebp
jl 0x10013f90
push dword [edi + 0x138]
push eax
call fcn.10013040
add esp, 8
mov dword [edi + 4], ebp
lea eax, [esp + 0x13]
push eax
push dword [esp + 0x370]
push ebx
push dword [edi]
call fcn.10013210
mov esi, eax
add esp, 0x10
test esi, esi
jg 0x10014027
push dword [edi]
call fcn.10012360
add esp, 4
mov dword [edi + 4], 0xffffffff
cmp byte [esp + 0x13], 0
jne 0x10014189
test esi, esi
jle 0x10014056
mov eax, 0x600
mov ecx, dword [esp + 0x35c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.1002ca58
add esp, 0x350
ret 0x10
cmp esi, 0xffffff96
mov eax, 0x5000000
mov ecx, 0x1000
cmove eax, ecx
jmp 0x1001403b
cmp eax, 0xffffffff
je 0x10014077
push dword [edi]
call fcn.10012360
add esp, 4
mov esi, dword [edi]
mov ebp, dword [esp + 0x364]
mov dword [edi + 4], 0xffffffff
cmp ebp, dword [esi + 4]
jl 0x10014093
mov eax, 0x10000
jmp 0x1001403b
cmp dword [esi + 0x10], ebp
jle 0x100140d7
mov ecx, esi
test ecx, ecx
je 0x100140d4
mov eax, dword [ecx + 0x24]
push 0
push 0
push 0
push 0
push 0
mov dword [ecx + 0x14], eax
lea eax, [ecx + 0x78]
push 0
push eax
lea eax, [ecx + 0x28]
mov dword [ecx + 0x10], 0
push eax
push ecx
call fcn.100127b0
add esp, 0x24
mov ecx, esi
neg eax
sbb eax, eax
inc eax
mov dword [ecx + 0x18], eax
mov esi, dword [edi]
cmp dword [esi + 0x10], ebp
jge 0x10014137
nop dword [eax]
mov eax, esi
test esi, esi
je 0x10014130
cmp dword [esi + 0x18], 0
je 0x10014130
mov edx, dword [esi + 0x10]
inc edx
cmp edx, dword [esi + 4]
je 0x10014130
mov ecx, dword [esi + 0x50]
mov eax, dword [esi + 0x48]
add ecx, 0x2e
add ecx, dword [esi + 0x4c]
push 0
push 0
push 0
push 0
add eax, ecx
mov dword [esi + 0x10], edx
add dword [esi + 0x14], eax
lea eax, [esi + 0x78]
push 0
push 0
push eax
lea eax, [esi + 0x28]
push eax
push esi
call fcn.100127b0
add esp, 0x24
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x18], eax
mov eax, dword [edi]
mov esi, eax
cmp dword [eax + 0x10], ebp
jl 0x100140e0
lea eax, [esp + 0x18]
mov ecx, edi
push eax
push ebp
call fcn.100137e0
test byte [esp + 0x120], 0x10
je 0x10014190
cmp dword [esp + 0x370], 1
je 0x10014189
mov al, byte [ebx]
cmp al, 0x2f
je 0x10014170
cmp al, 0x5c
je 0x10014170
test al, al
je 0x1001416c
cmp byte [ebx + 1], 0x3a
je 0x10014170
xor dl, dl
jmp 0x10014172
mov dl, 1
xor ecx, ecx
lea eax, [edi + 0x140]
test dl, dl
push ebx
cmove ecx, eax
push ecx
call fcn.10014500
add esp, 8
xor eax, eax
jmp 0x1001403b
cmp dword [esp + 0x370], 1
je 0x100142d5
mov al, byte [ebx]
mov edx, ebx
mov ecx, ebx
test al, al
je 0x100141bb
cmp al, 0x2f
je 0x100141b0
cmp al, 0x5c
jne 0x100141b3
lea edx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x100141a8
lea esi, [esp + 0x154]
mov ecx, ebx
sub esi, ebx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x100141c6
cmp edx, ebx
jne 0x100141e0
mov byte [esp + 0x154], al
jmp 0x1001421a
mov eax, edx
sub eax, ebx
cmp eax, 0x104
jae 0x100143b3
mov byte [esp + eax + 0x154], 0
mov al, byte [esp + 0x154]
cmp al, 0x2f
je 0x10014218
cmp al, 0x5c
je 0x10014218
test al, al
je 0x10014214
cmp byte [esp + 0x155], 0x3a
je 0x10014218
xor al, al
jmp 0x1001421a
mov al, 1
test al, al
mov dword [esp + 0x144], 0x73257325
push edx
lea eax, [esp + 0x158]
mov byte [esp + 0x14c], 0
mov word [esp + 0x150], 0x7325
mov dword [esp + 0x153], 0x732573
mov byte [esp + 0x152], 0x25
push eax
je 0x1001427a
lea eax, [esp + 0x14c]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x268]
push 0x104
push eax
call fcn.10019460
add esp, 0x18
xor esi, esi
jmp 0x100142a0
lea esi, [edi + 0x140]
push esi
lea eax, [esp + 0x158]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x26c]
push 0x104
push eax
call fcn.10019460
add esp, 0x1c
lea eax, [esp + 0x154]
push eax
push esi
call fcn.10014500
add esp, 8
lea eax, [esp + 0x258]
push 0
push dword [esp + 0x124]
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x100142e4
mov eax, 0x200
jmp 0x1001403b
push dword [edi + 0x138]
push dword [edi]
call fcn.10013040
add esp, 8
cmp dword [edi + 0x13c], 0
jne 0x10014310
push 0x4000
call fcn.1002ca8e
add esp, 4
mov dword [edi + 0x13c], eax
xor ebp, ebp
lea eax, [esp + 0x13]
push eax
push 0x4000
push dword [edi + 0x13c]
push dword [edi]
call fcn.10013210
mov esi, eax
add esp, 0x10
cmp esi, 0xffffff96
je 0x1001438c
test esi, esi
js 0x1001435d
jle 0x10014352
push 0
lea eax, [esp + 0x18]
push eax
push esi
push dword [edi + 0x13c]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x10014364
cmp byte [esp + 0x13], 0
jne 0x1001436b
test esi, esi
jne 0x10014312
mov ebp, 0x5000000
jmp 0x10014391
mov ebp, 0x400
jmp 0x10014391
lea eax, [esp + 0x134]
push eax
lea eax, [esp + 0x128]
push eax
lea eax, [esp + 0x134]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x10014391
mov ebp, 0x1000
cmp dword [esp + 0x370], 1
je 0x100143a2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [edi]
call fcn.10012360
add esp, 4
mov eax, ebp
jmp 0x1001403b
call fcn.1002cbbe
int3