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

Disassembly:
push 0xffffffffffffffff
push 0x5aadc8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov eax, dword [0x6336a0]
xor eax, esp
push eax
lea eax, [esp + 0x54]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x70]
mov ebx, dword [esp + 0x64]
push 2
lea edi, [ebx + 0x3c]
push 0x5fe570
mov ecx, edi
call fcn.00402270
push edi
lea esi, [ebx + 0x260]
call fcn.00529b70
mov eax, dword [edi]
push edi
push eax
push ebx
call fcn.005257a0
push ecx
mov ecx, esp
mov dword [esp + 0x78], esp
push eax
call fcn.004023b0
call fcn.00525ae0
mov eax, dword [ebp + 4]
xor esi, esi
cmp eax, esi
mov dword [esp + 0x70], esi
je 0x521873
mov ecx, dword [ebp + 8]
sub ecx, eax
sar ecx, 4
cmp dword [esp + 0x74], ecx
jb 0x521878
call fcn.0057803b
mov ebx, dword [esp + 0x74]
shl ebx, 4
add ebx, dword [ebp + 4]
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], ebx
call fcn.00555692
xor ecx, ecx
cmp eax, esi
setne cl
cmp ecx, esi
jne 0x5218a4
push 0x80004005
call fcn.00401f90
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
lea ecx, [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x6c]
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0x34]
push eax
mov dword [esp + 0x68], 1
call fcn.00526c90
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x5218f4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x30]
push ecx
lea esi, [esp + 0x28]
call fcn.00526f40
mov ecx, dword [esp + 0x64]
push 0
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x40]
push eax
push ecx
mov byte [esp + 0x6c], 2
call fcn.00527ca0
mov esi, dword [esp + 0x64]
call fcn.00524bf0
mov edx, dword [esp + 0x68]
mov eax, dword [edx]
mov ecx, dword [eax - 0xc]
mov eax, dword [esp + 0x1c]
cmp eax, ecx
jge 0x521d90
jmp 0x521944
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x60422c
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
call fcn.004023b0
mov edi, dword [esp + 0x6c]
lea esi, [esp + 0x1c]
call fcn.00527220
push ecx
mov ecx, esp
mov dword [esp + 0x3c], esp
push 0x604234
call fcn.004023b0
lea esi, [esp + 0x20]
call fcn.00527220
mov ecx, dword [esp + 0x1c]
cmp ecx, dword [esp + 0x18]
jge 0x521e18
mov eax, dword [ebx + 4]
test eax, eax
mov edi, dword [esp + 0x70]
je 0x5219b9
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x5219be
call fcn.0057803b
mov esi, dword [ebx + 4]
lea eax, [edi*8]
sub eax, edi
add eax, eax
add eax, eax
cmp dword [eax + esi], 0
jge 0x521a21
mov dword [esp + 0x70], eax
mov ecx, ebx
call fcn.00529cb0
cmp edi, eax
jge 0x521a1d
add dword [esp + 0x70], 0x1c
add edi, 1
test esi, esi
je 0x521a0b
mov ecx, dword [ebx + 8]
sub ecx, esi
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x521a10
call fcn.0057803b
mov esi, dword [ebx + 4]
mov edx, dword [esp + 0x70]
cmp dword [esi + edx], 0
jl 0x5219d8
mov dword [esp + 0x70], edi
mov eax, dword [ebx + 4]
test eax, eax
je 0x521a44
mov ecx, dword [ebx + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x521a49
call fcn.0057803b
mov esi, dword [ebx + 4]
lea eax, [edi*8]
sub eax, edi
mov edi, dword [esp + 0x1c]
add eax, eax
add eax, eax
add esi, eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x68]
lea ebx, [esp + 0x1c]
mov dword [esp + 0x18], esi
mov dword [esp + 0x1c], edi
call fcn.00527c10
mov eax, dword [esp + 0x1c]
sub eax, edi
push eax
push edi
lea ecx, [esp + 0x34]
push ecx
mov ecx, dword [esp + 0x74]
call fcn.00423ae0
mov ebx, dword [esp + 0x64]
mov byte [esp + 0x5c], 3
xor ecx, ecx
cmp dword [ebx + 0x164], 1
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x4c], ecx
je 0x521c37
mov eax, dword [esp + 0x6c]
mov edx, dword [eax + 4]
mov edi, dword [eax]
add edi, dword [ebx + 0xa8]
mov dword [esp + 0x44], edx
mov edx, dword [eax + 8]
mov eax, dword [eax + 0xc]
mov dword [esp + 0x48], edx
mov edx, dword [esp + 0x70]
xor esi, esi
cmp edx, ecx
mov dword [esp + 0x4c], eax
mov dword [esp + 0x40], edi
jle 0x521b1c
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x521af8
mov eax, dword [ebp + 0x18]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x521b01
call fcn.0057803b
mov edx, dword [esp + 0x70]
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + esi*4]
add eax, dword [ebx + 0xa8]
add esi, 1
cmp esi, edx
lea edi, [edi + eax + 1]
jl 0x521ae5
mov dword [esp + 0x40], edi
mov ecx, dword [esp + 0x18]
xor esi, esi
cmp dword [ecx], esi
jle 0x521b67
lea ebx, [edx*4]
lea ecx, [ecx]
mov ecx, dword [ebp + 0x14]
test ecx, ecx
je 0x521b46
mov eax, dword [ebp + 0x18]
sub eax, ecx
sar eax, 2
lea ecx, [esi + edx]
cmp ecx, eax
jb 0x521b4f
call fcn.0057803b
mov edx, dword [esp + 0x70]
mov eax, dword [ebp + 0x14]
add edi, dword [ebx + eax]
mov ecx, dword [esp + 0x18]
add esi, 1
add ebx, 4
cmp esi, dword [ecx]
jl 0x521b30
mov ebx, dword [esp + 0x64]
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx + 0xa8]
mov ecx, dword [ecx]
add dword [esp + 0x44], eax
sub ecx, 1
lea edx, [eax + 1]
imul edx, ecx
add edi, edx
mov edx, dword [esp + 0x74]
xor esi, esi
test edx, edx
mov dword [esp + 0x48], edi
jle 0x521bcb
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x521ba3
mov eax, dword [ebp + 0x28]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x521bac
call fcn.0057803b
mov edx, dword [esp + 0x74]
mov eax, dword [ebp + 0x24]
mov ecx, dword [eax + esi*4]
add ecx, dword [ebx + 0xa8]
mov eax, dword [esp + 0x44]
add esi, 1
cmp esi, edx
lea ecx, [eax + ecx + 1]
mov dword [esp + 0x44], ecx
jl 0x521b90
mov eax, dword [esp + 0x18]
mov edi, dword [esp + 0x44]
xor esi, esi
cmp dword [eax + 4], esi
jle 0x521c19
lea ebx, [edx*4]
mov ecx, dword [ebp + 0x24]
test ecx, ecx
je 0x521bf7
mov eax, dword [ebp + 0x28]
sub eax, ecx
sar eax, 2
lea ecx, [esi + edx]
cmp ecx, eax
jb 0x521c00
call fcn.0057803b
mov edx, dword [esp + 0x74]
mov eax, dword [ebp + 0x24]
add edi, dword [eax + ebx]
mov ecx, dword [esp + 0x18]
add esi, 1
add ebx, 4
cmp esi, dword [ecx + 4]
jl 0x521be1
mov ebx, dword [esp + 0x64]
mov eax, dword [esp + 0x18]
mov edx, dword [ebx + 0xa8]
mov ecx, dword [eax + 4]
add edx, 1
sub ecx, 1
imul edx, ecx
add edi, edx
mov dword [esp + 0x4c], edi
mov esi, eax
push esi
lea edx, [esp + 0x44]
push edx
lea eax, [esp + 0x34]
push eax
push ebx
call fcn.00521e30
cmp dword [ebx + 0x164], 0
je 0x521d4a
mov eax, dword [esi]
mov edx, dword [esp + 0x70]
mov ecx, dword [esi + 4]
add ecx, dword [esp + 0x74]
add eax, edx
lea esi, [edx + 1]
cmp esi, eax
mov dword [esp + 0x34], eax
mov dword [esp + 0x28], ecx
jge 0x521cce
lea ebx, [esi*8]
sub ebx, esi
add ebx, ebx
add ebx, ebx
mov edi, dword [esp + 0x20]
mov eax, dword [edi + 4]
test eax, eax
je 0x521ca7
mov ecx, dword [edi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jb 0x521cac
call fcn.0057803b
mov eax, dword [edi + 4]
add eax, ebx
add esi, 1
add ebx, 0x1c
cmp esi, dword [esp + 0x34]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
jl 0x521c80
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x74]
add edi, 1
cmp edi, ecx
jge 0x521d46
mov ebx, edi
shl ebx, 4
mov ecx, dword [ebp + 4]
test ecx, ecx
je 0x521cf1
mov eax, dword [ebp + 8]
sub eax, ecx
sar eax, 4
cmp edi, eax
jb 0x521cf6
call fcn.0057803b
mov esi, dword [ebp + 4]
mov eax, dword [esi + ebx + 4]
add esi, ebx
test eax, eax
je 0x521d21
mov ecx, dword [esi + 8]
sub ecx, eax
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp dword [esp + 0x70], eax
jb 0x521d26
call fcn.0057803b
mov eax, dword [esi + 4]
add eax, dword [esp + 0x38]
add edi, 1
add ebx, 0x10
cmp edi, dword [esp + 0x28]
mov dword [eax], 0xffffffff
mov dword [eax + 4], 0xffffffff
jl 0x521cde
mov esi, dword [esp + 0x18]
mov ecx, dword [esi]
add dword [esp + 0x70], ecx
mov byte [esp + 0x5c], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x521d75
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ebx, dword [esp + 0x20]
mov ecx, dword [esp + 0x68]
mov edx, dword [ecx]
mov eax, dword [esp + 0x1c]
cmp eax, dword [edx - 0xc]
jl 0x521940
mov esi, dword [esp + 0x64]
push 2
push 0x5fe570
lea ecx, [esi + 0x3c]
call fcn.00402270
push 1
mov edi, esi
call fcn.005249c0
test eax, eax
je 0x521db5
mov esi, dword [esp + 0x64]
call fcn.00524bf0
mov byte [esp + 0x5c], 1
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x521dda
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [esp + 0x5c], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x521e02
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4c
ret 0x14
mov ecx, edi
mov edx, dword [ecx]
mov eax, dword [edx - 0xc]
mov dword [esp + 0x1c], eax
jmp 0x521d79