Function at 0x52f6e0
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x58e2f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [esp + 0x34]
push esi
xor esi, esi
mov dword [esp + 0x20], esi
mov ecx, dword [esp + 0x34]
push edi
mov dword [esp + 0x30], esi
call fcn.00514470
push ebp
mov dword [esp + 0x34], esi
mov dword [esp + 0x28], 1
call fcn.0048d222
push ebp
mov dword [esp + 0x28], eax
mov dword [esp + 0x1c], esi
call fcn.0056e777
push ebp
mov esi, eax
call fcn.0056e777
push ebp
mov edi, eax
call fcn.0056e777
push ebp
mov ebx, eax
call fcn.0056e777
add esp, 0x14
cmp esi, 0xfe
mov dword [esp + 0x18], eax
jg 0x52f7b8
je 0x52f7a9
test esi, esi
je 0x52f78f
cmp esi, 0xef
jne 0x52f7f9
cmp edi, 0xbb
jne 0x52f7f9
cmp ebx, 0xbf
jne 0x52f7f9
mov dword [esp + 0x14], 3
push str.UTF8
jmp 0x52f7ec
test edi, edi
jne 0x52f7f9
cmp ebx, 0xfe
jne 0x52f7f9
cmp eax, 0xff
jne 0x52f7f9
push str.UCS_4BE
jmp 0x52f7ec
cmp edi, 0xff
jne 0x52f7f9
push str.UCS_2BE
jmp 0x52f7e4
cmp esi, 0xff
jne 0x52f7f9
cmp edi, 0xfe
jne 0x52f7f9
test ebx, ebx
jne 0x52f7df
test eax, eax
jne 0x52f7df
mov dword [esp + 0x14], 4
push str.UCS_4LE
jmp 0x52f7ec
push str.UCS_2LE
mov dword [esp + 0x18], 2
mov ecx, dword [esp + 0x3c]
call fcn.00515b70
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x38]
mov edx, dword [ecx]
cmp dword [edx], 0
jne 0x52f861
test esi, esi
jne 0x52f81b
test edi, edi
jle 0x52f832
test ebx, ebx
jne 0x52f830
test eax, eax
jle 0x52f830
push str.UCS_2BE
jmp 0x52f858
jle 0x52f843
test edi, edi
jne 0x52f843
test ebx, ebx
jle 0x52f843
test eax, eax
jne 0x52f843
push str.UCS_2LE
jmp 0x52f858
test edi, edi
jne 0x52f861
test ebx, ebx
jl 0x52f861
test eax, eax
jle 0x52f861
push str.UCS_4BE
jmp 0x52f858
test esi, esi
jle 0x52f861
test edi, edi
jl 0x52f861
test ebx, ebx
jne 0x52f861
test eax, eax
jne 0x52f861
push str.UCS_4LE
call fcn.00515b70
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx]
cmp dword [eax], 0
jne 0x52f9b0
push 2
push 0
push ebp
mov esi, 0x800
mov dword [esp + 0x24], 0x7f9
call fcn.0048cd03
push ebp
call fcn.0048d222
mov ecx, dword [esp + 0x30]
push 0
push ecx
push ebp
mov edi, eax
call fcn.0048cd03
add esp, 0x1c
cmp edi, 0x7f9
ja 0x52f8a9
mov dword [esp + 0x18], edi
mov esi, edi
push esi
call fcn.00514090
push ebp
push esi
mov edi, eax
push 1
push edi
mov dword [esp + 0x30], edi
call fcn.0048c919
add esp, 0x14
cmp eax, esi
jne 0x52f9a7
mov esi, dword [esp + 0x1c]
mov bl, 1
xor edi, edi
mov byte [esp + 0x13], bl
xor edx, edx
jmp 0x52f8e0
cmp edx, dword [esp + 0x18]
jae 0x52f984
mov al, byte [esi]
add esi, 1
cmp al, 0x80
jae 0x52f8fa
mov eax, 1
jmp 0x52f949
mov cl, al
and cl, 0xe0
cmp cl, 0xc0
jne 0x52f90b
mov eax, 2
jmp 0x52f949
mov cl, al
and cl, 0xf0
cmp cl, 0xe0
jne 0x52f91c
mov eax, 3
jmp 0x52f949
mov cl, al
and cl, 0xf8
cmp cl, 0xf0
jne 0x52f92d
mov eax, 4
jmp 0x52f949
mov cl, al
and cl, 0xfc
cmp cl, 0xf8
jne 0x52f93e
mov eax, 5
jmp 0x52f949
and al, 0xfe
cmp al, 0xfc
jne 0x52f99b
mov eax, 6
mov ecx, 1
cmp eax, ecx
jle 0x52f972
mov bl, byte [esi]
and bl, 0xc0
add esi, 1
cmp bl, 0x80
jne 0x52f96c
add ecx, 1
cmp ecx, eax
jl 0x52f952
mov bl, byte [esp + 0x13]
jmp 0x52f972
xor bl, bl
mov byte [esp + 0x13], bl
add edx, eax
cmp eax, edi
jle 0x52f97a
mov edi, eax
test bl, bl
jne 0x52f8e0
jmp 0x52f99b
test bl, bl
je 0x52f99b
cmp edi, 1
jle 0x52f99b
mov ecx, dword [esp + 0x38]
push 0x5d0988
call fcn.00515b70
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x14], 0
push edi
call fcn.005142a0
add esp, 4
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x14]
push 0
add edx, eax
push edx
push ebp
call fcn.0048cd03
mov ecx, dword [esp + 0x34]
mov eax, dword [esp + 0x44]
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x24
ret