Function at 0x422420
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48b230
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x4c0074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
push 0
push 0x80
push 3
push 0
push 0
push SysReAllocString
push dword [eax]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x24], 0x4a4fc8
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 4], 0
cmp ebx, 0xffffffff
jne 0x42248d
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x422603
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x4224aa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x422603
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 1
lea eax, [edi + 1]
push eax
lea ecx, [ebp - 0x14]
call fcn.00403020
mov esi, dword [ebp - 0x14]
test al, al
jne 0x4224d2
mov edi, 8
jmp 0x4225ef
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4224f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x4225ef
mov edi, dword [ebp + 0x10]
mov ecx, edi
call fcn.00403a40
mov eax, dword [ebp + 8]
test eax, eax
je 0x4225ed
mov byte [eax + esi], 0
mov eax, dword [ebp + 0xc]
push str.utf_8
push dword [eax]
call fcn.00472182
add esp, 8
test eax, eax
jne 0x42253e
push 0xfde9
mov edx, edi
mov ecx, esi
call fcn.00408b70
add esp, 4
jmp 0x4225ed
mov eax, dword [ebp + 0xc]
push str.utf_16
push dword [eax]
call fcn.00472182
add esp, 8
test eax, eax
jne 0x422639
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1c]
shr eax, 1
push eax
push esi
call fcn.004032b0
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov edx, dword [eax]
mov ecx, dword [edi]
sub ecx, 0x10
mov dword [ebp - 0x18], ecx
lea eax, [edx - 0x10]
mov dword [ebp + 0xc], eax
cmp eax, ecx
je 0x4225ce
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp + 0x10], eax
jl 0x4225c3
mov eax, dword [edx - 0x10]
cmp eax, dword [ecx]
jne 0x4225c3
mov ecx, dword [ebp + 0xc]
call fcn.00402480
mov edx, dword [ebp + 0x10]
mov ecx, ebx
mov dword [ebp + 0xc], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4225bc
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0xc]
add eax, 0x10
mov dword [edi], eax
jmp 0x4225ce
push dword [edx - 0xc]
mov ecx, edi
push edx
call fcn.00403ae0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x1c]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x4225ea
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ebx, dword [ebp - 0x10]
xor edi, edi
mov byte [ebp - 4], 0
push esi
call fcn.0046ce46
add esp, 4
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 0x24], 0x4a4fc8
test ebx, ebx
je 0x422623
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0x20], 0
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp + 0xc]
push str.ISO_8859_1
push dword [eax]
call fcn.00472182
add esp, 8
test eax, eax
jne 0x422662
push 0x6faf
mov edx, edi
mov ecx, esi
call fcn.00408b70
add esp, 4
jmp 0x4225ed
mov eax, dword [ebp + 0xc]
push str.US_ASCII
push dword [eax]
call fcn.00472182
add esp, 8
test eax, eax
jne 0x4226f7
push dword [ebp + 8]
lea ecx, [ebp - 0x18]
push esi
call fcn.00425480
mov byte [ebp - 4], 4
or ebx, 0xffffffff
mov edx, dword [eax]
mov ecx, dword [edi]
sub ecx, 0x10
mov dword [ebp - 0x1c], ecx
lea eax, [edx - 0x10]
mov dword [ebp + 0xc], eax
cmp eax, ecx
je 0x4226eb
cmp dword [ecx + 0xc], 0
lea eax, [ecx + 0xc]
mov dword [ebp + 0x10], eax
jl 0x4226e0
mov eax, dword [edx - 0x10]
cmp eax, dword [ecx]
jne 0x4226e0
mov ecx, dword [ebp + 0xc]
call fcn.00402480
mov edx, dword [ebp + 0x10]
mov ecx, ebx
mov dword [ebp + 0xc], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4226d9
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [eax]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp + 0xc]
add eax, 0x10
mov dword [edi], eax
jmp 0x4226eb
push dword [edx - 0xc]
mov ecx, edi
push edx
call fcn.00403ae0
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
jmp 0x4225d5
push 0
mov edx, edi
mov ecx, esi
call fcn.00408b70
add esp, 4
jmp 0x4225ed