Function at 0x10008540
Capabilities:
Resume thread

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x314
mov eax, dword [esp + 0x32c]
test eax, eax
je 0x1000838a
cmp eax, 1
jne 0x100084dd
cmp byte [0x10019244], 0
jne 0x100084dd
mov edi, dword [esp + 0x328]
mov byte [0x10019244], 1
lea esi, [esp + 8]
push 0x104
push 0
push esi
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x100084ef
push esi
call fcn.100013d0
add esp, 4
mov dword [0x10019248], eax
push 0x104
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x100084ef
push esi
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameA]
test eax, eax
je 0x100084ef
mov esi, eax
push 0x100172f0
push eax
call fcn.100022d0
add esp, 8
test al, al
jne 0x10008133
push 0x100172fc
push esi
call fcn.100022d0
add esp, 8
test al, al
je 0x10008410
sub esp, 0x14
lea esi, [esp + 0x120]
mov dword [esp + 0x10], esi
movaps xmm0, xmmword [0x100172e0]
movups xmmword [esp], xmm0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x10008525
push esi
call fcn.10003a40
add esp, 4
mov dword [0x1001924c], eax
mov dword [esp + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
lea ecx, [esp + 4]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, eax
cmp dword [esp + 4], 2
jl 0x100083ea
mov ebx, 1
mov dword [esp], 0
mov ebp, dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
jmp 0x100081c4
push edi
call fcn.10003ca0
add esp, 4
inc ebx
cmp ebx, dword [esp + 4]
jge 0x100083f5
push dword [esi + ebx*4]
call fcn.10003a40
add esp, 4
mov edi, eax
push str.__dsp
push eax
call fcn.10004b80
add esp, 8
test eax, eax
js 0x100081b0
mov eax, dword [0x10019250]
test eax, eax
je 0x100081f5
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [edi + 4]
add eax, 0xfffffffa
push eax
push 6
push edi
call fcn.10004120
add esp, 0xc
mov dword [0x10019250], eax
cmp dword [eax + 4], 0
je 0x100081b0
mov eax, dword [0x10019254]
test eax, eax
je 0x10008224
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [0x1001924c]
push dword [eax]
call fcn.10003a40
add esp, 4
mov dword [0x10019254], eax
push 0x10017348
push eax
call fcn.10003db0
add esp, 8
push 0x1001734c
push dword [0x10019254]
call fcn.10003db0
add esp, 8
push 0x10017348
push dword [0x10019254]
call fcn.10003db0
add esp, 8
mov eax, dword [0x10019250]
push dword [eax]
push dword [0x10019254]
call fcn.10003db0
add esp, 8
push str.Roaming
push dword [0x10019254]
call fcn.10003db0
add esp, 8
mov eax, dword [0x10019254]
push dword [eax]
call fcn.10008760
add esp, 4
test al, al
jne 0x100082bc
mov eax, dword [0x10019254]
push 0
push dword [eax]
push 0
call ebp
test eax, eax
jne 0x1000836f
mov eax, dword [0x10019258]
test eax, eax
je 0x100082ce
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [0x1001924c]
push dword [eax]
call fcn.10003a40
add esp, 4
mov dword [0x10019258], eax
push 0x10017348
push eax
call fcn.10003db0
add esp, 8
push 0x1001734c
push dword [0x10019258]
call fcn.10003db0
add esp, 8
push 0x10017348
push dword [0x10019258]
call fcn.10003db0
add esp, 8
mov eax, dword [0x10019250]
push dword [eax]
push dword [0x10019258]
call fcn.10003db0
add esp, 8
push str.User
push dword [0x10019258]
call fcn.10003db0
add esp, 8
mov eax, dword [0x10019258]
mov cl, 1
mov dword [esp], ecx
push dword [eax]
call fcn.10008760
add esp, 4
test al, al
jne 0x100081b0
mov eax, dword [0x10019258]
push 0
push dword [eax]
push 0
call ebp
test eax, eax
je 0x100081b0
push 0x10
push 0x10017330
push str.Could_not_initialize_the_shared_DLL_nCould_not_create_the_needed_directories
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
mov eax, dword [0x10019248]
test eax, eax
je 0x1000839c
push eax
call fcn.100015e0
add esp, 4
mov eax, dword [0x1001924c]
test eax, eax
je 0x100083ae
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [0x10019250]
test eax, eax
je 0x100083c0
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [0x10019254]
test eax, eax
je 0x100083d2
push eax
call fcn.10003ca0
add esp, 4
mov eax, dword [0x10019258]
test eax, eax
je 0x100084dd
push eax
call fcn.10003ca0
jmp 0x100084da
mov dword [esp], 0
test esi, esi
je 0x100083fc
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ebx, dword [esp]
push str.kernelbase.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x10008434
jmp 0x10008421
xor ebx, ebx
push str.kernelbase.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x10008434
push str.kernelbase.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x1000850a
push str.CreateProcessInternalW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000850a
push 0
push 0x10008540
push eax
call fcn.100064c0
add esp, 0xc
mov dword [0x1001925c], eax
push eax
call fcn.10007e70
add esp, 4
mov dword [0x10019260], eax
push dword [0x1001925c]
call fcn.10007df0
add esp, 4
test bl, 1
je 0x100084dd
push str.windows.storage.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
jne 0x1000849c
push str.windows.storage.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x1000850a
push 0x10017435
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x1000850a
push 0
push 0x100086f0
push eax
call fcn.100064c0
add esp, 0xc
mov dword [0x10019264], eax
push eax
call fcn.10007e70
add esp, 4
mov dword [0x10019268], eax
push dword [0x10019264]
call fcn.10007df0
add esp, 4
mov eax, 1
add esp, 0x314
pop esi
pop edi
pop ebx
pop ebp
ret 0xc
push 0x10
push 0x10017330
push str.Could_not_initialize_the_shared_DLL
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push 0x10
push 0x10017330
push str.Could_not_hook
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push 0x10
push 0x10017330
push str.Could_not_get_the_AppData_directory_path
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0xffffffffffffffff
call sub.api_ms_win_crt_runtime_l1_1_0.dll_exit
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x68]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x5c]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x58]
mov dword [esp + 0x14], eax
mov ebp, dword [esp + 0x54]
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x20], eax
mov ebx, dword [esp + 0x44]
mov edi, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
push str.discord.exe
push ebx
call fcn.10004ae0
add esp, 8
test al, al
jne 0x100085bf
push str.update.exe
push ebx
call fcn.10004ae0
add esp, 8
test al, al
je 0x100086e2
mov dword [esp], edi
mov dword [esp + 4], esi
push ebx
call fcn.10003a40
add esp, 4
mov esi, eax
push str..exe_
push ebx
call fcn.10004ca0
add esp, 8
cmp eax, 0xffffffff
je 0x100085f6
mov edi, eax
add edi, 5
mov ebx, ebp
mov eax, dword [0x10019250]
test eax, eax
jne 0x10008614
jmp 0x10008650
push str..exe
push ebx
call fcn.10004ca0
add esp, 8
mov edi, eax
add edi, 4
mov ebx, ebp
mov eax, dword [0x10019250]
test eax, eax
je 0x10008650
cmp dword [eax + 4], 0
je 0x10008650
push str.___dsp
call fcn.10003a40
add esp, 4
mov ebx, eax
mov eax, dword [0x10019250]
push dword [eax]
push ebx
call fcn.10003db0
add esp, 8
push dword [ebx]
push edi
push esi
call fcn.10003fd0
add esp, 0xc
push ebx
mov ebx, ebp
call fcn.10003ca0
add esp, 4
push str.___multi_instance
push edi
push esi
call fcn.10003fd0
add esp, 0xc
mov eax, ebx
or eax, 4
push dword [esp + 8]
mov ebp, dword [esp + 0x28]
push ebp
push dword [esp + 0x14]
push dword [esp + 0x1c]
push dword [esp + 0x24]
push eax
push dword [esp + 0x30]
push dword [esp + 0x38]
push dword [esp + 0x40]
push dword [esi]
push dword [esp + 0x28]
push dword [esp + 0x30]
call dword [0x10019260]
mov edi, eax
push esi
call fcn.10003ca0
add esp, 4
test edi, edi
je 0x100086d4
push dword [ebp]
push dword [0x10019248]
call fcn.100087a0
add esp, 8
test bl, 4
jne 0x100086c4
push dword [ebp + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push dword [0x1001925c]
call fcn.10007e30
add esp, 4
jmp 0x100086d6
xor edi, edi
mov eax, edi
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret 0x30
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
jmp dword [0x10019260]