Function at 0x40b440
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x412c82
call fcn.00412c00
sub esp, 0x654
mov eax, dword [0x414050]
push ebx
push edi
mov dword [ebp - 0x10], eax
mov edx, 0x81
xor eax, eax
xor ebx, ebx
mov word [ebp - 0x440], bx
mov ecx, edx
lea edi, [ebp - 0x43e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [ebp - 0x238], bx
mov ecx, edx
lea edi, [ebp - 0x236]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x650]
push eax
push fcn.0040b138
push 6
mov dword [ebp - 0x650], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x40b61e
push esi
mov esi, 0x104
push esi
lea eax, [ebp - 0x440]
push eax
push dword [ebp - 0x650]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push esi
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x238]
push eax
call dword [sym.imp.msvcrt.dll_wcsncpy]
lea eax, [ebp - 0x238]
push 0x5c
push eax
call dword [sym.imp.msvcrt.dll_wcsrchr]
add esp, 0x14
cmp eax, ebx
je 0x40b4f5
mov word [eax], bx
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x648]
push 0x4013dc
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0xc
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x440]
push eax
call fcn.0040b138
test eax, eax
je 0x40b61d
xor eax, eax
lea edi, [ebp - 0x649]
stosb byte es:[edi], al
lea eax, [ebp - 0x649]
push eax
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_class_std::allocator_char__const__]
lea eax, [ebp - 0x648]
push 0x40139c
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.msvcrt.dll__wfopen]
mov edi, eax
cmp edi, ebx
pop ecx
pop ecx
je 0x40b5bd
mov esi, dword [sym.imp.msvcrt.dll_fseek]
push 2
push ebx
push edi
call esi
push edi
call dword [sym.imp.msvcrt.dll_ftell]
add esp, 0x10
add eax, 0xfffeed48
push eax
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::resize_unsigned_int_]
push ebx
push 0x112b8
push edi
call esi
add esp, 0xc
push edi
push dword [ebp - 0x658]
lea ecx, [ebp - 0x660]
push 1
push ebx
call dword [sym.imp.MSVCP60.dll_public:_char____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator___unsigned_int_]
push eax
call dword [sym.imp.msvcrt.dll_fread]
push edi
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 0x14
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x660]
push eax
call fcn.0040b345
test eax, eax
je 0x40b60d
mov eax, dword [ebp - 0x65c]
cmp eax, ebx
jne 0x40b5e0
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push dword [ebp - 0x658]
push eax
call fcn.0040b10d
push 0x4013da
lea ecx, [ebp - 0x660]
mov esi, eax
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::operator_char_const__]
push 0xa
push esi
call fcn.0040acdd
cmp eax, ebx
je 0x40b60d
call eax
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP60.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop ebx
call fcn.00412b09
leave
ret