Function at 0x10017380
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
mov ebx, dword [ebp + 0xc]
mov edx, 0x24687531
push esi
push edi
mov edi, ecx
mov dword [esp + 0x10], ebx
push 4
mov ecx, ebx
mov dword [esp + 0x20], edi
call fcn.1000f4a0
add esp, 4
test al, al
je 0x10017609
mov esi, dword [edi + 0xc]
mov ecx, ebx
push 4
cmp esi, 0xffffffff
jb 0x100173d5
or edx, 0xffffffff
call fcn.1000f4a0
add esp, 4
test al, al
je 0x10017609
push 8
mov ecx, ebx
mov edx, esi
call fcn.1000f4a0
add esp, 4
test al, al
je 0x10017609
mov edx, dword [edi + 0x10]
mov ecx, ebx
call fcn.1000f2d0
test al, al
je 0x10017609
mov esi, dword [edi]
mov edi, dword [edi + 4]
mov dword [esp + 0x18], esi
cmp esi, edi
je 0x1001744c
mov dx, word [esi + 4]
push ecx
mov ecx, ebx
call fcn.1000f530
add esp, 4
test al, al
je 0x10017609
push ebx
push 1
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 0x10017609
mov eax, dword [esp + 0x1c]
add esi, 0xc
mov edi, dword [eax + 4]
cmp esi, edi
jne 0x10017406
mov esi, dword [eax]
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x18]
xor ebx, ebx
mov dword [esp + 0x20], esi
mov dword [esp + 0x24], edi
mov dword [esp + 0x28], esi
cmp eax, edi
je 0x10017485
mov eax, dword [esi]
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], eax
call fcn.1000d8d0
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0x1c]
mov ecx, dword [edx + 4]
cmp eax, dword [edx]
jne 0x100174a8
cmp edi, ecx
jne 0x100174a8
cmp esi, ecx
jne 0x100174a8
cmp esi, edi
je 0x100175fe
test ebx, ebx
je 0x100175fe
mov eax, dword [ebx + 0x18]
mov dword [esp + 0x14], eax
test eax, eax
je 0x10017609
cmp dword [ebx + 0x10], 0
je 0x10017609
cmp dword [ebx + 0x14], 8
mov eax, ebx
jb 0x100174cb
mov eax, dword [ebx]
push dword [esp + 0x10]
push 1
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 0x10017609
push dword [esp + 0x10]
push eax
push 4
push dword [esp + 0x20]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x10017609
push dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
add eax, 4
push 4
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x10017609
push dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
add eax, 8
push 0x208
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x10017609
push dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x210
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 0x10017609
push dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x220
push 0x208
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp eax, 1
jne 0x10017609
push dword [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
add eax, 0x428
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 0x10017609
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 [esp + 0x18]
jne 0x10017485
nop dword [eax]
mov eax, dword [esp + 0x18]
add esi, 0xc
cmp esi, edi
je 0x10017485
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 0x100175d0
mov eax, dword [esp + 0x18]
jmp 0x10017485
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret 8