Function at 0x10091570
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10173b88
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, dword [0x101fb008]
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.100919b0
add esp, 4
test al, al
je 0x10091857
mov esi, dword [edi + 0xc]
mov ecx, ebx
push 4
cmp esi, 0xffffffff
jb 0x100915e2
or edx, 0xffffffff
call fcn.100919b0
add esp, 4
test al, al
je 0x10091857
push 8
mov ecx, ebx
mov edx, esi
call fcn.100919b0
add esp, 4
test al, al
je 0x10091857
mov edx, dword [edi + 0x10]
mov ecx, ebx
call fcn.10091960
test al, al
je 0x10091857
mov esi, dword [edi]
mov edi, dword [edi + 4]
mov dword [ebp - 0x34], esi
cmp esi, edi
je 0x10091694
movzx edx, word [esi + 4]
xor edi, edi
mov dword [ebp - 0x38], edx
nop
mov eax, 1
sub eax, edi
cmp eax, 2
jb 0x10091632
mov byte [ebp - 0x11], 0
jmp 0x10091644
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 0x10091857
mov edx, dword [ebp - 0x38]
inc edi
cmp edi, 2
jb 0x10091620
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 0x10091857
mov eax, dword [ebp - 0x3c]
add esi, 0xc
mov edi, dword [eax + 4]
cmp esi, edi
jne 0x10091616
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 0x100916c2
mov eax, dword [eax]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], eax
call fcn.1008f630
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 0x100916e4
cmp edi, ecx
jne 0x100916e4
cmp esi, ecx
jne 0x100916e4
cmp esi, edi
je 0x10091844
test ebx, ebx
je 0x10091844
cmp dword [ebp - 0x30], 0
je 0x10091857
cmp dword [ebx + 0x10], 0
je 0x10091857
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x10091857
cmp dword [eax], 0x66706331
jne 0x10091857
add eax, 4
mov dword [ebp - 0x40], eax
cmp dword [eax], 0x28
jne 0x10091857
push ebx
lea ecx, [ebp - 0x2c]
call fcn.100085c0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x2c]
call fcn.100e3260
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 0x10091848
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 0x10091848
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 0x10091848
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 0x10091848
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 0x10091848
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 0x10091848
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10006810
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 0x100916c2
mov eax, dword [ebp - 0x34]
add esi, 0xc
cmp esi, edi
je 0x100916c2
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 0x10091818
mov eax, dword [ebp - 0x34]
jmp 0x100916c2
mov al, 1
jmp 0x10091859
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2c]
call fcn.10006810
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.10147fe4
mov esp, ebp
pop ebp
ret 8