Function at 0x501650
Capabilities:
Create thread
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b12a0
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x63b404]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x24], esi
mov edx, dword [esi + 0x24]
test edx, edx
je 0x501696
mov eax, dword [esi + 0x28]
test eax, eax
je 0x501696
push eax
call fcn.0050b870
add esp, 4
jmp 0x50169b
call fcn.0050aa10
mov ebx, dword [esi + 0x18]
test ebx, ebx
je 0x50192d
cmp dword [ebx + 4], 0
jbe 0x50192d
cmp byte [esi + 8], 0
jne 0x501933
nop word [eax + eax]
cmp byte [esi + 8], 0
jne 0x501933
push 0xfa
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [ebx + 4]
xor esi, esi
xor edi, edi
mov byte [ebp - 0xd], 1
mov dword [ebp - 0x14], esi
test eax, eax
je 0x5017f3
cmp edi, eax
jae 0x5017e7
mov esi, dword [ebx]
test esi, esi
je 0x5017e4
mov esi, dword [esi + edi*4]
test esi, esi
je 0x5017e4
cmp byte [esi + 9], 0
je 0x5018f8
mov eax, dword [esi + 4]
test eax, eax
je 0x5018f8
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x5018f8
cmp dword [ebp - 0x1c], 0x103
je 0x5018f8
push 0x42
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0x20
call fcn.0056f8a6
mov ecx, dword [ebp - 0x28]
push 0xffffffffffffffff
push str.Game_scanner_thread__i_completed
inc ecx
mov dword [ebp - 0x2c], eax
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00585d85
mov ecx, dword [ebp - 0x28]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x28], ecx
push edi
lea eax, [ebp - 0x2c]
mov dword [ebp - 4], edx
push eax
push 0xf5
push str.GameManager::GameScanManager::gameDrmScan
push str.d:jenkinsworkspaceclient3.exe.fgmussexe_srcgamemanager.cpp
push 0x63ec80
call fcn.00550890
mov dword [ebp - 4], 0xffffffff
add esp, 0x30
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x5017c3
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x2c], 0
push esi
mov ecx, ebx
mov dword [ebp - 0x28], 0
call fcn.00545350
mov ecx, esi
call fcn.005014f0
push 0x2c
push esi
call fcn.0056f898
add esp, 8
mov esi, dword [ebp - 0x14]
mov eax, dword [ebx + 4]
inc edi
cmp edi, eax
jb 0x5016f3
push 0x68
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 0x33
call fcn.0056f8a6
mov ecx, dword [ebp - 0x30]
push 0xffffffffffffffff
push str.GameScanManager_has__i_game_scanner_threads_running
inc ecx
mov dword [ebp - 0x34], eax
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00585d85
mov ecx, dword [ebp - 0x30]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x30], ecx
push esi
lea eax, [ebp - 0x34]
mov dword [ebp - 4], 1
push eax
push 0x104
push str.GameManager::GameScanManager::gameDrmScan
push str.d:jenkinsworkspaceclient3.exe.fgmussexe_srcgamemanager.cpp
push 0x63ec80
call fcn.00550890
mov dword [ebp - 4], 0xffffffff
add esp, 0x30
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x50187d
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x34], 0
mov edx, dword [ebx + 4]
xor edi, edi
mov dword [ebp - 0x30], 0
test edx, edx
je 0x501920
cmp esi, 3
jae 0x501920
xor esi, esi
cmp edi, edx
jae 0x5018a9
mov eax, dword [ebx]
test eax, eax
je 0x5018a9
mov esi, dword [eax + edi*4]
mov ecx, edx
test esi, esi
je 0x501912
cmp byte [esi + 9], 0
jne 0x501912
mov eax, dword [esi + 4]
mov byte [esi + 9], 1
test eax, eax
jne 0x5018e5
push eax
push 4
push esi
push 0x550410
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push dword [esi + 0xc]
mov dword [esi + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [esi + 4]
test eax, eax
je 0x5018ec
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [ebp - 0x14]
mov ecx, dword [ebx + 4]
inc esi
mov dword [ebp - 0x14], esi
jmp 0x501915
cmp byte [esi + 9], 0
mov byte [ebp - 0xd], 0
je 0x5017e4
mov esi, dword [ebp - 0x14]
inc esi
mov dword [ebp - 0x14], esi
jmp 0x5017e7
mov esi, dword [ebp - 0x14]
inc edi
mov edx, ecx
cmp edi, ecx
jb 0x501891
cmp byte [ebp - 0xd], 0
mov esi, dword [ebp - 0x24]
je 0x5016c0
cmp byte [esi + 8], 0
je 0x50199e
push 0x62
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x30], 0x30
call fcn.0056f8a6
mov ecx, dword [ebp - 0x30]
push 0xffffffffffffffff
push str.Game_DRM_Scan_stopped_due_to_termination_request
inc ecx
mov dword [ebp - 0x34], eax
push ecx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00585d85
mov ecx, dword [ebp - 0x30]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x34]
mov dword [ebp - 4], 2
push eax
push 0x117
push str.GameManager::GameScanManager::gameDrmScan
push str.d:jenkinsworkspaceclient3.exe.fgmussexe_srcgamemanager.cpp
push 0x63ec80
call fcn.00550890
mov eax, dword [ebp - 0x34]
jmp 0x501a07
push 0x2e
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0x16
call fcn.0056f8a6
mov ecx, dword [ebp - 0x14]
push 0xffffffffffffffff
push str.Game_DRM_Scan_Complete
inc ecx
mov dword [ebp - 0x18], eax
push ecx
push eax
lea eax, [ebp - 0x1c]
push eax
call fcn.00585d85
mov ecx, dword [ebp - 0x14]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x14], ecx
lea eax, [ebp - 0x18]
mov dword [ebp - 4], 3
push eax
push 0x11b
push str.GameManager::GameScanManager::gameDrmScan
push str.d:jenkinsworkspaceclient3.exe.fgmussexe_srcgamemanager.cpp
push 0x63ec80
call fcn.00550890
mov eax, dword [ebp - 0x18]
add esp, 0x2c
test eax, eax
je 0x501a19
push 2
push eax
call fcn.0056f898
add esp, 8
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret