Function at 0x520bd0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x595c68
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x5eb3c0]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov ecx, dword [ebp + 8]
mov eax, dword [ecx + 0x5a0]
xor ebx, ebx
cmp eax, ebx
je 0x520c30
mov edx, dword [eax + 0xc]
cmp edx, 7
jne 0x520c22
mov edx, dword [eax + 0x18]
mov dword [esp + 0x10], edx
jmp 0x520c34
cmp edx, 2
jne 0x520c30
mov eax, dword [eax + 0x18]
mov dword [esp + 0x10], eax
jmp 0x520c34
mov dword [esp + 0x10], ebx
or eax, 0xffffffff
xor edx, edx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], edx
mov dword [esp + 0x48], vtable.BkJson::Document.0
mov dword [esp + 0x54], vtable.BkJson::Error.0
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], eax
xor eax, eax
xor esi, esi
cmp dword [esp + 0x10], ebx
mov dword [esp + 0x98], ebx
mov dword [esp + 0x14], eax
jle 0x520d62
cmp eax, dword [ebp + 0xc]
je 0x520d4d
push eax
lea edi, [esp + 0x34]
add ecx, 0x598
call fcn.00485980
mov dword [esp + 0x18], eax
push esi
lea edi, [esp + 0x28]
lea ecx, [esp + 0x4c]
mov byte [esp + 0x9c], 1
call fcn.00485980
or ecx, 0xffffffff
mov dword [esp + 0x84], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], vtable.BkJson::Error.0
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
mov dword [esp + 0x64], vtable.kvip::json::document.0
mov dword [esp + 0x80], vtable.kvip::json::handle.0
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], eax
mov ecx, dword [esp + 0x18]
push ecx
lea edx, [esp + 0x84]
push edx
mov byte [esp + 0xa0], 3
call fcn.0044ad90
mov byte [esp + 0x98], 2
mov edi, vtable.BkJson::Handle.0
lea ecx, [esp + 0x64]
mov dword [esp + 0x80], edi
call fcn.00484ec0
mov ecx, dword [ebp + 8]
mov eax, dword [esp + 0x14]
mov byte [esp + 0x98], bl
mov dword [esp + 0x24], edi
mov dword [esp + 0x30], edi
add esi, 1
add eax, 1
cmp eax, dword [esp + 0x10]
mov dword [esp + 0x14], eax
jl 0x520c76
mov edx, dword [esp + 0x50]
cmp edx, ebx
mov dword [ecx + 0x5a0], ebx
je 0x520d8b
mov eax, dword [edx + 0xc]
cmp eax, 7
jne 0x520d7d
mov eax, dword [edx + 0x18]
mov dword [esp + 0x10], eax
jmp 0x520d8f
cmp eax, 2
jne 0x520d8b
mov ecx, dword [edx + 0x18]
mov dword [esp + 0x10], ecx
jmp 0x520d8f
mov dword [esp + 0x10], ebx
lea esi, [esp + 0x20]
lea edi, [esp + 0x48]
call fcn.00485190
xor esi, esi
cmp dword [esp + 0x10], ebx
mov byte [esp + 0x98], 4
jle 0x520e78
mov dword [esp + 0x24], vtable.BkJson::Handle.0
jmp 0x520dc0
push esi
lea edi, [esp + 0x40]
lea ecx, [esp + 0x4c]
call fcn.00485980
mov dword [esp + 0x18], eax
mov ecx, dword [ebp + 8]
push esi
lea edi, [esp + 0x34]
add ecx, 0x598
mov byte [esp + 0x9c], 5
call fcn.00485980
or ecx, 0xffffffff
mov dword [esp + 0x78], ecx
mov dword [esp + 0x7c], ecx
mov ecx, dword [eax + 4]
mov eax, dword [eax + 8]
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x70], vtable.BkJson::Error.0
mov dword [esp + 0x74], ebx
mov dword [esp + 0x64], vtable.kvip::json::document.0
mov dword [esp + 0x80], vtable.kvip::json::handle.0
mov dword [esp + 0x84], ecx
mov dword [esp + 0x88], eax
mov dword [esp + 0x28], ecx
mov dword [esp + 0x2c], eax
mov edx, dword [esp + 0x18]
push edx
lea eax, [esp + 0x28]
push eax
mov byte [esp + 0xa0], 8
call fcn.0044ae00
mov eax, vtable.BkJson::Handle.0
mov dword [esp + 0x24], eax
add esi, 1
cmp esi, dword [esp + 0x10]
mov byte [esp + 0x98], 4
mov dword [esp + 0x30], eax
mov dword [esp + 0x3c], eax
jl 0x520dc0
mov edi, dword [ebp + 8]
mov ecx, edi
call fcn.005202b0
mov ecx, dword [edi + 0x728]
cmp ecx, ebx
jne 0x520e90
xor eax, eax
jmp 0x520e9b
mov eax, dword [edi + 0x72c]
sub eax, ecx
sar eax, 2
lea esi, [edi + 0x5b8]
mov edx, dword [esi + 0x94]
lea ecx, [esi + 0x94]
push 1
push eax
mov eax, dword [edx + 0x10]
call eax
call fcn.00493130
mov ecx, dword [esp + 0x10]
mov eax, dword [ebp + 0xc]
add ecx, 0xffffffff
cmp ecx, eax
jne 0x520ecf
cmp eax, ebx
jbe 0x520ecf
add eax, 0xffffffff
lea esi, [edi + 0x64c]
mov edi, eax
call fcn.00490ee0
mov byte [esp + 0x98], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x520f03
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x48], vtable.BkJson::Document.0
mov dword [esp + 0x98], 0xc
mov ecx, dword [esp + 0x50]
cmp ecx, ebx
je 0x520f26
mov edx, dword [ecx]
mov eax, dword [edx]
push 1
call eax
xor eax, eax
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8