Function at 0x1008f740
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1016fca8
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101f6008]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x3c], edi
mov ebx, dword [ebp + 0xc]
mov edx, 0x24687531
push 4
mov ecx, ebx
mov dword [ebp - 0x30], ebx
call fcn.1008fb80
add esp, 4
test al, al
je 0x1008fa27
mov esi, dword [edi + 0xc]
mov ecx, ebx
push 4
cmp esi, 0xffffffff
jb 0x1008f7b2
or edx, 0xffffffff
call fcn.1008fb80
add esp, 4
test al, al
je 0x1008fa27
push 8
mov ecx, ebx
mov edx, esi
call fcn.1008fb80
add esp, 4
test al, al
je 0x1008fa27
mov edx, dword [edi + 0x10]
mov ecx, ebx
call fcn.1008fb30
test al, al
je 0x1008fa27
mov esi, dword [edi]
mov edi, dword [edi + 4]
mov dword [ebp - 0x34], esi
cmp esi, edi
je 0x1008f864
movzx edx, word [esi + 4]
xor edi, edi
mov dword [ebp - 0x38], edx
nop
mov eax, 1
sub eax, edi
cmp eax, 2
jb 0x1008f802
mov byte [ebp - 0x11], 0
jmp 0x1008f814
mov ecx, 1
mov eax, edx
sub ecx, edi
shl cl, 3
shr ax, cl
mov byte [ebp - 0x11], al
push ebx
push 1
lea eax, [ebp - 0x11]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa27
mov edx, dword [ebp - 0x38]
inc edi
cmp edi, 2
jb 0x1008f7f0
push ebx
push eax
lea eax, [esi + 6]
push 6
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa27
mov eax, dword [ebp - 0x3c]
add esi, 0xc
mov edi, dword [eax + 4]
cmp esi, edi
jne 0x1008f7e6
mov esi, dword [eax]
mov dword [ebp - 0x34], esi
mov eax, dword [ebp - 0x34]
xor ebx, ebx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], esi
cmp eax, edi
je 0x1008f892
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], eax
call fcn.1008d800
mov eax, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx + 4]
cmp eax, dword [edx]
jne 0x1008f8b4
cmp edi, ecx
jne 0x1008f8b4
cmp esi, ecx
jne 0x1008f8b4
cmp esi, edi
je 0x1008fa14
test ebx, ebx
je 0x1008fa14
cmp dword [ebp - 0x30], 0
je 0x1008fa27
cmp dword [ebx + 0x10], 0
je 0x1008fa27
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x1008fa27
cmp dword [eax], 0x66706331
jne 0x1008fa27
add eax, 4
mov dword [ebp - 0x40], eax
cmp dword [eax], 0x28
jne 0x1008fa27
push ebx
lea ecx, [ebp - 0x2c]
call fcn.100084d0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.100e0a00
push dword [ebp - 0x30]
cmp dword [ebp - 0x18], 8
lea eax, [ebp - 0x2c]
push 1
cmovae eax, dword [ebp - 0x2c]
push 0x40
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
push dword [ebp - 0x30]
push eax
push 4
push dword [ebp - 0x38]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
push dword [ebp - 0x30]
push eax
push 4
push dword [ebp - 0x40]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
push dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x38]
add eax, 8
push 0x10
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
push dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x38]
add eax, 0x18
push 8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
push dword [ebp - 0x30]
push eax
mov eax, dword [ebp - 0x38]
add eax, 0x20
push 8
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x1008fa18
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10006730
movzx eax, word [esi + 4]
add ebx, 0x1c
lea ecx, [eax*8]
sub ecx, eax
mov eax, dword [esi]
lea eax, [eax + ecx*4]
cmp ebx, eax
mov eax, dword [ebp - 0x34]
jne 0x1008f892
mov eax, dword [ebp - 0x34]
add esi, 0xc
cmp esi, edi
je 0x1008f892
movzx eax, word [esi + 4]
mov ebx, dword [esi]
lea ecx, [eax*8]
sub ecx, eax
lea eax, [ebx + ecx*4]
cmp ebx, eax
je 0x1008f9e8
mov eax, dword [ebp - 0x34]
jmp 0x1008f892
mov al, 1
jmp 0x1008fa29
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10006730
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10144424
mov esp, ebp
pop ebp
ret 8