Function at 0x1000ba65
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2c8]
sub esp, 0x348
mov eax, dword [0x1002b0a0]
xor eax, ebp
mov dword [ebp + 0x2c4], eax
cmp dword [ebp + 0x2dc], 3
push ebx
mov ebx, dword [ebp + 0x2d4]
push esi
push edi
mov esi, ecx
je 0x1000bab8
cmp dword [ebp + 0x2dc], 2
je 0x1000bb64
cmp dword [ebp + 0x2dc], 1
je 0x1000bb64
mov eax, 0x10000
jmp 0x1000bdd1
mov eax, dword [esi + 4]
mov edi, dword [ebp + 0x2d0]
cmp edi, eax
je 0x1000bb0a
cmp eax, 0xffffffff
je 0x1000bad2
push dword [esi]
call fcn.10009d73
pop ecx
mov eax, dword [esi]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x1000baae
cmp edi, dword [eax + 0x10]
jge 0x1000baf2
push eax
call fcn.10009b35
jmp 0x1000baf1
push dword [esi]
call fcn.10009b73
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x1000baea
push dword [esi + 0x138]
push eax
call fcn.1000b631
pop ecx
pop ecx
mov dword [esi + 4], edi
lea eax, [ebp - 0x71]
push eax
push dword [ebp + 0x2d8]
push ebx
push dword [esi]
call fcn.1000b790
mov edi, eax
add esp, 0x10
test edi, edi
jg 0x1000bb31
push dword [esi]
call fcn.10009d73
or dword [esi + 4], 0xffffffff
pop ecx
cmp byte [ebp - 0x71], 0
je 0x1000bb3e
xor eax, eax
jmp 0x1000bdd1
test edi, edi
jle 0x1000bb4c
mov eax, 0x600
jmp 0x1000bdd1
xor eax, eax
cmp edi, 0xffffff96
setne al
dec eax
and eax, 0xfb001000
add eax, 0x5000000
jmp 0x1000bdd1
cmp dword [esi + 4], 0xffffffff
je 0x1000bb72
push dword [esi]
call fcn.10009d73
pop ecx
mov eax, dword [esi]
mov edi, dword [ebp + 0x2d0]
or dword [esi + 4], 0xffffffff
cmp edi, dword [eax + 4]
jge 0x1000baae
cmp edi, dword [eax + 0x10]
jge 0x1000bb9c
push eax
call fcn.10009b35
jmp 0x1000bb9b
push dword [esi]
call fcn.10009b73
pop ecx
mov eax, dword [esi]
cmp dword [eax + 0x10], edi
jl 0x1000bb94
lea eax, [ebp - 0x70]
push eax
push edi
mov ecx, esi
call fcn.10009e56
mov eax, dword [ebp + 0x98]
shr eax, 4
test al, 1
je 0x1000bbf6
cmp dword [ebp + 0x2dc], 1
je 0x1000bb37
mov al, byte [ebx]
cmp al, 0x2f
je 0x1000bbdd
cmp al, 0x5c
je 0x1000bbdd
test al, al
je 0x1000bbe2
cmp byte [ebx + 1], 0x3a
jne 0x1000bbe2
push ebx
push 0
jmp 0x1000bbea
push ebx
add esi, 0x140
push esi
call fcn.1000a2cb
pop ecx
pop ecx
jmp 0x1000bb37
cmp dword [ebp + 0x2dc], 1
mov byte [ebp + 0xbc], 0
jne 0x1000bc0e
mov dword [ebp - 0x7c], ebx
jmp 0x1000bc9a
mov al, byte [ebx]
mov edi, ebx
mov ecx, ebx
jmp 0x1000bc24
cmp al, 0x2f
je 0x1000bc1e
cmp al, 0x5c
jne 0x1000bc21
lea edi, [ecx + 1]
inc ecx
mov al, byte [ecx]
test al, al
jne 0x1000bc16
push 0x104
lea eax, [ebp + 0x1c0]
push ebx
push eax
call fcn.100137ac
add esp, 0xc
cmp edi, ebx
jne 0x1000bcaa
mov byte [ebp + 0x1c0], 0
push edi
lea eax, [ebp + 0x1c0]
push eax
lea ebx, [esi + 0x140]
push ebx
lea eax, [ebp + 0xbc]
push str._s_s_s
push eax
call fcn.100118df
lea eax, [ebp + 0x1c0]
push eax
push ebx
call fcn.1000a2cb
add esp, 0x1c
xor eax, eax
push eax
push dword [ebp + 0x98]
push 2
push eax
push eax
push 0x40000000
lea eax, [ebp + 0xbc]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x7c], 0xffffffff
jne 0x1000bd11
mov eax, 0x200
jmp 0x1000bdd1
mov eax, edi
sub eax, ebx
mov byte [ebp + eax + 0x1c0], 0
cmp byte [ebp + 0x1c0], 0x2f
je 0x1000bce2
cmp byte [ebp + 0x1c0], 0x5c
je 0x1000bce2
cmp byte [ebp + 0x1c0], 0
je 0x1000bc48
cmp byte [ebp + 0x1c1], 0x3a
jne 0x1000bc48
push edi
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp + 0xbc]
push str._s_s
push eax
call fcn.100118df
lea eax, [ebp + 0x1c0]
push eax
push 0
call fcn.1000a2cb
add esp, 0x18
jmp 0x1000bc78
push dword [esi + 0x138]
push dword [esi]
call fcn.1000b631
cmp dword [esi + 0x13c], 0
pop ecx
pop ecx
mov ebx, 0x4000
jne 0x1000bd3b
push ebx
call fcn.100139fe
pop ecx
mov dword [esi + 0x13c], eax
and dword [ebp - 0x78], 0
lea eax, [ebp - 0x71]
push eax
push ebx
push dword [esi + 0x13c]
push dword [esi]
call fcn.1000b790
mov edi, eax
add esp, 0x10
cmp edi, 0xffffff96
je 0x1000bdeb
test edi, edi
jl 0x1000bd89
jle 0x1000bd7f
push 0
lea eax, [ebp - 0x80]
push eax
push edi
push dword [esi + 0x13c]
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1000bdf4
cmp byte [ebp - 0x71], 0
jne 0x1000bd90
test edi, edi
jne 0x1000bd3f
mov dword [ebp - 0x78], 0x5000000
push dword [esi]
call fcn.10009d73
cmp dword [ebp - 0x78], 0
pop ecx
jne 0x1000bdbc
lea eax, [ebp + 0xac]
push eax
lea eax, [ebp + 0x9c]
push eax
lea eax, [ebp + 0xa4]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [ebp + 0x2dc], 1
je 0x1000bdce
push dword [ebp - 0x7c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp + 0x2c4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10011586
add ebp, 0x2c8
leave
ret 0x10
mov dword [ebp - 0x78], 0x1000
jmp 0x1000bd90
mov dword [ebp - 0x78], 0x400
jmp 0x1000bd90