Function at 0x41e850
Capabilities:
Check if file exists
Get common file path
Link many functions at runtime
Set current directory

Disassembly:
push 0xffffffffffffffff
push 0x431615
mov eax, dword fs:[0]
push eax
sub esp, 0x62c
mov eax, dword [0x4490e8]
xor eax, esp
mov dword [esp + 0x628], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4490e8]
xor eax, esp
push eax
lea eax, [esp + 0x640]
mov dword fs:[0], eax
xor eax, eax
mov edi, 0x206
push edi
mov word [esp + 0x230], ax
xor ebp, ebp
lea eax, [esp + 0x232]
push ebp
push eax
mov esi, ecx
call sub.MSVCR90.dll_memset
mov ebx, 0x104
add esp, 0xc
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x14], ebp
mov dword [esp + 0x18], ebp
push 0x20019
push str.SoftwareThunder_NetworkXmp
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x20]
mov dword [esp + 0x654], ebp
call fcn.0040bcbf
cmp eax, ebp
jne 0x41e9d4
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x230]
push eax
push str.InstDir
lea ecx, [esp + 0x20]
call fcn.00416997
cmp eax, ebp
jne 0x41e9d4
lea eax, [esp + 0x22c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x41e9d4
xor eax, eax
push edi
mov word [esp + 0x438], ax
lea eax, [esp + 0x43a]
push ebp
push eax
call sub.MSVCR90.dll_memset
lea eax, [esp + 0x238]
push eax
lea eax, [esp + 0x444]
push eax
call dword [sym.imp.MSVCR90.dll_wcscpy]
add esp, 0x14
push str.BinXLBugHandler.dll
lea eax, [esp + 0x438]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x434]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
cmp eax, 1
jne 0x41e9c6
xor eax, eax
push edi
mov word [esp + 0x24], ax
lea eax, [esp + 0x26]
push ebp
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
lea eax, [esp + 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea eax, [esp + 0x22c]
push eax
call edi
lea eax, [esp + 0x434]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x1c], eax
lea eax, [esp + 0x20]
push eax
call edi
jmp 0x41e9d4
push str.XLBugHandler.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x1c], eax
cmp dword [esi + 0x1c], ebp
jne 0x41ea1e
xor eax, eax
push 0x208
mov word [esp + 0x24], ax
lea eax, [esp + 0x26]
push ebp
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push ebx
lea eax, [esp + 0x24]
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push str...XLBugHandler.dll
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 0x1c], eax
mov eax, dword [esi + 0x1c]
cmp eax, ebp
jne 0x41eaa0
mov edi, str.CBugReporter::Init
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41ea6d
push 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.__errno:
push str.LoadLibrary_failed__XLBugHandler_failed
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
lea ecx, [esp + 0x14]
call fcn.0040bca4
mov eax, ebp
mov ecx, dword [esp + 0x640]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x628]
xor ecx, esp
call fcn.00425cba
add esp, 0x638
ret
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._XL_SetBugReportRootDir_4
push eax
call ebx
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
mov edi, str.CBugReporter::Init
jne 0x41eaf2
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41eaf2
push 1
call ebp
push eax
push str.GetProcAddress_XL_SetBugReportRootDir_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
push str._XL_InitBugHandler_20
push dword [esi + 0x1c]
call ebx
mov dword [esi + 4], eax
test eax, eax
jne 0x41eb36
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41eb36
push 1
call ebp
push eax
push str.GetProcAddress_XL_InitBugHandler_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
push str._XL_SetPeerID_4
push dword [esi + 0x1c]
call ebx
mov dword [esi + 8], eax
test eax, eax
jne 0x41eb7a
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41eb7a
push 1
call ebp
push eax
push str.GetProcAddress_XL_SetPeerID_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
push str._XL_SetReportShowMode_4
push dword [esi + 0x1c]
call ebx
mov dword [esi + 0xc], eax
test eax, eax
jne 0x41ebbe
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41ebbe
push 1
call ebp
push eax
push str.GetProcAddress_XL_SetReportShowMode_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
push str._XL_SetAlwaysSendReport_4
push dword [esi + 0x1c]
call ebx
mov dword [esi + 0x10], eax
test eax, eax
jne 0x41ec02
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41ec02
push 1
call ebp
push eax
push str.GetProcAddress_XL_SetAlwaysSendReport_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
push str._XL_SetReportPath_4
push dword [esi + 0x1c]
call ebx
push str._XL_AddCrashProcess_12
push dword [esi + 0x1c]
mov dword [esi + 0x14], eax
call ebx
mov dword [esi + 0x18], eax
test eax, eax
jne 0x41ec53
push edi
call fcn.0041240d
pop ecx
test eax, eax
jne 0x41ec53
push 1
call ebp
push eax
push str.GetProcAddress_XL_SetAlwaysSendReport_failed__errno:
push esi
push edi
call fcn.00410c48
pop ecx
pop ecx
mov ecx, eax
call fcn.00416d4b
mov ecx, eax
call fcn.00416ccd
mov ecx, eax
call fcn.00413815
xor ebp, ebp
inc ebp
jmp 0x41ea6d