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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5b224f
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push esi
push edi
mov eax, dword [0x63b404]
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.0051d5f0
mov edi, eax
test edi, edi
je 0x50c699
push str.config
lea ecx, [ebp - 0x44]
call fcn.005455a0
push eax
mov ecx, edi
mov dword [ebp - 4], 0x17
call fcn.00546600
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0xffffffff
call fcn.00500b70
mov byte [ebp - 0xd], 0
test edi, edi
je 0x50c8a0
push 0x16
mov dword [ebp - 0x20], 0
mov esi, 0xa
call fcn.0056f8a6
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.00585d85
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.00546600
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x50c705
push 2
push ebx
call fcn.0056f898
add esp, 8
mov ecx, edi
call fcn.004ffe10
mov dword [0x648be8], eax
test eax, eax
je 0x50c874
push 0x63edb0
mov ecx, eax
call fcn.00500010
mov ecx, dword [0x648be8]
push 0
test al, al
je 0x50c867
push 0x63f208
call fcn.005001c0
mov ecx, dword [0x648be8]
push 0
push 0x63f228
call fcn.005001c0
push str.playing
lea ecx, [ebp - 0x1c]
mov byte [ebp - 0xd], 1
call fcn.005455a0
push str.ready
lea ecx, [ebp - 0x34]
mov dword [ebp - 4], 0x1d
call fcn.005455a0
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.0056f8a6
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.00585d85
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 0x63ee90
lea eax, [ebp - 0x34]
push eax
push 0x63ee90
push 1
lea eax, [ebp - 0x2c]
push 0x63ed30
push eax
call fcn.00545b40
mov esi, eax
add esp, 0x34
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x50c805
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x28], 0
test eax, eax
je 0x50c825
push 2
push eax
call fcn.0056f898
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 0x50c84c
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
test esi, esi
je 0x50c877
mov ecx, dword [0x648be8]
push 0
push esi
call fcn.005001c0
jmp 0x50c877
push 0x63f078
call fcn.005001c0
mov byte [ebp - 0xd], al
mov ebx, dword [ebp - 0x14]
mov ecx, dword [edi]
test ecx, ecx
je 0x50c88e
push 2
push ecx
call fcn.0056f898
add esp, 8
mov dword [edi], 0
push 8
push edi
mov dword [edi + 4], 0
call fcn.0056f898
add esp, 8
push 0x2c
call fcn.0056f5ce
mov dword [ebp - 0x28], eax
push ecx
mov ecx, eax
mov dword [ebp - 4], 0x20
call fcn.00501d70
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x648c00], esi
mov eax, dword [esi + 4]
mov byte [esi + 9], 1
test eax, eax
jne 0x50c8f8
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 0x50c8ff
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0xfa
call esi
mov ecx, dword [0x648c00]
cmp byte [ecx + 0x20], 0
je 0x50c905
push dword [ecx + 0x1c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 8
call fcn.0056f5ce
mov dword [ebp - 0x28], eax
push 0x1c
mov dword [0x648bf8], eax
mov dword [eax], 0
mov dword [eax + 4], 0
call fcn.0056f5ce
mov edi, eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 4], 0x21
mov esi, 0x25
mov eax, dword [0x648bf8]
push 0x4c
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x20], 0
call fcn.0056f8a6
push 0xffffffffffffffff
push str.GameManager:GameDownloadThreadManager
push 0x26
push eax
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x20]
push eax
call fcn.00585d85
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.005456c0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 0x23
push eax
lea ecx, [edi + 0x10]
mov dword [edi], vtable.OThread.0
call fcn.00545740
mov eax, dword [ebp - 0x44]
mov dword [edi + 4], 0
mov word [edi + 8], 0
mov dword [edi + 0xc], 0xfffffffe
test eax, eax
je 0x50c9da
push 2
push eax
call fcn.0056f898
add esp, 8
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x50c9ec
push 2
push eax
call fcn.0056f898
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 [0x648bfc], edi
mov byte [edi + 9], 1
test eax, eax
jne 0x50ca35
push eax
push 4
push edi
push 0x550410
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 0x50ca3c
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push str.downloading
lea ecx, [ebp - 0x4c]
call fcn.005455a0
or ebx, 8
mov dword [ebp - 0x14], ebx
push str.installing
lea ecx, [ebp - 0x44]
mov dword [ebp - 4], 0x24
call fcn.005455a0
mov byte [ebp - 4], 0x25
push 0x72
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 0x38
call fcn.0056f8a6
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.00585d85
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 0x63ee90
lea eax, [ebp - 0x44]
push eax
push 0x63ee90
push 0x63edd8
push 0x63ebd0
lea eax, [ebp - 0x34]
push 0x63ee98
push eax
call fcn.00545b40
mov ebx, eax
add esp, 0x38
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x20], ebx
test eax, eax
je 0x50caf8
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], 0
test eax, eax
je 0x50cb18
push 2
push eax
call fcn.0056f898
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 0x50cb3f
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x48], 0
test ebx, ebx
je 0x50cd9b
push 0xa
mov dword [ebp - 0x18], 0
mov esi, 4
call fcn.0056f8a6
push 0xffffffffffffffff
push str.data
push 5
push eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x18]
push eax
call fcn.00585d85
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 [0x648be8]
push eax
push ebx
call fcn.005005c0
mov esi, eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x18], esi
test eax, eax
je 0x50cbb9
push 2
push eax
call fcn.0056f898
add esp, 8
test esi, esi
je 0x50cd72
push 0xa
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x38], 4
call fcn.0056f8a6
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.00585d85
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.00532760
test al, al
je 0x50cc34
mov ecx, esi
call fcn.00534620
mov byte [ebp - 0xe], 1
test eax, eax
jne 0x50cc38
mov byte [ebp - 0xe], 0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x50cc58
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebp - 0x3c], 0
cmp byte [ebp - 0xe], 0
mov dword [ebp - 0x38], 0
je 0x50cd6a
xor ebx, ebx
mov ecx, esi
mov dword [ebp - 0x14], ebx
call fcn.00534620
test eax, eax
je 0x50cd67
nop dword [eax]
push ebx
mov ecx, esi
call fcn.00532cd0
push 0x63ee98
mov ecx, esi
call fcn.00535430
push 0x63ebd0
mov ecx, esi
mov ebx, eax
call fcn.00535430
push 0x63edd8
mov ecx, esi
mov edi, eax
call fcn.00535430
mov esi, eax
mov edx, ebx
push esi
mov ecx, edi
call fcn.0050e6b0
mov ecx, dword [ebp - 0x18]
add esp, 4
call fcn.00536a80
test ebx, ebx
je 0x50ccf4
mov eax, dword [ebx]
test eax, eax
je 0x50cce2
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056f898
add esp, 8
test edi, edi
je 0x50cd21
mov eax, dword [edi]
test eax, eax
je 0x50cd0f
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [edi], 0
push 8
push edi
mov dword [edi + 4], 0
call fcn.0056f898
add esp, 8
test esi, esi
je 0x50cd4e
mov eax, dword [esi]
test eax, eax
je 0x50cd3c
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [esi], 0
push 8
push esi
mov dword [esi + 4], 0
call fcn.0056f898
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.00534620
cmp ebx, eax
jb 0x50cc80
mov ebx, dword [ebp - 0x20]
push ecx
mov ecx, esi
call fcn.004ff890
mov eax, dword [ebx]
test eax, eax
je 0x50cd89
push 2
push eax
call fcn.0056f898
add esp, 8
mov dword [ebx], 0
push 8
push ebx
mov dword [ebx + 4], 0
call fcn.0056f898
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