Function at 0x4014b1
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x31c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
push esi
push esi
push 3
push esi
push 1
push 1
push eax
mov dword [ebp - 0x318], eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4014ef
xor eax, eax
jmp 0x4017b2
push edi
push esi
lea eax, [ebp - 0x31c]
push eax
push 0x104
lea eax, [ebp - 0x108]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, esi
je 0x40178a
mov edi, dword [ebp - 0x31c]
xor ecx, ecx
mov byte [ebp - 0x311], 0
cmp edi, esi
jbe 0x401760
mov bl, byte [ebp + ecx - 0x108]
inc ecx
test bl, bl
je 0x40177f
cmp bl, 0xa
je 0x40173d
cmp bl, 0xd
je 0x40173d
cmp bl, 0x3a
jne 0x401561
mov byte [ebp - 0x311], 1
cmp bl, 0x7f
ja 0x40156f
movzx ax, bl
jmp 0x401732
mov al, bl
add al, 0x3e
cmp al, 0x1d
ja 0x4015ad
cmp ecx, edi
jae 0x4015ad
mov al, byte [ebp + ecx - 0x108]
cmp al, 0x80
jb 0x4015ad
cmp al, 0xbf
ja 0x4015ad
and bl, 0x1f
and al, 0x3f
movzx dx, bl
shl dx, 6
movzx ax, al
or dx, ax
mov word [ebp + esi*2 - 0x310], dx
inc esi
inc ecx
jmp 0x40174f
mov eax, edi
sub eax, ecx
cmp eax, 1
jbe 0x401643
cmp bl, 0xe0
jne 0x4015ce
mov al, byte [ebp + ecx - 0x108]
cmp al, 0xa0
jb 0x401643
cmp al, 0xbf
jbe 0x401603
cmp bl, 0xe1
jb 0x4015d8
cmp bl, 0xec
jbe 0x4015e0
mov al, bl
add al, 0x12
cmp al, 1
ja 0x4015ef
mov al, byte [ebp + ecx - 0x108]
cmp al, 0x80
jb 0x4015ef
cmp al, 0xbf
jbe 0x401603
cmp bl, 0xed
jne 0x401643
mov al, byte [ebp + ecx - 0x108]
cmp al, 0x80
jb 0x401643
cmp al, 0x9f
ja 0x401643
mov dl, byte [ebp + ecx - 0x107]
cmp dl, 0x80
jb 0x401643
cmp dl, 0xbf
ja 0x401643
and al, 0x3f
movzx ax, al
movzx bx, bl
shl bx, 6
and dl, 0x3f
or ax, bx
shl ax, 6
movzx dx, dl
or ax, dx
mov word [ebp + esi*2 - 0x310], ax
inc esi
inc ecx
inc ecx
jmp 0x40174f
lea eax, [edi - 2]
cmp eax, 1
jbe 0x40177f
cmp bl, 0xf0
jne 0x401669
mov dl, byte [ebp + ecx - 0x108]
cmp dl, 0x90
jb 0x40177f
cmp dl, 0xbf
jbe 0x4016a4
mov al, bl
add al, 0xf
cmp al, 2
ja 0x401682
mov dl, byte [ebp + ecx - 0x108]
cmp dl, 0x80
jb 0x401682
cmp dl, 0xbf
jbe 0x4016a4
cmp bl, 0xf4
jne 0x40177f
mov dl, byte [ebp + ecx - 0x108]
cmp dl, 0x80
jb 0x40177f
cmp dl, 0x8f
ja 0x40177f
mov al, byte [ebp + ecx - 0x107]
mov byte [ebp - 0x313], al
cmp al, 0x80
jb 0x40177f
cmp al, 0xbf
ja 0x40177f
mov al, byte [ebp + ecx - 0x106]
mov byte [ebp - 0x312], al
cmp al, 0x80
jb 0x40177f
cmp al, 0xbf
ja 0x40177f
movzx edx, dl
and edx, 0x3f
movzx eax, bl
and eax, 7
shl eax, 6
or eax, edx
movzx edx, byte [ebp - 0x313]
and edx, 0x3f
shl eax, 6
or eax, edx
movzx edx, byte [ebp - 0x312]
and edx, 0x3f
shl eax, 6
or eax, edx
lea edx, [eax - 0x10000]
sar edx, 0xa
or edx, 0xd800
add ecx, 3
mov word [ebp + esi*2 - 0x310], dx
and eax, 0x3ff
inc esi
or eax, 0xdc00
mov word [ebp + esi*2 - 0x310], ax
inc esi
jmp 0x40174f
cmp esi, 0x104
je 0x401778
xor eax, eax
mov word [ebp + esi*2 - 0x310], ax
cmp ecx, edi
jb 0x401533
cmp byte [ebp - 0x311], 0
jne 0x40178e
cmp word [ebp - 0x310], 0x5c
je 0x40178e
push dword [ebp - 0x318]
call fcn.0040137a
pop ecx
jmp 0x401794
push 0xce
jmp 0x401784
push 0xa1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4017b1
mov eax, dword [ebp - 0x318]
push esi
lea ecx, [ebp - 0x310]
push ecx
push eax
push dword [ebp - 0x318]
push dword [ebp - 0x318]
call fcn.0040139a
add esp, 0x14
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.004017cc
leave
ret