Function at 0x1001f690
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, ecx
xor ecx, ecx
push esi
push edi
mov esi, edx
mov dword [ebp - 8], ecx
mov eax, dword [ebx + 0x168]
sub eax, ecx
je 0x1001f775
sub eax, 1
je 0x1001f76a
sub eax, 2
jne 0x1001f77b
mov ecx, dword [esi + 0x7c]
test ecx, ecx
je 0x1001f749
mov edx, dword [esi + 0x60]
mov edi, dword [ebp + 0x10]
mov eax, dword [edx + 4]
sub eax, dword [esi + 0x6c]
mov dword [ebp - 0x18], eax
cmp eax, edi
jg 0x1001f6e0
mov edi, eax
test edi, edi
je 0x1001f72b
mov eax, dword [edx]
add eax, dword [esi + 0x6c]
push 0
push eax
push ecx
call dword [sym.imp.msvcrt.dll_fseek]
add esp, 0xc
test eax, eax
jne 0x1001f749
push dword [esi + 0x7c]
push 1
push edi
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test eax, eax
jne 0x1001f728
push ecx
lea edx, [eax + 0x27]
mov ecx, ebx
call fcn.10004c10
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1001f734
mov dword [ecx], edi
cmp edi, eax
jl 0x1001f8e9
or dword [esi + 0x70], 1
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0
push 0
push 0x27
push 0
push 0
lea ecx, [ebx + 8]
xor edx, edx
call fcn.1000a150
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebx + 0x2b4]
mov ecx, dword [eax + 0x1c]
jmp 0x1001f778
mov ecx, dword [ebx + 0x1c]
mov dword [ebp - 8], ecx
mov edi, dword [ebp + 0x10]
mov edx, dword [esi + 0x6c]
mov dword [ebp - 0x10], edx
mov dword [ebp - 0x20], edx
test edi, edi
je 0x1001f845
mov eax, dword [ecx + 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x1001f7a0
mov dword [ebp - 0x14], 0xffff
cmp edi, 0xffff
jg 0x1001f7b2
mov dword [ebp - 0x14], edi
movsx eax, word [esi + 0x44]
movzx ecx, word [esi]
push edx
lea edx, [ebp - 0x1c]
push edx
push eax
push dword [ebp - 0x14]
push dword [ebp - 0xc]
push ecx
push dword [ebp - 8]
push 7
push 0x15
push dword [ebx]
call fcn.10010230
add esp, 0x28
test eax, eax
jne 0x1001f82b
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ecx + 4]
jne 0x1001f80a
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
test eax, eax
jle 0x1001f804
add dword [ebp - 0xc], eax
add edx, eax
sub edi, eax
mov dword [ebp - 0x10], edx
mov eax, dword [ecx + 4]
mov dword [ebp - 0x18], eax
jne 0x1001f7a0
jmp 0x1001f84b
or dword [esi + 0x70], 1
jmp 0x1001f84b
push 0
push 0
push 0x55
push 0
push 0
lea ecx, [ebx + 8]
xor edx, edx
call fcn.1000a150
add esp, 0x14
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push dword [ebx]
mov edx, dword [ebp - 8]
lea ecx, [ebx + 8]
call fcn.1000a260
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
cmp word [ebp + 8], 0xfffe
jne 0x1001f8cd
test byte [esi + 0x70], 1
jne 0x1001f8cd
mov eax, dword [ecx + 4]
movzx ecx, word [esi]
mov edi, dword [ebp - 8]
push edx
mov dword [ebp - 0x18], eax
lea edx, [ebp - 0x14]
movsx eax, word [esi + 0x44]
push edx
push eax
push 1
lea eax, [ebp - 1]
push eax
push ecx
push edi
push 7
push 0x15
push dword [ebx]
call fcn.10010230
add esp, 0x28
test eax, eax
je 0x1001f8a1
push dword [ebx]
lea ecx, [ebx + 8]
mov edx, edi
call fcn.1000a260
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x18]
cmp eax, dword [edi + 4]
je 0x1001f8c3
push ecx
mov edx, 0x55
mov ecx, ebx
call fcn.10004c10
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x14], 0
jg 0x1001f8cd
or dword [esi + 0x70], 1
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
cmp word [esi + 8], 8
jne 0x1001f8e0
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1001f8e9
mov dword [ecx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret