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

Disassembly:
mov eax, 0x4dd2d7
call fcn.004d1ec0
sub esp, 0x748
mov eax, dword [0x52f220]
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 0x416c48
xor eax, eax
jmp 0x417062
lea eax, [ebp - 0x6a0]
push 0x400
push eax
call fcn.004cdc14
pop ecx
pop ecx
push eax
lea ecx, [esi + 0x5c]
mov dword [ebp - 4], edi
call dword [0x4ec4ec]
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 [0x4ec4ec]
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.00407691
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 0x416d82
push str.xl_data.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6a0]
push eax
call fcn.00407691
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 0x416d88
mov byte [ebp - 0x67d], bl
test byte [ebp - 0x684], 2
mov dword [ebp - 4], 3
je 0x416dab
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 0x416dc2
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 0x417050
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.00407691
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.0041680d
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 0x416e6f
lea eax, [ebp - 0x420]
push eax
call edi
jmp 0x417050
cmp dword [0x532d88], 0
jne 0x416ecf
push str.xl_client.dll
lea eax, [ebp - 0x644]
push eax
lea eax, [ebp - 0x6a0]
push eax
call fcn.00407691
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.00416ab2
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 0x416e61
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.00451ebf
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.0048cb3c
push ebx
push 0x2000
mov ecx, edi
call fcn.0048cb21
lea eax, [ebp - 0x754]
push eax
mov ecx, edi
call fcn.0048d0e7
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 0x4f0150
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.004d1f17
leave
ret