Function at 0x1001c610
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x10], edi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x18], ebx
mov edi, dword [ebp + 8]
push 0
push dword [edi + 0xc0]
mov eax, dword [edi + 0xbc]
mov edx, dword [edi + 0x90]
mov ecx, dword [edi + 0x94]
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
add edx, 0xffffffff
mov dword [ebp - 4], ecx
adc ecx, 0xffffffff
push ecx
push edx
call fcn.10090380
mov esi, eax
movzx eax, byte [edi + 0x131]
mov ebx, edx
test al, 0x10
je 0x1001c695
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edi + 0x98]
sbb edx, dword [edi + 0x9c]
jl 0x1001c695
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
sub eax, dword [edi + 0xa0]
sbb edx, dword [edi + 0xa4]
jge 0x1001c695
mov esi, 0xffffffff
mov ebx, 0xffffffff
jmp 0x1001c6df
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], ebx
lea eax, [ebp - 0x1c]
push 0
push eax
push esi
push dword [edi + 0xb4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x20], eax
cmp eax, 0xffffffff
jne 0x1001c6cb
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x1001c6cb
mov eax, 0xffffffff
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp - 0x1c]
add edx, 1
add eax, 1
or edx, eax
je 0x1001cae4
mov dword [edi + 0xb8], 0
add esi, 1
add ebx, 1
or esi, ebx
je 0x1001cab2
movzx eax, byte [edi + 0x12a]
test eax, 0x80
je 0x1001c70e
movzx edx, byte [edi + 0x12f]
jmp 0x1001c726
movzx edx, byte [edi + 0x12f]
test dl, 0x40
jne 0x1001c726
test edx, 0x80
je 0x1001c856
test dl, 8
je 0x1001c856
mov eax, dword [ebp - 8]
cmp eax, dword [edi + 0xfc]
jne 0x1001c856
mov eax, dword [edi + 0xb4]
mov ecx, dword [edi + 0x80]
movzx esi, byte [edi + 0x130]
mov dword [ebp - 4], eax
mov eax, dword [0x100d9158]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + 0x108]
mov ebx, esi
and ebx, 0x20
shr ebx, 5
mov dword [ebp - 0x28], ebx
and esi, 0x40
test eax, eax
mov dword [ebp - 0x24], esi
je 0x1001c817
cmp ecx, 2
je 0x1001c785
cmp ecx, 1
jne 0x1001c791
mov ecx, 0xffffffff
xor eax, eax
jmp 0x1001c843
mov eax, ebx
test eax, eax
je 0x1001c7a0
cmp ecx, 0xfffffffa
je 0x1001ca23
test ecx, ecx
je 0x1001ca3e
xor esi, esi
xor ebx, ebx
mov eax, dword [ebp - 0x28]
test eax, eax
je 0x1001c7c9
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1001c7c9
push ebx
call fcn.1007ed44
push ebx
call fcn.1007ec30
add esp, 8
test esi, esi
je 0x1001c817
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 0xc]
push ebx
push eax
push edx
call fcn.1007ecd4
add esp, 0xc
cmp eax, 0xffffffff
je 0x1001ca30
push 0
mov dword [ebp - 8], eax
push ebx
push 2
push 0x100bbfa8
call fcn.1007ed04
mov eax, dword [ebp - 8]
add esp, 0x10
mov edx, dword [ebp - 0xc]
mov byte [eax + edx], 0xa
movzx edx, byte [edi + 0x12f]
add eax, 1
mov ecx, 1
jmp 0x1001c843
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ebp - 4]
lea eax, [ebp - 0x28]
push 0
push eax
push edx
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, eax
mov eax, dword [ebp - 0x28]
movzx edx, byte [edi + 0x12f]
or edx, 0x10
mov byte [edi + 0x12f], dl
mov edx, 1
jmp 0x1001c957
mov ecx, dword [0x100d9158]
mov esi, dword [edi + 0xb4]
mov ebx, dword [edi + 0x38]
movzx edx, byte [edi + 0x130]
mov eax, edx
and eax, 0x20
shr eax, 5
mov dword [ebp - 4], eax
and edx, 0x40
test ecx, ecx
mov dword [ebp - 0xc], edx
mov edx, dword [edi + 0x108]
je 0x1001c936
cmp edx, 2
je 0x1001c895
cmp edx, 1
jne 0x1001c8a1
mov ecx, 0xffffffff
xor eax, eax
jmp 0x1001c955
test eax, eax
je 0x1001c8ae
cmp edx, 0xfffffffa
je 0x1001ca5c
test edx, edx
je 0x1001ca6f
xor ecx, ecx
xor edx, edx
mov eax, dword [ebp - 4]
test eax, eax
je 0x1001c8ef
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x1001c8ef
push edx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], edx
call fcn.1007ed44
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov dword [ebp - 0x28], ecx
push edx
mov dword [ebp - 0x24], edx
call fcn.1007ec30
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
add esp, 8
test ecx, ecx
je 0x1001c936
mov ecx, dword [ebp - 8]
push edx
mov dword [ebp - 0x24], edx
push ecx
push ebx
call fcn.1007ecd4
mov edx, dword [ebp - 0x24]
add esp, 0xc
cmp eax, 0xffffffff
je 0x1001ca68
push 0
mov dword [ebp - 8], eax
push edx
push 2
push 0x100bbfa8
call fcn.1007ed04
mov eax, dword [ebp - 8]
add esp, 0x10
mov byte [eax + ebx], 0xa
add eax, 1
mov ecx, 1
jmp 0x1001c955
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 8]
lea eax, [ebp - 0x24]
push 0
push eax
push edx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, eax
mov eax, dword [ebp - 0x24]
xor edx, edx
test ecx, ecx
je 0x1001c9fc
test eax, eax
je 0x1001caa0
movzx ecx, byte [edi + 0x128]
test cl, 1
je 0x1001c983
movsx ecx, byte [edi + 0x11d]
cmp ecx, 2
je 0x1001ca8d
test edx, edx
jne 0x1001c9e3
mov esi, dword [edi + 0x38]
mov ecx, dword [edi + 0x90]
mov ebx, dword [edi + 0x94]
mov edx, dword [edi + 0xc0]
mov dword [edi + 0x50], esi
mov dword [edi + 0x98], ecx
mov dword [ebp - 0xc], edx
mov esi, edx
mov dword [edi + 0x9c], ebx
xor edx, edx
div esi
mov edx, ebx
add eax, ecx
adc edx, 0
sub ecx, eax
sub ebx, edx
or ecx, ebx
jne 0x1001c9d7
add eax, 1
adc edx, 0
mov dword [edi + 0xa0], eax
mov dword [edi + 0xa4], edx
jmp 0x1001c9e3
mov dword [edi + 0xa0], eax
mov dword [edi + 0xa4], edx
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov dword [edi + 0xd0], 0
xor eax, eax
mov edi, dword [ebp - 0x10]
mov esp, ebp
pop ebp
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi + 0xb8], eax
cmp eax, 0x26
je 0x1001caa0
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
mov eax, 0x27
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp - 4]
mov esi, 1
jmp 0x1001c7b3
movzx edx, byte [edi + 0x12f]
xor ecx, ecx
jmp 0x1001c843
call fcn.1007ee18
mov ebx, eax
mov eax, dword [0x100d9158]
mov esi, 1
test eax, eax
jne 0x1001c7ac
jmp 0x1001c7c9
mov edx, esi
mov ecx, 1
jmp 0x1001c8c1
xor ecx, ecx
jmp 0x1001c955
call fcn.1007ee18
mov edx, eax
mov eax, dword [0x100d9158]
mov ecx, 1
test eax, eax
jne 0x1001c8ba
jmp 0x1001c8ef
mov ecx, dword [edi + 0x38]
movsx ecx, byte [ecx]
cmp ecx, 0x40
je 0x1001caa0
test ecx, ecx
jne 0x1001c983
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov edi, dword [ebp - 0x10]
mov eax, 0x24
mov esp, ebp
pop ebp
ret
push 0
push dword [edi + 0xc0]
mov ecx, dword [edi + 0x90]
mov eax, dword [edi + 0x94]
sub ecx, dword [edi + 0x98]
sbb eax, dword [edi + 0x9c]
push eax
push ecx
call fcn.10090380
add eax, dword [edi + 0x38]
mov dword [edi + 0x50], eax
jmp 0x1001c9e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [ebp - 0x18]
mov esi, dword [ebp - 0x14]
mov dword [edi + 0xb8], eax
mov edi, dword [ebp - 0x10]
mov eax, 0x27
mov esp, ebp
pop ebp
ret