Function at 0x40ba10
Capabilities:
Read file on windows

Disassembly:
push 0xffffffffffffffff
push 0x47e068
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4a6eb0]
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.00406310
mov ecx, dword [esp + 0x28]
push 0x4829a0
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 0x40ba92
mov esi, dword [sym.imp.MSVCR90.dll_fseek]
push 2
push ebp
push eax
call esi
add esp, 0xc
cmp eax, ebp
je 0x40bac1
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x40ba92
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 0x40baba
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x40bc10
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.00468318
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 0x40bb09
cmp byte [esi + 1], bl
je 0x40bb1e
mov edi, dword [sym.imp.MSVCR90.dll_strstr]
push str.UTF_16
push esi
call edi
add esp, 8
test eax, eax
je 0x40bb3d
xor eax, eax
cmp byte [esi], 0xff
jne 0x40bb2f
cmp byte [esi + 1], bl
jne 0x40bb2f
mov eax, 2
add eax, esi
push eax
call dword [sym.imp.OLEAUT32.dll_SysReAllocString]
jmp 0x40bbc9
cmp byte [esi], 0xef
mov bl, 0xbb
jne 0x40bb4f
cmp byte [esi + 1], bl
jne 0x40bb4f
cmp byte [esi + 2], 0xbf
je 0x40bb5e
push str.UTF_8
push esi
call edi
add esp, 8
test eax, eax
je 0x40bbc3
xor edi, edi
cmp byte [esi], 0xef
jne 0x40bb75
cmp byte [esi + 1], bl
jne 0x40bb75
cmp byte [esi + 2], 0xbf
jne 0x40bb75
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.00468318
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 0x40bbc9
push esi
call fcn.00467a10
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 0x40bbe6
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 0x40bc0e
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