Function at 0x10019880
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x340
push ebx
mov ebx, dword [esp + 0x354]
push ebp
push esi
cmp ebx, 3
push edi
mov esi, ecx
je 0x100198bc
cmp ebx, 2
je 0x100199b9
cmp ebx, 1
je 0x100199b9
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
mov eax, dword [esi + 4]
mov edi, dword [esp + 0x354]
cmp edi, eax
je 0x10019934
cmp eax, 0xffffffff
je 0x100198da
mov eax, dword [esi]
push eax
call fcn.10019020
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jl 0x100198fa
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x10019908
push eax
call fcn.100188e0
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x1001991f
push eax
call fcn.10018930
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x1001990f
mov ecx, dword [esi + 0x138]
mov edx, dword [esi]
push ecx
push edx
call fcn.10018bb0
add esp, 8
mov dword [esi + 4], edi
mov ecx, dword [esp + 0x35c]
mov edx, dword [esp + 0x358]
lea eax, [esp + 0x13]
push eax
mov eax, dword [esi]
push ecx
push edx
push eax
call fcn.10018d60
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x1001996c
mov ecx, dword [esi]
push ecx
call fcn.10019020
add esp, 4
mov dword [esi + 4], 0xffffffff
mov al, byte [esp + 0x13]
test al, al
je 0x10019983
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x340
ret 0x10
test edi, edi
jle 0x10019999
pop edi
pop esi
pop ebp
mov eax, 0x600
pop ebx
add esp, 0x340
ret 0x10
mov eax, edi
pop edi
sub eax, 0xffffff96
pop esi
neg eax
sbb eax, eax
pop ebp
and eax, 0x4fff000
pop ebx
add eax, 0x1000
add esp, 0x340
ret 0x10
mov eax, dword [esi + 4]
or edi, 0xffffffff
cmp eax, edi
je 0x100199ce
mov edx, dword [esi]
push edx
call fcn.10019020
add esp, 4
mov eax, dword [esi]
mov dword [esi + 4], edi
mov edi, dword [esp + 0x354]
cmp edi, dword [eax + 4]
jl 0x100199f1
pop edi
pop esi
pop ebp
mov eax, 0x10000
pop ebx
add esp, 0x340
ret 0x10
cmp edi, dword [eax + 0x10]
jge 0x100199ff
push eax
call fcn.100188e0
add esp, 4
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jge 0x10019a16
push eax
call fcn.10018930
mov eax, dword [esi]
add esp, 4
cmp dword [eax + 0x10], edi
jl 0x10019a06
lea eax, [esp + 0x120]
mov ecx, esi
push eax
push edi
call fcn.100191d0
mov ecx, dword [esp + 0x228]
shr ecx, 4
test cl, 1
je 0x10019a9d
cmp ebx, 1
jne 0x10019a49
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x340
ret 0x10
mov ecx, dword [esp + 0x358]
mov al, byte [ecx]
cmp al, 0x2f
je 0x10019a64
cmp al, 0x5c
je 0x10019a64
test al, al
je 0x10019a7e
cmp byte [ecx + 1], 0x3a
jne 0x10019a7e
push ecx
push 0
call fcn.10019720
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10
add esi, 0x140
push ecx
push esi
call fcn.10019720
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10
cmp ebx, 1
mov byte [esp + 0x24c], 0
jne 0x10019ab6
mov ebp, dword [esp + 0x358]
jmp 0x10019b48
mov edi, dword [esp + 0x358]
mov ebx, edi
mov ecx, edi
mov al, byte [edi]
test al, al
je 0x10019ada
cmp al, 0x2f
je 0x10019acf
cmp al, 0x5c
jne 0x10019ad2
lea ebx, [ecx + 1]
mov al, byte [ecx + 1]
inc ecx
test al, al
jne 0x10019ac7
push 0x104
lea edx, [esp + 0x20]
push edi
push edx
call sub.MSVCRT.dll__mbsnbcpy
add esp, 0xc
cmp ebx, edi
jne 0x10019b5f
mov byte [esp + 0x1c], 0
lea ecx, [esp + 0x1c]
lea edi, [esi + 0x140]
push ebx
push ecx
push edi
lea edx, [esp + 0x258]
push str._s_s_s
push edx
call sub.MSVCRT.dll_sprintf
lea eax, [esp + 0x30]
push eax
push edi
call fcn.10019720
add esp, 0x1c
mov ecx, dword [esp + 0x228]
push 0
push ecx
push 2
push 0
push 0
lea edx, [esp + 0x260]
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
jne 0x10019bb3
pop edi
pop esi
pop ebp
mov eax, 0x200
pop ebx
add esp, 0x340
ret 0x10
mov eax, ebx
sub eax, edi
mov byte [esp + eax + 0x1c], 0
mov al, byte [esp + 0x1c]
cmp al, 0x2f
je 0x10019b87
cmp al, 0x5c
je 0x10019b87
test al, al
je 0x10019af6
cmp byte [esp + 0x1d], 0x3a
jne 0x10019af6
lea ecx, [esp + 0x1c]
push ebx
push ecx
lea edx, [esp + 0x254]
push 0x1002c384
push edx
call sub.MSVCRT.dll_sprintf
lea eax, [esp + 0x2c]
push eax
push 0
call fcn.10019720
add esp, 0x18
jmp 0x10019b23
mov eax, dword [esi + 0x138]
mov ecx, dword [esi]
push eax
push ecx
call fcn.10018bb0
mov eax, dword [esi + 0x13c]
add esp, 8
test eax, eax
jne 0x10019be2
push 0x4000
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esi + 0x13c], eax
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x14], 0
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi]
lea edx, [esp + 0x13]
push edx
push 0x4000
push eax
push ecx
call fcn.10018d60
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x10019c3d
test edi, edi
jl 0x10019c51
jle 0x10019c2f
mov eax, dword [esi + 0x13c]
lea edx, [esp + 0x18]
push 0
push edx
push edi
push eax
push ebp
call ebx
test eax, eax
je 0x10019c47
mov al, byte [esp + 0x13]
test al, al
jne 0x10019c59
test edi, edi
je 0x10019c51
jmp 0x10019bf0
mov dword [esp + 0x14], 0x1000
jmp 0x10019c59
mov dword [esp + 0x14], 0x400
jmp 0x10019c59
mov dword [esp + 0x14], 0x5000000
mov ecx, dword [esi]
push ecx
call fcn.10019020
mov esi, dword [esp + 0x18]
add esp, 4
test esi, esi
jne 0x10019c8b
lea edx, [esp + 0x23c]
lea eax, [esp + 0x22c]
push edx
lea ecx, [esp + 0x238]
push eax
push ecx
push ebp
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [esp + 0x360], 1
je 0x10019c9c
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x340
ret 0x10