Function at 0x4133fe
Capabilities:
Check if file exists
Get common file path
Set current directory

Disassembly:
mov eax, 0x4dbd8d
call fcn.004d1d50
sub esp, 0x748
mov eax, dword [0x52e400]
push ebx
push esi
xor ebx, ebx
push edi
xor edi, edi
xor eax, ebp
mov esi, ecx
inc ebx
mov dword [ebp - 0x684], edi
cmp dword [esi + 0x78], ebx
mov dword [ebp - 0x10], eax
jne 0x413434
xor eax, eax
jmp 0x41384e
lea eax, [ebp - 0x6a0]
push 0x400
push eax
call fcn.004cda8a
pop ecx
pop ecx
push eax
lea ecx, [esi + 0x5c]
mov dword [ebp - 4], edi
call dword [0x4eb500]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x6a0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov word [ebp - 0x628], di
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x626]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
push 0x104
lea eax, [ebp - 0x628]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x628]
push eax
lea ecx, [ebp - 0x644]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
mov eax, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
push dword [eax]
lea ecx, [ebp - 0x644]
push 0x5c
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::rfind_wchar_t__unsigned_int_const]
inc eax
push eax
push 0
lea eax, [ebp - 0x6a0]
push eax
lea ecx, [ebp - 0x644]
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t_____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::substr_unsigned_int__unsigned_int_]
push eax
lea ecx, [ebp - 0x644]
mov byte [ebp - 4], 2
call dword [0x4eb500]
lea ecx, [ebp - 0x6a0]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push str.xl_client.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6bc]
push eax
call fcn.00407aea
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x684], ebx
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
call edi
test eax, eax
je 0x41356e
push str.xl_data.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6a0]
push eax
call fcn.00407aea
add esp, 0xc
mov ecx, eax
mov dword [ebp - 4], 4
mov dword [ebp - 0x684], 3
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call edi
test eax, eax
mov byte [ebp - 0x67d], 0
jne 0x413574
mov byte [ebp - 0x67d], bl
test byte [ebp - 0x684], 2
mov dword [ebp - 4], 3
je 0x413597
and dword [ebp - 0x684], 0xfffffffd
lea ecx, [ebp - 0x6a0]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
test byte [ebp - 0x684], bl
mov dword [ebp - 4], ebx
je 0x4135ae
lea ecx, [ebp - 0x6bc]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp byte [ebp - 0x67d], 0
jne 0x41383c
and word [ebp - 0x420], 0
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x41e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x420]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea ecx, [ebp - 0x644]
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push eax
call edi
push str.xl_data.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6a0]
push eax
call fcn.00407aea
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.00412ff9
neg al
sbb al, al
pop ecx
inc al
lea ecx, [ebp - 0x6a0]
mov byte [ebp - 0x67d], al
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp byte [ebp - 0x67d], 0
je 0x41365b
lea eax, [ebp - 0x420]
push eax
call edi
jmp 0x41383c
cmp dword [0x531f98], 0
jne 0x4136bb
push str.xl_client.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6a0]
push eax
call fcn.00407aea
add esp, 0xc
mov ecx, eax
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push ebx
push eax
call fcn.0041329e
neg al
pop ecx
sbb al, al
pop ecx
inc al
lea ecx, [ebp - 0x6a0]
mov byte [ebp - 0x67d], al
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp byte [ebp - 0x67d], 0
jne 0x41364d
mov dword [esi + 0x7c], ebx
lea eax, [ebp - 0x420]
push eax
call edi
and word [ebp - 0x218], 0
xor eax, eax
mov ecx, 0x81
lea edi, [ebp - 0x216]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x218]
push eax
push 0x104
mov dword [esi + 0x78], ebx
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push str.Thunder_NetworkThunderCloudCdn.xml
lea eax, [ebp - 0x218]
push eax
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x660]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [ebp - 0x67c]
mov byte [ebp - 4], 7
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::constructor_void_]
lea eax, [ebp - 0x67c]
push eax
push dword [ebp - 0x64c]
lea ecx, [ebp - 0x660]
mov byte [ebp - 4], 8
call dword [sym.imp.MSVCP71.dll_public:_wchar_t_const____thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::c_str_void_const]
push eax
call fcn.0044fe0a
add esp, 0xc
push ebx
push 0x1b6
push 0x20
lea ecx, [ebp - 0x67c]
call dword [sym.imp.MSVCP71.dll_public:_char_const____thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::c_str_void_const]
push eax
lea ecx, [ebp - 0x754]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::constructor_char_const___int__int_]
lea edi, [esi + 0x50]
push ebx
mov ecx, edi
mov byte [ebp - 4], 9
call fcn.0048d5d7
push ebx
push 0x2000
mov ecx, edi
call fcn.0048d5bc
lea eax, [ebp - 0x754]
push eax
mov ecx, edi
call fcn.0048d9af
push str.ipbase.phub.sandai.net
lea ecx, [ebp - 0x6bc]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [esi + 8]
mov eax, dword [ecx]
push 0x1ff4
lea edx, [ebp - 0x6bc]
push edx
mov byte [ebp - 4], 0xa
call dword [eax + 4]
lea ecx, [ebp - 0x6bc]
mov byte [ebp - 4], 9
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
push 0x4eee28
lea ecx, [ebp - 0x6bc]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
lea ecx, [esi + 0x2c]
mov eax, dword [ecx]
mov byte [ebp - 4], 0xb
push 0x224c
lea edx, [ebp - 0x6bc]
push edx
call dword [eax + 4]
lea ecx, [ebp - 0x6bc]
mov byte [ebp - 4], 9
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea ecx, [ebp - 0x754]
mov byte [ebp - 4], 8
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_ifstream_char__struct_std::char_traits_char__::vbase_dtor_void_]
lea ecx, [ebp - 0x67c]
mov byte [ebp - 4], 7
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::destructor_void_]
lea ecx, [ebp - 0x660]
mov byte [ebp - 4], bl
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
xor ebx, ebx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x644]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
pop esi
xor ecx, ebp
pop ebx
call fcn.004d1da7
leave
ret