Function at 0x4043dd
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x4145de
call fcn.004143a0
sub esp, 0x654
mov eax, dword [0x4188a0]
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.00404118
push 6
mov dword [ebp - 0x650], ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleExW]
test eax, eax
je 0x4045c6
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 0x404492
mov word [eax], bx
lea eax, [ebp - 0x238]
push eax
lea eax, [ebp - 0x648]
push 0x4015a8
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.00404118
test eax, eax
je 0x4045c5
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 0x401530
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 0x404561
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, 0xfffe3a35
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 0x1c5cb
push edi
call esi
add esp, 0xc
push edi
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
push 1
push ebx
lea ecx, [ebp - 0x660]
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.004042e1
test eax, eax
lea ecx, [ebp - 0x660]
je 0x4045bb
call dword [sym.imp.MSVCP60.dll_public:_unsigned_int___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::size_void_const]
push eax
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP60.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
call fcn.004124eb
push 0x4015a4
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.0041201f
cmp eax, ebx
je 0x4045b5
call eax
lea ecx, [ebp - 0x660]
or dword [ebp - 4], 0xffffffff
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.004140ea
leave
ret