Function at 0x1008f5d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10171898
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101f8008]
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.1008fa10
add esp, 4
test al, al
je 0x1008f8b7
mov esi, dword [edi + 0xc]
mov ecx, ebx
push 4
cmp esi, 0xffffffff
jb 0x1008f642
or edx, 0xffffffff
call fcn.1008fa10
add esp, 4
test al, al
je 0x1008f8b7
push 8
mov ecx, ebx
mov edx, esi
call fcn.1008fa10
add esp, 4
test al, al
je 0x1008f8b7
mov edx, dword [edi + 0x10]
mov ecx, ebx
call fcn.1008f9c0
test al, al
je 0x1008f8b7
mov esi, dword [edi]
mov edi, dword [edi + 4]
mov dword [ebp - 0x34], esi
cmp esi, edi
je 0x1008f6f4
movzx edx, word [esi + 4]
xor edi, edi
mov dword [ebp - 0x38], edx
nop
mov eax, 1
sub eax, edi
cmp eax, 2
jb 0x1008f692
mov byte [ebp - 0x11], 0
jmp 0x1008f6a4
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 0x1008f8b7
mov edx, dword [ebp - 0x38]
inc edi
cmp edi, 2
jb 0x1008f680
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 0x1008f8b7
mov eax, dword [ebp - 0x3c]
add esi, 0xc
mov edi, dword [eax + 4]
cmp esi, edi
jne 0x1008f676
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 0x1008f722
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], eax
call fcn.1008d690
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 0x1008f744
cmp edi, ecx
jne 0x1008f744
cmp esi, ecx
jne 0x1008f744
cmp esi, edi
je 0x1008f8a4
test ebx, ebx
je 0x1008f8a4
cmp dword [ebp - 0x30], 0
je 0x1008f8b7
cmp dword [ebx + 0x10], 0
je 0x1008f8b7
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x1008f8b7
cmp dword [eax], 0x66706331
jne 0x1008f8b7
add eax, 4
mov dword [ebp - 0x40], eax
cmp dword [eax], 0x28
jne 0x1008f8b7
push ebx
lea ecx, [ebp - 0x2c]
call fcn.100084d0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.100e2600
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 0x1008f8a8
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 0x1008f8a8
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 0x1008f8a8
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 0x1008f8a8
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 0x1008f8a8
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 0x1008f8a8
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 0x1008f722
mov eax, dword [ebp - 0x34]
add esi, 0xc
cmp esi, edi
je 0x1008f722
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 0x1008f878
mov eax, dword [ebp - 0x34]
jmp 0x1008f722
mov al, 1
jmp 0x1008f8b9
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.10146054
mov esp, ebp
pop ebp
ret 8