Function at 0x50b850
Capabilities:
Create thread
Reference sql statements
Resume thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b142f
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x63a404]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x28], ebx
lea ecx, [ebx + 2]
call fcn.0051c800
mov edi, eax
test edi, edi
je 0x50b8b9
push str.config
lea ecx, [ebp - 0x44]
call fcn.005447b0
push eax
mov ecx, edi
mov dword [ebp - 4], 0x17
call fcn.00545810
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
call fcn.004ffe40
mov byte [ebp - 0xd], 0
test edi, edi
je 0x50bac0
push 0x16
mov dword [ebp - 0x20], 0
mov esi, 0xa
call fcn.0056ea97
push 0xffffffffffffffff
push str.games.dat
mov ebx, eax
lea eax, [ebp - 0x20]
push 0xb
push ebx
push eax
mov dword [ebp - 0x4c], ebx
call fcn.00584f75
xor ecx, ecx
add esp, 0x18
test eax, eax
cmovne esi, ecx
mov dword [ebp - 0x48], esi
lea eax, [ebp - 0x4c]
mov dword [ebp - 4], 0x1c
push eax
mov ecx, edi
call fcn.00545810
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x50b925
push 2
push ebx
call fcn.0056ea89
add esp, 8
mov ecx, edi
call fcn.004ff0e0
mov dword [0x647ac8], eax
test eax, eax
je 0x50ba94
push 0x63dd70
mov ecx, eax
call fcn.004ff2e0
mov ecx, dword [0x647ac8]
push 0
test al, al
je 0x50ba87
push 0x63e1c0
call fcn.004ff490
mov ecx, dword [0x647ac8]
push 0
push 0x63e1e0
call fcn.004ff490
push str.playing
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0xd], 1
call fcn.005447b0
push str.ready
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0x1d
call fcn.005447b0
mov ebx, 6
mov byte [ebp - 4], 0x1e
push 0x6a
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x28], 0x34
call fcn.0056ea97
mov ecx, dword [ebp - 0x28]
push 0xffffffffffffffff
push str.UPDATE_games_SET__s___d___s___s_WHERE__s___s_
inc ecx
mov dword [ebp - 0x2c], eax
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00584f75
mov ecx, dword [ebp - 0x28]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x28], ecx
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 0x1f
push eax
push 0x63de50
lea eax, [ebp - 0x34]
push eax
push 0x63de50
push 1
lea eax, [ebp - 0x2c]
push 0x63dcf0
push eax
call fcn.00544d50
mov esi, eax
add esp, 0x34
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x50ba25
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x28], 0
test eax, eax
je 0x50ba45
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x34], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x30], 0
test eax, eax
je 0x50ba6c
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
test esi, esi
je 0x50ba97
mov ecx, dword [0x647ac8]
push 0
push esi
call fcn.004ff490
jmp 0x50ba97
push 0x63e030
call fcn.004ff490
mov byte [ebp - 0xd], al
mov ebx, dword [ebp - 0x14]
mov ecx, dword [edi]
test ecx, ecx
je 0x50baae
push 2
push ecx
call fcn.0056ea89
add esp, 8
mov dword [edi], 0
push 8
push edi
mov dword [edi + 4], 0
call fcn.0056ea89
add esp, 8
push 0x2c
call fcn.0056e7bf
mov dword [ebp - 0x28], eax
push ecx
mov ecx, eax
mov dword [ebp - 4], 0x20
call fcn.00501040
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x647ae0], esi
mov eax, dword [esi + 4]
mov byte [esi + 9], 1
test eax, eax
jne 0x50bb18
push eax
push 4
push esi
push 0x54f620
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 0x50bb1f
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xfa
call esi
mov ecx, dword [0x647ae0]
cmp byte [ecx + 0x20], 0
je 0x50bb25
push dword [ecx + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 8
call fcn.0056e7bf
mov dword [ebp - 0x28], eax
push 0x1c
mov dword [0x647ad8], eax
mov dword [eax], 0
mov dword [eax + 4], 0
call fcn.0056e7bf
mov edi, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], 0x21
mov esi, 0x25
mov eax, dword [0x647ad8]
push 0x4c
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 0
call fcn.0056ea97
push 0xffffffffffffffff
push str.GameManager:GameDownloadThreadManager
push 0x26
push eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x20]
push eax
call fcn.00584f75
xor ecx, ecx
add esp, 0x20
test eax, eax
cmovne esi, ecx
mov dword [ebp - 0x48], esi
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 0x22
push eax
lea ecx, [ebp - 0x44]
call fcn.005448d0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0x23
push eax
lea ecx, [edi + 0x10]
mov dword [edi], vtable.OThread.0
call fcn.00544950
mov eax, dword [ebp - 0x44]
mov dword [edi + 4], 0
mov word [edi + 8], 0
mov dword [edi + 0xc], 0xfffffffe
test eax, eax
je 0x50bbfa
push 2
push eax
call fcn.0056ea89
add esp, 8
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x50bc0c
push 2
push eax
call fcn.0056ea89
add esp, 8
mov eax, dword [ebp - 0x18]
mov dword [ebp - 4], 0xffffffff
mov dword [edi], vtable.GameManager::GameDownloadThreadManager.0
mov dword [edi + 0x18], eax
mov eax, dword [edi + 4]
mov dword [0x647adc], edi
mov byte [edi + 9], 1
test eax, eax
jne 0x50bc55
push eax
push 4
push edi
push 0x54f620
push eax
push eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
push dword [edi + 0xc]
mov dword [edi + 4], eax
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov eax, dword [edi + 4]
test eax, eax
je 0x50bc5c
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push str.downloading
lea ecx, [ebp - 0x4c]
call fcn.005447b0
or ebx, 8
mov dword [ebp - 0x14], ebx
push str.installing
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0x24
call fcn.005447b0
mov byte [ebp - 4], 0x25
push 0x72
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 0x38
call fcn.0056ea97
mov ecx, dword [ebp - 0x30]
push 0xffffffffffffffff
push str.SELECT__s__s__s_FROM_games_WHERE__s___s_OR__s___s_
inc ecx
mov dword [ebp - 0x34], eax
push ecx
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00584f75
mov ecx, dword [ebp - 0x30]
xor edx, edx
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x30], ecx
lea eax, [ebp - 0x4c]
mov byte [ebp - 4], 0x26
push eax
push 0x63de50
lea eax, [ebp - 0x44]
push eax
push 0x63de50
push 0x63dd98
push 0x63db90
lea eax, [ebp - 0x34]
push 0x63de58
push eax
call fcn.00544d50
mov ebx, eax
add esp, 0x38
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x20], ebx
test eax, eax
je 0x50bd18
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], 0
test eax, eax
je 0x50bd38
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x44], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x40], 0
test eax, eax
je 0x50bd5f
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
test ebx, ebx
je 0x50bfbb
push 0xa
mov dword [ebp - 0x18], 0
mov esi, 4
call fcn.0056ea97
push 0xffffffffffffffff
push str.data
push 5
push eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x18]
push eax
call fcn.00584f75
xor ecx, ecx
add esp, 0x18
test eax, eax
cmovne esi, ecx
mov dword [ebp - 0x38], esi
lea eax, [ebp - 0x3c]
mov dword [ebp - 4], 0x27
mov ecx, dword [0x647ac8]
push eax
push ebx
call fcn.004ff890
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x18], esi
test eax, eax
je 0x50bdd9
push 2
push eax
call fcn.0056ea89
add esp, 8
test esi, esi
je 0x50bf92
push 0xa
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x38], 4
call fcn.0056ea97
mov ecx, dword [ebp - 0x38]
push 0xffffffffffffffff
push str.data
inc ecx
mov dword [ebp - 0x3c], eax
push ecx
push eax
lea eax, [ebp - 0x24]
push eax
call fcn.00584f75
mov ecx, dword [ebp - 0x38]
xor edx, edx
add esp, 0x18
test eax, eax
cmovne ecx, edx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 4], 0x28
mov ecx, esi
mov eax, dword [ebp - 0x14]
or eax, 0x11
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x3c]
push eax
call fcn.00531970
test al, al
je 0x50be54
mov ecx, esi
call fcn.00533830
mov byte [ebp - 0xe], 1
test eax, eax
jne 0x50be58
mov byte [ebp - 0xe], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x50be78
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebp - 0x3c], 0
cmp byte [ebp - 0xe], 0
mov dword [ebp - 0x38], 0
je 0x50bf8a
xor ebx, ebx
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00533830
test eax, eax
je 0x50bf87
nop dword [eax]
push ebx
mov ecx, esi
call fcn.00531ee0
push 0x63de58
mov ecx, esi
call fcn.00534640
push 0x63db90
mov ecx, esi
mov ebx, eax
call fcn.00534640
push 0x63dd98
mov ecx, esi
mov edi, eax
call fcn.00534640
mov esi, eax
mov edx, ebx
push esi
mov ecx, edi
call fcn.0050d8d0
mov ecx, dword [ebp - 0x18]
add esp, 4
call fcn.00535c90
test ebx, ebx
je 0x50bf14
mov eax, dword [ebx]
test eax, eax
je 0x50bf02
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056ea89
add esp, 8
test edi, edi
je 0x50bf41
mov eax, dword [edi]
test eax, eax
je 0x50bf2f
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [edi], 0
push 8
push edi
mov dword [edi + 4], 0
call fcn.0056ea89
add esp, 8
test esi, esi
je 0x50bf6e
mov eax, dword [esi]
test eax, eax
je 0x50bf5c
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [esi], 0
push 8
push esi
mov dword [esi + 4], 0
call fcn.0056ea89
add esp, 8
mov ebx, dword [ebp - 0x14]
mov esi, dword [ebp - 0x18]
inc ebx
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00533830
cmp ebx, eax
jb 0x50bea0
mov ebx, dword [ebp - 0x20]
push ecx
mov ecx, esi
call fcn.004feb60
mov eax, dword [ebx]
test eax, eax
je 0x50bfa9
push 2
push eax
call fcn.0056ea89
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056ea89
add esp, 8
mov al, byte [ebp - 0xd]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret