Function at 0x1013654
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push ebx
push esi
xor esi, esi
mov ebx, ecx
mov eax, dword [ebx + 0x10]
push edi
xor edi, edi
cmp eax, esi
mov dword [ebp - 4], edi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 8], esi
mov dword [ebp - 0x18], 1
je 0x101368e
cmp dword [ebx + 0x18], esi
jne 0x1013697
cmp dword [ebp + 0xc], esi
je 0x101368e
cmp dword [ebp + 8], esi
jne 0x10136a0
cmp dword [ebx + 0x18], esi
je 0x1013894
push 0xfffffffffffffffb
jmp 0x101389a
xor esi, esi
mov eax, dword [ebx + 0x1c]
cmp eax, dword [ebx + 0x20]
jl 0x10136eb
push esi
lea eax, [ebp - 0x10]
push eax
push 0x2000
push dword [ebx + 4]
mov dword [ebp - 0x10], esi
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, esi
jne 0x10136da
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
jne 0x101384b
mov dword [ebx + 0x18], 1
mov eax, dword [ebp - 0x10]
cmp eax, esi
je 0x1013836
mov dword [ebx + 0x20], eax
mov dword [ebx + 0x1c], esi
cmp dword [ebx + 0x234], esi
je 0x1013700
mov ecx, ebx
call fcn.01013344
mov dword [ebx + 0x234], esi
cmp dword [ebp - 0x18], esi
je 0x1013764
cmp dword [ebx + 0x230], esi
je 0x101371e
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffffe
mov dword [ebp - 0xc], eax
jmp 0x1013761
mov eax, dword [ebp + 0xc]
shr eax, 1
dec eax
dec eax
lea esi, [eax + 2]
cmp esi, dword [ebx + 0xc]
mov dword [ebp - 0xc], eax
jle 0x1013759
mov eax, dword [ebx + 8]
test eax, eax
je 0x1013742
push eax
call dword [sym.imp.KERNEL32.dll_LocalFree]
and dword [ebx + 8], 0
push esi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebx + 8], eax
je 0x101384f
mov dword [ebx + 0xc], esi
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
xor esi, esi
mov dword [ebp - 0x18], esi
mov ecx, dword [ebx + 0x1c]
mov esi, dword [ebx + 4]
mov eax, dword [ebx + 0x20]
add esi, ecx
sub eax, ecx
mov ecx, dword [ebp - 0xc]
sub ecx, edi
cmp eax, ecx
mov dword [ebp - 0x10], esi
jl 0x101377f
mov eax, ecx
lea edx, [eax + esi]
cmp esi, edx
jae 0x10137ad
mov edx, dword [ebp - 0x10]
cmp byte [edx], 0xa
jne 0x10137a1
cmp dword [ebx + 0x230], 0
je 0x1013805
cmp edx, esi
je 0x10137a1
cmp byte [edx - 1], 0
je 0x1013805
inc edx
mov dword [ebp - 0x10], edx
lea edx, [eax + esi]
cmp dword [ebp - 0x10], edx
jb 0x1013786
mov edx, dword [ebp - 8]
add dword [ebp - 4], eax
add edi, edx
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebx + 0x1c], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jne 0x10137d7
mov dword [ebp - 0x14], 1
mov edi, dword [ebp - 4]
cmp dword [ebp - 0x14], 0
je 0x101369e
mov eax, dword [ebp - 8]
add eax, edi
lea ecx, [ebx + 0x230]
xor esi, esi
mov byte [eax], 0
cmp dword [ecx], esi
je 0x1013853
mov byte [eax + 1], 0
cmp dword [ecx], esi
je 0x1013853
shr edi, 1
push edi
jmp 0x1013870
xor eax, eax
cmp dword [ebx + 0x230], eax
setne al
inc eax
sub eax, esi
add eax, edx
cmp eax, ecx
jg 0x10137da
mov edx, dword [ebp - 8]
add edi, edx
mov ecx, eax
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add dword [ebx + 0x1c], eax
add dword [ebp - 4], eax
jmp 0x10137d0
mov eax, edi
neg eax
sbb eax, eax
and eax, 6
mov dword [ebx + 0x18], 1
add eax, 0xfffffffb
jmp 0x10138a7
push 0xfffffffffffffff8
jmp 0x101389a
push 0xfffffffffffffffe
jmp 0x101389a
mov eax, dword [ebp + 0xc]
shr eax, 1
push eax
push dword [ebp + 8]
push 0xffffffffffffffff
push dword [ebx + 8]
push 1
push esi
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, esi
je 0x101387f
dec eax
push eax
push dword [ebp + 8]
mov ecx, ebx
call fcn.0101344a
xor eax, eax
inc eax
jmp 0x10138a7
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x7a
neg eax
sbb eax, eax
and eax, 3
add eax, 0xfffffffc
jmp 0x10138a7
cmp eax, esi
jne 0x101389d
push 0xfffffffffffffffa
pop eax
jmp 0x10138a7
xor eax, eax
cmp dword [ebx + 4], esi
setne al
dec eax
dec eax
pop edi
pop esi
pop ebx
leave
ret 8