Function at 0x40b480
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x47d888
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a5eb0]
xor eax, esp
push eax
lea eax, [esp + 0x18]
mov dword fs:[0], eax
mov eax, dword [esp + 0x28]
xor ebp, ebp
push eax
lea ecx, [esp + 0x2c]
mov dword [esp + 0x18], ebp
call fcn.00406300
mov ecx, dword [esp + 0x28]
push 0x481880
push ecx
lea edx, [esp + 0x1c]
push edx
mov dword [esp + 0x2c], ebp
call dword [sym.imp.MSVCR90.dll__wfopen_s]
mov eax, dword [esp + 0x20]
add esp, 0xc
cmp eax, ebp
je 0x40b502
mov esi, dword [sym.imp.MSVCR90.dll_fseek]
push 2
push ebp
push eax
call esi
add esp, 0xc
cmp eax, ebp
je 0x40b531
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x40b502
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b52a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40b680
mov ecx, dword [esp + 0x14]
push ecx
call dword [sym.imp.MSVCR90.dll_ftell]
mov edx, dword [esp + 0x18]
push ebp
push ebp
push edx
mov edi, eax
call esi
lea eax, [edi + 2]
push eax
call fcn.00467b98
mov ecx, dword [esp + 0x28]
push ecx
push edi
mov esi, eax
push 1
push esi
call dword [sym.imp.MSVCR90.dll_fread]
add esp, 0x24
mov byte [eax + esi], 0
mov byte [eax + esi + 1], 0
cmp byte [esi], 0xff
mov bl, 0xfe
jne 0x40b579
cmp byte [esi + 1], bl
je 0x40b58e
mov edi, dword [sym.imp.MSVCR90.dll_strstr]
push str.UTF_16
push esi
call edi
add esp, 8
test eax, eax
je 0x40b5ad
xor eax, eax
cmp byte [esi], 0xff
jne 0x40b59f
cmp byte [esi + 1], bl
jne 0x40b59f
mov eax, 2
add eax, esi
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
jmp 0x40b639
cmp byte [esi], 0xef
mov bl, 0xbb
jne 0x40b5bf
cmp byte [esi + 1], bl
jne 0x40b5bf
cmp byte [esi + 2], 0xbf
je 0x40b5ce
push str.UTF_8
push esi
call edi
add esp, 8
test eax, eax
je 0x40b633
xor edi, edi
cmp byte [esi], 0xef
jne 0x40b5e5
cmp byte [esi + 1], bl
jne 0x40b5e5
cmp byte [esi + 2], 0xbf
jne 0x40b5e5
mov edi, 3
push ebp
push ebp
push 0xffffffffffffffff
add edi, esi
push edi
push ebp
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea ebp, [eax + 1]
xor ecx, ecx
mov eax, ebp
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00467b98
add esp, 4
push ebp
mov ebx, eax
push ebx
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebx
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
jmp 0x40b639
push esi
call fcn.00467290
push esi
mov edi, eax
call sub.MSVCR90.dll_void___cdecl_operator_delete___void__
mov eax, dword [esp + 0x18]
add esp, 4
test eax, eax
je 0x40b656
push eax
call dword [sym.imp.MSVCR90.dll_fclose]
add esp, 4
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
mov dword [esp + 0x20], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40b67e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x18]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 4