Function at 0x4d5f20
Capabilities:
Create thread
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x58dc48
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x70]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x80]
xor edi, edi
mov eax, dword [ebp + 0x48]
test eax, eax
je 0x4d5f6e
mov ecx, dword [eax + 0xc]
cmp ecx, 7
jne 0x4d5f64
mov eax, dword [eax + 0x18]
jmp 0x4d5f70
cmp ecx, 2
jne 0x4d5f6e
mov eax, dword [eax + 0x18]
jmp 0x4d5f70
xor eax, eax
cmp edi, eax
jge 0x4d6183
lea eax, [esp + 0x18]
push eax
mov ecx, 0x5adcfc
call fcn.00481430
lea ecx, [esp + 0x80]
push ecx
mov ecx, str.game_name
mov dword [esp + 0x7c], 0
call fcn.00481430
lea eax, [ebp + 0x24]
lea esi, [esp + 0x20]
mov byte [esp + 0x78], 1
call fcn.00518560
lea edx, [esp + 0x18]
push edx
lea ecx, [esp + 0x84]
push ecx
lea edx, [esp + 0x24]
push edx
mov ecx, eax
mov byte [esp + 0x84], 2
call fcn.0047db80
mov eax, dword [eax]
mov ecx, dword [esp + 0x84]
mov ecx, dword [ecx]
push eax
push ecx
call fcn.005645c3
add esp, 8
test eax, eax
mov eax, dword [esp + 0x1c]
sete bl
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4d600d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov esi, vtable.BkJson::Handle.0
mov dword [esp + 0x3c], esi
mov dword [esp + 0x20], vtable.BkJson::Document.0
mov byte [esp + 0x78], 4
mov ecx, dword [esp + 0x28]
test ecx, ecx
je 0x4d6033
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
mov byte [esp + 0x78], 0
mov eax, dword [esp + 0x80]
add eax, 0xfffffff0
mov dword [esp + 0x2c], vtable.BkJson::Error.0
mov dword [esp + 0x20], esi
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4d6067
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4d608f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test bl, bl
jne 0x4d609b
add edi, 1
jmp 0x4d5f50
lea ecx, [esp + 0x84]
push ecx
mov ecx, str.game_id
call fcn.00481430
lea eax, [ebp + 0x24]
lea esi, [esp + 0x48]
mov dword [esp + 0x78], 5
call fcn.00518560
push 0
lea edi, [esp + 0x88]
mov ecx, eax
mov byte [esp + 0x7c], 6
call fcn.0047dce0
cmp dword [ebp + 0x18], 0
mov edi, dword [ebp + 0x1c]
mov ebx, eax
je 0x4d6142
test edi, edi
je 0x4d6142
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x4d610a
push 0
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
jne 0x4d610a
mov edx, dword [ebp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp + 0x20], 0
cmp dword [ebp + 0x20], 0
jne 0x4d6142
mov esi, dword [ebp + 0x18]
push 0xc
call fcn.00566e45
add esp, 4
test eax, eax
je 0x4d613f
push 0
push 0
push eax
push 0x41f160
push 0
push 0
mov dword [eax], esi
mov dword [eax + 8], ebx
mov dword [eax + 4], edi
call fcn.00565c54
add esp, 0x18
mov dword [ebp + 0x20], eax
mov byte [esp + 0x78], 5
lea ecx, [esp + 0x48]
mov dword [esp + 0x64], vtable.BkJson::Handle.0
call fcn.00484ec0
mov dword [esp + 0x78], 0xffffffff
mov eax, dword [esp + 0x84]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4d6183
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x70]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x68
ret 8