Function at 0x10054b00
Capabilities:
Get common file path
Link many functions at runtime
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100703d5
mov eax, dword fs:[0]
push eax
sub esp, 0x274
mov eax, dword [0x100af010]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
lea eax, [ebp - 0x21c]
push eax
push 0
push 0
push 0x100724b0
call dword [sym.imp.SHELL32.dll_SHGetKnownFolderPath]
mov edi, eax
test edi, edi
jns 0x10054bb1
push str.SHGetKnownFolderPath_failed_with_code:
lea ecx, [ebp - 0x238]
call fcn.10055840
mov esi, eax
mov edx, edi
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x250]
call fcn.10054920
mov byte [ebp - 4], 1
push 0x30
push str.FreedomFactory_Tools
push eax
mov ecx, esi
call fcn.10055780
mov ecx, eax
call fcn.10055700
push eax
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
lea ecx, [ebp - 0x250]
call fcn.100557f0
lea ecx, [ebp - 0x238]
call fcn.100557f0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
push ecx
push dword [ebp - 0x21c]
mov esi, 0x104
push ecx
mov edx, esi
lea ecx, [ebp - 0x218]
call fcn.10054ab0
push dword [ebp - 0x21c]
mov edi, eax
call dword [sym.imp.ole32.dll_CoTaskMemFree]
test edi, edi
jns 0x10054c0c
push str.StringCchCopyW_failed_with_code:
lea ecx, [ebp - 0x238]
call fcn.10055840
mov esi, eax
mov edx, edi
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x250]
call fcn.10054920
mov byte [ebp - 4], 3
jmp 0x10054b74
mov ecx, esi
lea eax, [ebp - 0x218]
cmp word [eax], 0
je 0x10054c22
add eax, 2
sub ecx, 1
jne 0x10054c14
xor eax, eax
mov edi, 0x80070057
test ecx, ecx
cmovne edi, eax
je 0x10055685
mov edx, ecx
lea eax, [ecx - 0x104]
neg edx
push ecx
sbb edx, edx
and edx, eax
lea eax, [ebp - 0x218]
add edx, esi
sub esi, ecx
push str.dinput8.dll
push ecx
add esi, esi
neg ecx
sbb ecx, ecx
and ecx, esi
add ecx, eax
call fcn.10054ab0
mov edi, eax
test edi, edi
js 0x10055685
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [0x100b21c8], eax
test eax, eax
jne 0x10054c9a
push 0x30
push str.FreedomFactory_Tools
push str.Cant_load_original_dinput8.dll
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x10054ba9
push 0x100891d0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x100aff94], eax
test eax, eax
jne 0x10054ea6
mov dword [ebp - 0x238], 0
push 0x26
push str.Cant_find_function_DirectInput8Create
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
mov dword [ebp - 4], 0xffffffff
call fcn.100558c0
mov dword [ebp - 4], 7
mov edx, dword [ebp - 0x224]
mov eax, edx
mov ecx, dword [ebp - 0x228]
sub eax, ecx
push 0xd
push str._nError_code:
cmp eax, 0xd
jb 0x10054d4a
cmp edx, 0x10
lea esi, [ebp - 0x238]
lea eax, [ecx + 0xd]
cmovae esi, dword [ebp - 0x238]
add esi, ecx
mov dword [ebp - 0x228], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 0xd], 0
add esp, 0xc
lea esi, [ebp - 0x238]
jmp 0x10054d5f
push dword [ebp - 0x220]
lea ecx, [ebp - 0x238]
push 0xd
call fcn.10055a00
mov esi, eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x250]
call fcn.10054a00
mov ecx, eax
mov byte [ebp - 4], 8
cmp dword [ecx + 0x14], 0x10
mov edi, dword [ecx + 0x10]
jb 0x10054d7f
mov ecx, dword [ecx]
mov edx, dword [esi + 0x14]
mov eax, edx
mov ebx, dword [esi + 0x10]
sub eax, ebx
cmp edi, eax
ja 0x10054dc3
mov dword [ebp - 0x220], esi
lea eax, [edi + ebx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x10054da8
mov eax, dword [esi]
mov dword [ebp - 0x220], eax
push edi
add eax, ebx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x220]
add esp, 0xc
add eax, edi
mov byte [eax + ebx], 0
jmp 0x10054dd5
push edi
push ecx
push dword [ebp - 0x220]
mov ecx, esi
push edi
call fcn.10055a00
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x10054ddd
mov esi, dword [esi]
push 0x30
push str.FreedomFactory_Tools
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 7
mov edx, dword [ebp - 0x23c]
cmp edx, 0x10
jb 0x10054e27
mov ecx, dword [ebp - 0x250]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10054e1d
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10054e75
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
cmp edx, 0x10
jb 0x10054e85
mov ecx, dword [ebp - 0x238]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10054e7b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x10054e7b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
push str.DllCanUnloadNow
push dword [0x100b21c8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100aff98], eax
test eax, eax
jne 0x1005508f
mov dword [ebp - 0x238], eax
push 0x23
push str.Cant_find_function_DllCanUnloadNow
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], al
mov dword [ebp - 4], 0xffffffff
call fcn.100558c0
mov dword [ebp - 4], 0xa
mov edx, dword [ebp - 0x224]
mov eax, edx
mov ecx, dword [ebp - 0x228]
sub eax, ecx
push 0xd
push str._nError_code:
cmp eax, 0xd
jb 0x10054f4c
cmp edx, 0x10
lea esi, [ebp - 0x238]
lea eax, [ecx + 0xd]
cmovae esi, dword [ebp - 0x238]
add esi, ecx
mov dword [ebp - 0x228], eax
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + 0xd], 0
lea edi, [ebp - 0x238]
jmp 0x10054f61
push dword [ebp - 0x220]
lea ecx, [ebp - 0x238]
push 0xd
call fcn.10055a00
mov edi, eax
call ebx
mov edx, eax
lea ecx, [ebp - 0x250]
call fcn.10054a00
mov ecx, eax
mov byte [ebp - 4], 0xb
cmp dword [ecx + 0x14], 0x10
mov ebx, dword [ecx + 0x10]
jb 0x10054f81
mov ecx, dword [ecx]
mov esi, dword [edi + 0x14]
mov eax, esi
mov edx, dword [edi + 0x10]
sub eax, edx
cmp ebx, eax
ja 0x10054fb2
lea eax, [edx + ebx]
mov dword [edi + 0x10], eax
mov eax, edi
cmp esi, 0x10
jb 0x10054f9e
mov eax, dword [edi]
push ebx
lea esi, [eax + edx]
push ecx
push esi
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
mov byte [esi + ebx], 0
jmp 0x10054fc4
push ebx
push ecx
push dword [ebp - 0x220]
mov ecx, edi
push ebx
call fcn.10055a00
mov edi, eax
cmp dword [edi + 0x14], 0x10
jb 0x10054fcc
mov edi, dword [edi]
push 0x30
push str.FreedomFactory_Tools
push edi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 0xa
mov edx, dword [ebp - 0x23c]
cmp edx, 0x10
jb 0x10055016
mov ecx, dword [ebp - 0x250]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005500c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10055064
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
cmp edx, 0x10
jb 0x10055074
mov ecx, dword [ebp - 0x238]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005506a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1005506a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
push str.DllGetClassObject
push dword [0x100b21c8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100aff90], eax
test eax, eax
jne 0x1005528f
mov dword [ebp - 0x238], eax
push 0x25
push str.Cant_find_function_DllGetClassObject
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], al
mov dword [ebp - 4], 0xffffffff
call fcn.100558c0
mov dword [ebp - 4], 0xd
mov edx, dword [ebp - 0x224]
mov eax, edx
mov ecx, dword [ebp - 0x228]
sub eax, ecx
push 0xd
push str._nError_code:
cmp eax, 0xd
jb 0x10055135
cmp edx, 0x10
lea esi, [ebp - 0x238]
lea eax, [ecx + 0xd]
cmovae esi, dword [ebp - 0x238]
add esi, ecx
mov dword [ebp - 0x228], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 0xd], 0
add esp, 0xc
lea esi, [ebp - 0x238]
jmp 0x1005514a
push dword [ebp - 0x220]
lea ecx, [ebp - 0x238]
push 0xd
call fcn.10055a00
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x250]
call fcn.10054a00
mov ecx, eax
mov byte [ebp - 4], 0xe
cmp dword [ecx + 0x14], 0x10
mov edi, dword [ecx + 0x10]
jb 0x1005516e
mov ecx, dword [ecx]
mov edx, dword [esi + 0x14]
mov eax, edx
mov ebx, dword [esi + 0x10]
sub eax, ebx
cmp edi, eax
ja 0x100551b2
mov dword [ebp - 0x220], esi
lea eax, [edi + ebx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x10055197
mov eax, dword [esi]
mov dword [ebp - 0x220], eax
push edi
add eax, ebx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x220]
add esp, 0xc
add eax, edi
mov byte [eax + ebx], 0
jmp 0x100551c4
push edi
push ecx
push dword [ebp - 0x220]
mov ecx, esi
push edi
call fcn.10055a00
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x100551cc
mov esi, dword [esi]
push 0x30
push str.FreedomFactory_Tools
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x23c]
cmp edx, 0x10
jb 0x10055216
mov ecx, dword [ebp - 0x250]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005520c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10055264
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
cmp edx, 0x10
jb 0x10055274
mov ecx, dword [ebp - 0x238]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005526a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1005526a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
push str.DllRegisterServer
push dword [0x100b21c8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100aff9c], eax
test eax, eax
jne 0x1005548f
mov dword [ebp - 0x238], eax
push 0x25
push str.Cant_find_function_DllRegisterServer
lea ecx, [ebp - 0x238]
mov dword [ebp - 0x228], eax
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], al
mov dword [ebp - 4], 0xffffffff
call fcn.100558c0
mov dword [ebp - 4], 0x10
mov edx, dword [ebp - 0x224]
mov eax, edx
mov ecx, dword [ebp - 0x228]
sub eax, ecx
push 0xd
push str._nError_code:
cmp eax, 0xd
jb 0x10055335
cmp edx, 0x10
lea esi, [ebp - 0x238]
lea eax, [ecx + 0xd]
cmovae esi, dword [ebp - 0x238]
add esi, ecx
mov dword [ebp - 0x228], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 0xd], 0
add esp, 0xc
lea esi, [ebp - 0x238]
jmp 0x1005534a
push dword [ebp - 0x220]
lea ecx, [ebp - 0x238]
push 0xd
call fcn.10055a00
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x250]
call fcn.10054a00
mov ecx, eax
mov byte [ebp - 4], 0x11
cmp dword [ecx + 0x14], 0x10
mov edi, dword [ecx + 0x10]
jb 0x1005536e
mov ecx, dword [ecx]
mov edx, dword [esi + 0x14]
mov eax, edx
mov ebx, dword [esi + 0x10]
sub eax, ebx
cmp edi, eax
ja 0x100553b2
mov dword [ebp - 0x220], esi
lea eax, [edi + ebx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x10055397
mov eax, dword [esi]
mov dword [ebp - 0x220], eax
push edi
add eax, ebx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x220]
add esp, 0xc
add eax, edi
mov byte [eax + ebx], 0
jmp 0x100553c4
push edi
push ecx
push dword [ebp - 0x220]
mov ecx, esi
push edi
call fcn.10055a00
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x100553cc
mov esi, dword [esi]
push 0x30
push str.FreedomFactory_Tools
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov byte [ebp - 4], 0x10
mov edx, dword [ebp - 0x23c]
cmp edx, 0x10
jb 0x10055416
mov ecx, dword [ebp - 0x250]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005540c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10055464
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x224]
mov dword [ebp - 0x240], 0
mov dword [ebp - 0x23c], 0xf
mov byte [ebp - 0x250], 0
cmp edx, 0x10
jb 0x10055474
mov ecx, dword [ebp - 0x238]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005546a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1005546a
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov dword [ebp - 0x228], 0
mov dword [ebp - 0x224], 0xf
mov byte [ebp - 0x238], 0
push str.DllUnregisterServer
push dword [0x100b21c8]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x100aff8c], eax
test eax, eax
jne 0x10055669
mov dword [ebp - 0x268], eax
push 0x27
push str.Cant_find_function_DllUnregisterServer
lea ecx, [ebp - 0x268]
mov dword [ebp - 0x258], eax
mov dword [ebp - 0x254], 0xf
mov byte [ebp - 0x268], al
mov dword [ebp - 4], 0xffffffff
call fcn.100558c0
mov dword [ebp - 4], 0x13
mov edx, dword [ebp - 0x254]
mov eax, edx
mov ecx, dword [ebp - 0x258]
sub eax, ecx
push 0xd
push str._nError_code:
cmp eax, 0xd
jb 0x10055535
cmp edx, 0x10
lea esi, [ebp - 0x268]
lea eax, [ecx + 0xd]
cmovae esi, dword [ebp - 0x268]
add esi, ecx
mov dword [ebp - 0x258], eax
push esi
call sub.VCRUNTIME140.dll_memmove
mov byte [esi + 0xd], 0
add esp, 0xc
lea esi, [ebp - 0x268]
jmp 0x1005554a
push dword [ebp - 0x220]
lea ecx, [ebp - 0x268]
push 0xd
call fcn.10055a00
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea ecx, [ebp - 0x280]
call fcn.10054a00
mov ecx, eax
mov byte [ebp - 4], 0x14
cmp dword [ecx + 0x14], 0x10
mov edi, dword [ecx + 0x10]
jb 0x1005556e
mov ecx, dword [ecx]
mov edx, dword [esi + 0x14]
mov eax, edx
mov ebx, dword [esi + 0x10]
sub eax, ebx
cmp edi, eax
ja 0x100555b2
mov dword [ebp - 0x220], esi
lea eax, [edi + ebx]
mov dword [esi + 0x10], eax
mov eax, esi
cmp edx, 0x10
jb 0x10055597
mov eax, dword [esi]
mov dword [ebp - 0x220], eax
push edi
add eax, ebx
push ecx
push eax
call sub.VCRUNTIME140.dll_memmove
mov eax, dword [ebp - 0x220]
add esp, 0xc
add eax, edi
mov byte [eax + ebx], 0
jmp 0x100555c4
push edi
push ecx
push dword [ebp - 0x220]
mov ecx, esi
push edi
call fcn.10055a00
mov esi, eax
cmp dword [esi + 0x14], 0x10
jb 0x100555cc
mov esi, dword [esi]
push 0x30
push str.FreedomFactory_Tools
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
mov edx, dword [ebp - 0x26c]
cmp edx, 0x10
jb 0x10055612
mov ecx, dword [ebp - 0x280]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x10055608
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x10055659
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov edx, dword [ebp - 0x254]
mov dword [ebp - 0x270], 0
mov dword [ebp - 0x26c], 0xf
mov byte [ebp - 0x280], 0
cmp edx, 0x10
jb 0x10055669
mov ecx, dword [ebp - 0x268]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x1005565f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x1005565f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.1006e36a
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1006dc26
mov esp, ebp
pop ebp
ret
push str.StringCchCatW_failed_with_code:
lea ecx, [ebp - 0x238]
call fcn.10055840
mov esi, eax
mov edx, edi
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x250]
call fcn.10054920
mov byte [ebp - 4], 5
jmp 0x10054b74