Function at 0x1001f140
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 0x1001f225
sub eax, 1
je 0x1001f21a
sub eax, 2
jne 0x1001f22b
mov ecx, dword [esi + 0x7c]
test ecx, ecx
je 0x1001f1f9
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 0x1001f190
mov edi, eax
test edi, edi
je 0x1001f1db
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 0x1001f1f9
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 0x1001f1d8
push ecx
lea edx, [eax + 0x27]
mov ecx, ebx
call fcn.10004b60
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 0x1001f1e4
mov dword [ecx], edi
cmp edi, eax
jl 0x1001f399
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.10009e90
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 0x1001f228
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 0x1001f2f5
mov eax, dword [ecx + 4]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
jmp 0x1001f250
mov dword [ebp - 0x14], 0xffff
cmp edi, 0xffff
jg 0x1001f262
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.1000fe40
add esp, 0x28
test eax, eax
jne 0x1001f2db
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x18]
cmp eax, dword [ecx + 4]
jne 0x1001f2ba
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x10]
test eax, eax
jle 0x1001f2b4
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 0x1001f250
jmp 0x1001f2fb
or dword [esi + 0x70], 1
jmp 0x1001f2fb
push 0
push 0
push 0x55
push 0
push 0
lea ecx, [ebx + 8]
xor edx, edx
call fcn.10009e90
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.10009fa0
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 0x1001f37d
test byte [esi + 0x70], 1
jne 0x1001f37d
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.1000fe40
add esp, 0x28
test eax, eax
je 0x1001f351
push dword [ebx]
lea ecx, [ebx + 8]
mov edx, edi
call fcn.10009fa0
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 0x1001f373
push ecx
mov edx, 0x55
mov ecx, ebx
call fcn.10004b60
add esp, 4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x14], 0
jg 0x1001f37d
or dword [esi + 0x70], 1
mov eax, dword [ebp - 0x10]
sub eax, dword [ebp - 0x20]
cmp word [esi + 8], 8
jne 0x1001f390
mov ecx, dword [ebp - 0xc]
mov byte [ecx], 0
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x1001f399
mov dword [ecx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret