Function at 0x101986f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x88
call 0x10198701
pop eax
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x101ad260
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x28], ecx
test byte [ebp + 0xc], 1
mov dword [ebp - 0x24], 0x2000
mov dword [ebp - 0x50], eax
mov eax, dword fs:[0]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x18]
mov dword fs:[0], eax
mov ecx, dword [edx]
mov eax, dword [edx + 8]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x7c], ecx
je 0x10198790
mov eax, dword [ebp + 0x10]
cmp eax, 0xfffffbff
ja 0x10198777
lea esi, [eax + 0x400]
mov ecx, esi
and ecx, 0x1fff
je 0x10198780
mov edx, 0x2000
sub edx, ecx
add esi, edx
setb cl
mov dword [ebp - 0x24], esi
test cl, 1
je 0x10198783
mov dword [ebp - 0x24], 0x2000
jmp 0x10198783
mov dword [ebp - 0x24], esi
test eax, eax
mov ecx, dword [ebp - 0x7c]
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], ecx
jne 0x101987d4
mov eax, ecx
sub eax, dword [ebp - 0x3c]
cmp eax, 0x20
jae 0x101987ce
mov edx, dword [ebp - 0x2c]
lea ecx, [ebp - 0x74]
push dword [ebp + 8]
call fcn.10198d10
add esp, 4
movzx eax, byte [ebp - 0x74]
cmp al, 4
jne 0x10198b57
cmp dword [ebp - 0x70], 0
je 0x10198be5
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov dword [ebp - 0x34], eax
mov eax, dword [ecx + 8]
jmp 0x101987d4
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x34], ecx
mov esi, eax
lea ebx, [ebp - 0x58]
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x78], 0
mov eax, dword [ebp - 0x34]
cmp esi, eax
jne 0x10198830
cmp eax, dword [ebp - 0x7c]
jne 0x10198830
mov ebx, edx
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x10], 0xffffffff
lea ecx, [ebp - 0x74]
push dword [ebp + 8]
call fcn.10198d10
add esp, 4
movzx eax, byte [ebp - 0x74]
cmp al, 4
jne 0x10198b57
cmp dword [ebp - 0x70], 0
je 0x10198bfb
mov ecx, dword [ebp + 8]
mov edx, ebx
lea ebx, [ebp - 0x58]
mov eax, dword [ecx]
mov esi, dword [ecx + 8]
cmp esi, eax
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x20], edx
jne 0x10198880
cmp esi, 0xffffffdf
ja 0x10198bf1
mov eax, dword [ebp - 0x30]
lea ecx, [esi + 0x20]
add eax, eax
cmp eax, ecx
cmova ecx, eax
mov eax, dword [ebp - 0x30]
test ecx, ecx
js 0x10198bf1
test eax, eax
mov dword [ebp - 0x34], ecx
je 0x1019888f
mov ecx, eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x74], eax
mov eax, 1
mov dword [ebp - 0x6c], ecx
jmp 0x10198891
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x34], eax
mov edi, eax
jmp 0x101988cf
xor eax, eax
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x74]
lea ecx, [ebp - 0x94]
mov edx, 1
push eax
mov esi, dword [ebp - 0x34]
push esi
call fcn.10194f50
add esp, 8
cmp dword [ebp - 0x94], 1
je 0x10198bf1
mov ecx, dword [ebp - 0x90]
mov eax, dword [ebp + 8]
mov edi, esi
mov dword [eax + 4], ecx
mov dword [eax], esi
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x24]
sub edi, esi
add ecx, esi
mov dword [ebp - 0x4c], ecx
cmp edi, eax
cmovae edi, eax
mov dword [ebp - 0x80], edi
jmp 0x101988fc
mov eax, dword [ebp - 0x2c]
mov esi, dword [eax]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0x103
push 0
push 0
push edi
push ecx
push ebx
push 0
push 0
push 0
push esi
call dword [sym.imp.ntdll.dll_NtReadFile]
cmp eax, 0x103
jne 0x10198936
push 0xffffffffffffffff
push esi
call dword [sym.imp.kernel32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x20]
cmp eax, 0xc0000011
jne 0x10198960
and edx, 0xffffff00
xor esi, esi
or edx, 4
movzx eax, dl
mov eax, dword [eax*4 + 0x10198cf8]
add eax, dword [ebp - 0x50]
jmp eax
cmp eax, 0x103
je 0x10198c0f
and edx, 0xffffff00
test eax, eax
js 0x1019898a
or edx, 4
mov esi, dword [ebp - 0x54]
movzx eax, dl
mov eax, dword [eax*4 + 0x10198cf8]
add eax, dword [ebp - 0x50]
jmp eax
push eax
mov esi, edx
call dword [sym.imp.ntdll.dll_RtlNtStatusToDosError]
mov edx, esi
mov esi, eax
movzx eax, dl
mov eax, dword [eax*4 + 0x10198cf8]
add eax, dword [ebp - 0x50]
jmp eax
movzx ecx, byte [ebp - 0x71]
mov edx, dword [ebp - 0x28]
movzx edi, word [ebp - 0x73]
mov esi, dword [ebp - 0x70]
mov byte [edx + 3], cl
mov word [edx + 1], di
mov byte [edx], al
mov dword [edx + 4], esi
jmp 0x10198bd1
mov byte [eax], 4
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x88
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [ebp - 0x28]
mov dword [eax + 4], 0
jmp 0x10198bce
mov eax, dword [ebp - 0x28]
mov word [eax], 0x2601
jmp 0x10198bd1
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov eax, dword [eax + 8]
sub eax, dword [ebp - 0x3c]
mov dword [ecx + 4], eax
mov byte [ecx], 4
jmp 0x10198bd1
lea ecx, [ebp - 0x74]
lea eax, [ebp - 0x5c]
mov dword [ebp - 0x88], 0
mov dword [ebp - 0x74], 0x1024a39c
mov dword [ebp - 0x70], 1
mov dword [ebp - 0x64], 0
mov byte [ebp - 0x84], 0
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], 0
lea eax, [ebp - 0x88]
push ecx
push eax
lea esi, [ebp - 0x94]
push esi
call fcn.101992c0
add esp, 0xc
mov ecx, esi
call fcn.10191c40
mov ecx, 7
int 0x29
ud2