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

Disassembly:
push 0xffffffffffffffff
push 0x5f2c80
mov eax, dword fs:[0]
push eax
sub esp, 0x58
push ebx
push ebp
push esi
push edi
mov eax, dword [0x64c874]
xor eax, esp
push eax
lea eax, [esp + 0x6c]
mov dword fs:[0], eax
mov eax, dword [esp + 0x7c]
xor ebx, ebx
cmp dword [eax + 0xbbc], ebx
je 0x513995
mov dword [esp + 0x48], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x74], ebx
lea ecx, [eax + 0x9e4]
mov eax, dword [ecx + 4]
mov edi, dword [eax]
mov esi, ecx
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], esi
mov dword [esp + 0x30], eax
cmp esi, ebx
je 0x51352e
cmp esi, ecx
je 0x513533
call fcn.005b8b18
cmp edi, dword [esp + 0x30]
je 0x5136aa
cmp esi, ebx
jne 0x513546
call fcn.005b8b18
cmp edi, dword [esi + 4]
jne 0x513550
call fcn.005b8b18
mov ebp, dword [edi + 0xc]
mov ebx, dword [ebp + 0x31c]
test ebx, ebx
mov dword [esp + 0x18], ebx
je 0x51368e
test byte [ebx + 0x24], 0x80
jne 0x51368e
lea eax, [esp + 0x3c]
mov ecx, ebp
call fcn.004d0a10
lea esi, [esp + 0x34]
mov edi, eax
mov byte [esp + 0x74], 1
call fcn.0048fed0
mov edi, dword [eax]
mov eax, dword [esp + 0x38]
test eax, eax
je 0x5135c0
mov esi, eax
add eax, 4
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x5135c0
mov edx, dword [esi]
mov eax, dword [edx + 4]
mov ecx, esi
call eax
lea ecx, [esi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x5135c0
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov ecx, esi
call edx
mov byte [esp + 0x74], 0
mov eax, dword [esp + 0x40]
test eax, eax
je 0x5135e2
mov ecx, eax
add eax, 8
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x5135e2
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
test edi, edi
je 0x51368e
test byte [edi + 0x52c], 0x10
je 0x51368e
mov eax, dword [edi + 0x2e8]
cmp byte [eax + 0xbb9], 0
jne 0x51368e
test byte [edi + 0x545], 1
jne 0x51368e
test byte [ebx + 0x1c], 2
je 0x513626
lea ebx, [esp + 0x18]
lea esi, [esp + 0x44]
call fcn.00518b70
test byte [ebp + 0x34a], 0x10
jne 0x51368e
mov edx, dword [ebp]
mov eax, dword [edx + 4]
mov ecx, ebp
call eax
test al, al
jne 0x51368e
mov al, byte [ebp + 0x349]
test al, 8
je 0x51368e
mov ecx, dword [edi + 0x50c]
mov edx, dword [edi + 0x504]
and ecx, 0xffffff
and edx, 0xffffff
cmp ecx, edx
jae 0x51368e
test al, 0x40
je 0x51368e
mov esi, ebp
call fcn.0053eca0
test al, al
jne 0x51368e
mov eax, dword [edi + 0xa8]
cmp dword [eax + 0x94], 0
jle 0x51368e
lea ebx, [esp + 0x18]
lea esi, [esp + 0x44]
call fcn.00518b70
lea esi, [esp + 0x24]
call fcn.00519d60
mov edi, dword [esp + 0x28]
mov esi, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
xor ebx, ebx
jmp 0x513526
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
cmp esi, eax
mov ebx, eax
jbe 0x5136c5
call fcn.005b8b18
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
cmp esi, eax
mov edi, esi
jbe 0x5136d8
call fcn.005b8b18
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
cmp edi, ebx
je 0x5136ee
push ebx
push edi
call fcn.00555be0
mov eax, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
add esp, 8
cmp esi, eax
mov edi, eax
jbe 0x51370a
call fcn.005b8b18
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x48]
cmp esi, eax
jbe 0x51370a
call fcn.005b8b18
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x40]
mov eax, 0xc
sub esp, 0x14
mov ecx, eax
mov ebp, eax
mov eax, esp
mov dword [esp + 0x78], ebx
mov ebx, dword [esp + 0x68]
mov dword [eax], ebx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x78]
mov dword [eax + 8], edx
mov edx, edi
sub edx, esi
sar edx, 2
push edx
push edi
mov dword [eax + 0xc], ebp
push esi
mov dword [eax + 0x10], ecx
call fcn.0051cd80
mov ebp, dword [esp + 0x9c]
mov eax, dword [ebp + 0x218]
add esp, 0x20
test eax, eax
mov dword [esp + 0x7c], eax
jne 0x513796
mov ecx, dword [ebp + 0xbbc]
mov eax, 0x66666667
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
mov dword [esp + 0x7c], eax
cmp eax, 1
mov dword [esp + 0x20], 1
lea eax, [esp + 0x7c]
jg 0x513790
lea eax, [esp + 0x20]
mov eax, dword [eax]
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x48]
cmp eax, dword [esp + 0x4c]
mov esi, eax
jbe 0x5137ab
call fcn.005b8b18
mov eax, dword [esp + 0x48]
mov ecx, dword [esp + 0x4c]
cmp eax, ecx
mov dword [esp + 0x28], esi
mov dword [esp + 0x20], ecx
jbe 0x5137c0
call fcn.005b8b18
cmp esi, dword [esp + 0x20]
je 0x513984
cmp esi, dword [esp + 0x4c]
jb 0x5137d5
call fcn.005b8b18
cmp dword [esp + 0x7c], 0
mov ebx, dword [esi]
jle 0x5138b5
sub dword [esp + 0x7c], 1
test byte [ebx + 0x1c], 2
jne 0x51396d
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x34]
call fcn.004d0a10
lea esi, [esp + 0x3c]
mov edi, eax
mov byte [esp + 0x74], 2
call fcn.0048fed0
mov esi, dword [eax]
mov eax, dword [esp + 0x40]
test eax, eax
je 0x513843
mov edi, eax
add eax, 4
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x513843
mov edx, dword [edi]
mov eax, dword [edx + 4]
mov ecx, edi
call eax
lea ecx, [edi + 8]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x513843
mov eax, dword [edi]
mov edx, dword [eax + 8]
mov ecx, edi
call edx
mov byte [esp + 0x74], 0
mov eax, dword [esp + 0x38]
test eax, eax
je 0x513865
mov ecx, eax
add eax, 8
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x513865
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
mov eax, dword [ebx + 8]
push eax
call fcn.0053d9b0
test al, al
je 0x5138ab
mov eax, dword [esi + 0x50c]
lea ecx, [eax + 1]
xor ecx, eax
and ecx, 0xffffff
xor ecx, eax
mov dword [esi + 0x50c], ecx
call fcn.004ece70
or byte [ebx + 0x1c], 2
add dword [ebp + 0xbc0], 1
mov eax, ebp
call fcn.004d0b10
mov word [ebx + 0xc], ax
jmp 0x513969
add dword [esp + 0x7c], 1
jmp 0x513969
test byte [ebx + 0x1c], 2
je 0x51396d
mov ecx, dword [ebx + 8]
lea eax, [esp + 0x18]
call fcn.004d0a10
lea esi, [esp + 0x2c]
mov edi, eax
mov byte [esp + 0x74], 3
call fcn.0048fed0
mov esi, dword [eax]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x513911
mov edi, eax
add eax, 4
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x513911
mov eax, dword [edi]
mov edx, dword [eax + 4]
mov ecx, edi
call edx
lea eax, [edi + 8]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x513911
mov edx, dword [edi]
mov eax, dword [edx + 8]
mov ecx, edi
call eax
mov byte [esp + 0x74], 0
mov eax, dword [esp + 0x1c]
test eax, eax
je 0x513933
mov ecx, eax
add eax, 8
or edx, 0xffffffff
lock xadd dword [eax], edx
jne 0x513933
mov eax, dword [ecx]
mov edx, dword [eax + 8]
call edx
and byte [ebx + 0x1c], 0xfd
mov ebx, dword [ebx + 8]
push ebx
call fcn.0053d800
test al, al
je 0x513962
mov eax, dword [esi + 0x50c]
lea ecx, [eax - 1]
xor ecx, eax
and ecx, 0xffffff
xor ecx, eax
mov dword [esi + 0x50c], ecx
call fcn.004ece70
add dword [ebp + 0xbc0], 0xffffffff
mov esi, dword [esp + 0x28]
cmp esi, dword [esp + 0x4c]
jb 0x513978
call fcn.005b8b18
add esi, 4
mov dword [esp + 0x28], esi
jmp 0x5137c0
mov eax, dword [esp + 0x48]
test eax, eax
je 0x513995
push eax
call fcn.0059b877
add esp, 4
mov ecx, dword [esp + 0x6c]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x64
ret 4