Function at 0x10189b4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x14]
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
xor ebx, ebx
mov dword [eax], ebx
push eax
lea eax, [ebp - 8]
push eax
mov dword [ebp - 8], ebx
mov dword [ecx], ebx
call fcn.0101890a
test eax, eax
je 0x10189ea
mov eax, dword [ebp - 8]
jmp 0x1018c94
cmp dword [esi + 0x500c], ebx
mov ebx, dword [sym.imp.msvcrt.dll_memmove]
je 0x1018a35
mov eax, dword [esi + 0x7010]
mov ecx, dword [esi + 0x7014]
sub ecx, eax
push ecx
push eax
lea edi, [esi + 0x5010]
push edi
call ebx
mov eax, dword [esi + 0x7014]
sub eax, dword [esi + 0x7010]
add esp, 0xc
sar eax, 1
lea eax, [esi + eax*2 + 0x5010]
mov dword [esi + 0x7014], eax
mov dword [esi + 0x7010], edi
mov eax, dword [esi + 4]
mov ecx, dword [esi + 8]
sub ecx, eax
push ecx
push eax
lea edi, [esi + 0xc]
push edi
call ebx
mov eax, esi
sub eax, dword [esi + 4]
xor ebx, ebx
add eax, 0xc
add dword [esi + 8], eax
add esp, 0xc
cmp dword [esi + 0x500c], ebx
mov dword [esi + 4], edi
push ebx
je 0x1018bec
mov ecx, dword [esi + 0x7014]
mov eax, dword [esi + 0x7010]
sub eax, ecx
lea edx, [ebp - 4]
push edx
add eax, 0x2000
push eax
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1018c94
mov eax, dword [0x1021d70]
mov ecx, dword fs:[0x2c]
mov edi, dword [ecx + eax*4]
mov ebx, dword [ebp - 4]
xor ecx, ecx
push ecx
push ecx
push 0x2000
lea eax, [edi + 8]
push eax
shr ebx, 1
push ebx
push dword [esi + 0x7014]
mov dword [ebp + 8], eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0x1000
lea edi, [edi + 0x2008]
push edi
push eax
push dword [ebp + 8]
mov dword [ebp - 0xc], edi
push 0
call dword [sym.imp.KERNEL32.dll_GetACP]
push eax
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test ebx, ebx
mov edi, dword [esi + 0x7014]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp + 8]
mov dword [ebp + 8], eax
je 0x1018be4
jmp 0x1018b0e
mov eax, dword [ebp + 8]
cmp dword [ebp - 0x10], 0
je 0x1018be4
mov cx, word [edi]
mov edx, dword [ebp - 0xc]
cmp cx, word [edx]
jne 0x1018b58
movzx eax, byte [eax]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x1018b49
mov ecx, dword [ebp + 8]
lea eax, [ecx + 1]
cmp byte [eax], 0
je 0x1018b49
mov edx, dword [esi + 8]
mov cl, byte [ecx]
mov byte [edx], cl
inc dword [esi + 8]
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 8]
mov cl, byte [ecx]
mov byte [eax], cl
inc dword [esi + 8]
jmp 0x1018bcf
mov ecx, dword [esi + 8]
mov byte [ecx], 0x78
inc dword [esi + 8]
movzx edx, word [edi]
mov ecx, dword [esi + 8]
shr edx, 0xc
mov dl, byte [edx + 0x100277c]
mov byte [ecx], dl
inc dword [esi + 8]
movzx edx, byte [edi + 1]
mov ecx, dword [esi + 8]
and edx, 0xf
mov dl, byte [edx + 0x100277c]
mov byte [ecx], dl
inc dword [esi + 8]
movzx edx, byte [edi]
mov ecx, dword [esi + 8]
shr edx, 4
and edx, 0xf
mov dl, byte [edx + 0x100277c]
mov byte [ecx], dl
inc dword [esi + 8]
movzx edx, byte [edi]
mov ecx, dword [esi + 8]
and edx, 0xf
mov dl, byte [edx + 0x100277c]
mov byte [ecx], dl
inc dword [esi + 8]
movzx eax, byte [eax]
push eax
call dword [sym.imp.KERNEL32.dll_IsDBCSLeadByte]
test eax, eax
je 0x1018bcf
mov eax, dword [ebp + 8]
inc eax
cmp byte [eax], 0
je 0x1018bcf
mov dword [ebp + 8], eax
inc dword [ebp + 8]
add dword [ebp - 0xc], 2
inc edi
inc edi
dec ebx
dec dword [ebp - 0x10]
test ebx, ebx
jne 0x1018b0b
mov dword [esi + 0x7014], edi
jmp 0x1018c39
mov eax, dword [esi + 8]
sub edi, eax
lea ecx, [ebp - 4]
push ecx
add edi, 0x5000
push edi
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1018c33
mov eax, dword [ebp - 4]
dec eax
push eax
push dword [esi + 8]
call fcn.010187a2
test eax, eax
jne 0x1018c33
dec dword [ebp - 4]
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 4]
push 1
push ebx
push 0xffffffffffffffff
mov byte [ecx + eax], bl
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [ebp - 4]
add dword [esi + 8], eax
push dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov edi, dword [ebp + 0xc]
lea eax, [ebp - 8]
push eax
mov ecx, ebx
call fcn.0101890a
test eax, eax
jne 0x10189e2
cmp dword [esi + 0x500c], eax
je 0x1018c7c
mov ecx, dword [esi + 0x7014]
mov edx, dword [ebp + 0x10]
lea eax, [esi + 0x7010]
sub ecx, dword [eax]
sar ecx, 1
mov dword [ebx], ecx
mov ecx, dword [eax]
mov dword [edx], ecx
mov ecx, dword [ebx]
add ecx, ecx
add dword [eax], ecx
mov eax, dword [esi + 8]
sub eax, dword [esi + 4]
mov dword [edi], eax
mov ecx, dword [esi + 4]
add eax, ecx
mov dword [esi + 4], eax
mov eax, dword [edi]
neg eax
sbb eax, eax
and eax, ecx
pop edi
pop esi
pop ebx
leave
ret 0x10