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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x74
mov eax, dword [ebp + 0x1c]
mov edx, dword [ebp + 0x14]
push ebx
push esi
mov dword [eax], 0
mov eax, dword [edx + 0x30]
mov dword [esp + 0x44], eax
mov eax, dword [edx + 0x28]
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 0x10]
push edi
cmp dword [eax + 0x2c], 0
mov esi, dword [eax + 0x38]
jl 0x502fb8
jg 0x502faa
cmp dword [eax + 0x28], 1
jbe 0x502fb8
mov eax, dword [esi + 4]
sub eax, dword [esi]
sar eax, 3
mov dword [esp + 0x10], eax
jmp 0x502fc0
mov dword [esp + 0x10], 0
cmp dword [edx + 0x2c], 0
jl 0x502fdf
jg 0x502fce
cmp dword [edx + 0x28], 1
jbe 0x502fdf
mov eax, dword [edx + 0x38]
mov edi, dword [eax + 4]
sub edi, dword [eax]
sar edi, 3
mov dword [esp + 0x14], edi
jmp 0x502fe7
mov dword [esp + 0x14], 0
mov ebx, dword [ebp + 0xc]
mov eax, 1
mov esi, dword [esi + 4]
add esi, 8
mov dword [esp + 0x40], esi
lea ecx, [ebx + 6]
shl eax, cl
mov dword [esp + 0x18], eax
mov eax, dword [edx + 0x38]
mov dword [esp + 0x58], ecx
mov ecx, dword [esp + 0x34]
mov edx, dword [eax]
mov dword [esp + 0x44], edx
test ecx, ecx
jle 0x50349a
nop dword [eax + eax]
mov eax, 4
mov edi, esi
cmp ecx, eax
mov dword [esp + 0x30], edi
cmovb eax, ecx
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x3c], eax
test eax, eax
je 0x503471
mov ecx, edx
sub ecx, esi
mov dword [esp + 0x5c], ecx
nop dword [eax]
mov eax, dword [edi]
and eax, 0x5000
cmp eax, 0x1000
lea eax, [ecx + edi]
jne 0x503149
mov esi, dword [eax]
mov dword [esp + 0x28], eax
mov eax, dword [eax + 4]
cdq
xor eax, edx
xor esi, edx
sub esi, edx
mov dword [esp + 0x60], esi
sbb eax, edx
mov ecx, eax
lea eax, [ebx + 6]
mov dword [esp + 0x38], ecx
mov dword [esp + 0x64], ecx
cmp eax, 6
jle 0x5030d0
test ebx, ebx
js 0x5030a8
mov edx, ecx
mov eax, esi
mov ecx, ebx
call fcn.0068e460
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x503107
movq xmm1, qword [esp + 0x60]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x50], xmm1
mov eax, dword [esp + 0x50]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x503107
test ebx, ebx
js 0x5030e1
mov edx, ecx
mov eax, esi
mov ecx, ebx
call fcn.0068e460
jmp 0x5030fd
movq xmm1, qword [esp + 0x60]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x50], xmm1
mov eax, dword [esp + 0x50]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7be9c0]
mov eax, dword [ebp + 0x1c]
add dword [eax], ecx
mov eax, dword [esp + 0x18]
cdq
and edx, dword [esp + 0x38]
and eax, esi
or eax, edx
je 0x503122
mov eax, 1
jmp 0x503124
xor eax, eax
push eax
push dword [ebp + 8]
call fcn.00509ee0
add esp, 8
cmp eax, 0xffffffff
je 0x5034b6
mov eax, dword [edi + 4]
or dword [edi], 0x2000
mov dword [edi + 4], eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x4c]
add ecx, 0xffffffff
mov dword [esp + 0x1c], ecx
je 0x503449
mov esi, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
shl esi, 3
add esi, edi
shl edx, 3
add edx, eax
mov dword [esp + 0x20], edx
mov eax, dword [esi]
and eax, 0x5000
cmp eax, 0x1000
jne 0x503272
mov eax, dword [edx + 4]
mov ecx, dword [edx]
cdq
xor eax, edx
xor ecx, edx
sub ecx, edx
mov dword [esp + 0x38], ecx
sbb eax, edx
mov dword [esp + 0x68], ecx
mov edx, eax
lea eax, [ebx + 6]
mov dword [esp + 0x50], edx
mov dword [esp + 0x6c], edx
cmp eax, 6
jle 0x5031eb
test ebx, ebx
js 0x5031c3
mov eax, ecx
mov ecx, ebx
call fcn.0068e460
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x503220
movq xmm1, qword [esp + 0x68]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x28], xmm1
mov eax, dword [esp + 0x28]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x503220
test ebx, ebx
js 0x5031fa
mov eax, ecx
mov ecx, ebx
call fcn.0068e460
jmp 0x503216
movq xmm1, qword [esp + 0x68]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x28], xmm1
mov eax, dword [esp + 0x28]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7be9c0]
mov eax, dword [ebp + 0x1c]
add dword [eax], ecx
mov eax, dword [esp + 0x18]
cdq
mov ecx, eax
mov dword [esp + 0x24], eax
and ecx, dword [esp + 0x38]
mov eax, edx
and eax, dword [esp + 0x50]
or ecx, eax
mov dword [esp + 0x28], edx
je 0x503249
mov eax, 1
jmp 0x50324b
xor eax, eax
push eax
push dword [ebp + 8]
call fcn.00509ee0
add esp, 8
cmp eax, 0xffffffff
je 0x5034b6
mov eax, dword [esi + 4]
or dword [esi], 0x2000
mov ecx, dword [esp + 0x1c]
mov dword [esi + 4], eax
jmp 0x50327f
mov eax, dword [esp + 0x18]
cdq
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], edx
sub ecx, 1
mov dword [esp + 0x1c], ecx
je 0x503449
mov edx, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
lea eax, [edx*8]
mov edx, dword [esp + 0x20]
add esi, eax
lea eax, [edi*8]
mov edi, dword [esp + 0x30]
add edx, eax
mov dword [esp + 0x20], edx
mov eax, dword [esi]
and eax, 0x5000
cmp eax, 0x1000
jne 0x5033b3
mov eax, dword [edx + 4]
mov ecx, dword [edx]
cdq
xor eax, edx
xor ecx, edx
sub ecx, edx
mov dword [esp + 0x50], ecx
sbb eax, edx
mov dword [esp + 0x70], ecx
mov edx, eax
lea eax, [ebx + 6]
mov dword [esp + 0x38], edx
mov dword [esp + 0x74], edx
cmp eax, 6
jle 0x503331
test ebx, ebx
js 0x503309
mov eax, ecx
mov ecx, ebx
call fcn.0068e460
mov edx, dword [esp + 0x38]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x50336a
movq xmm1, qword [esp + 0x70]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x78], xmm1
mov eax, dword [esp + 0x78]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7bf1c0]
jmp 0x50336a
test ebx, ebx
js 0x503344
mov eax, ecx
mov ecx, ebx
call fcn.0068e460
mov edx, dword [esp + 0x38]
jmp 0x503360
movq xmm1, qword [esp + 0x70]
mov eax, ebx
neg eax
movd xmm0, eax
psllq xmm1, xmm0
movq qword [esp + 0x78], xmm1
mov eax, dword [esp + 0x78]
and eax, 0x7f
mov ecx, dword [eax*8 + 0x7be9c0]
mov eax, dword [ebp + 0x1c]
add dword [eax], ecx
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x28]
and ecx, dword [esp + 0x50]
and eax, edx
or ecx, eax
je 0x503388
mov eax, 1
jmp 0x50338a
xor eax, eax
push eax
push dword [ebp + 8]
call fcn.00509ee0
add esp, 8
cmp eax, 0xffffffff
je 0x5034b6
mov eax, dword [esi + 4]
or dword [esi], 0x2000
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
mov dword [esi + 4], eax
lea eax, [ecx - 1]
test eax, eax
je 0x503449
mov ecx, dword [esp + 0x10]
lea eax, [ecx*8]
mov ecx, dword [esi + eax]
add esi, eax
and ecx, 0x5000
cmp ecx, 0x1000
jne 0x503449
mov ecx, dword [esp + 0x14]
push dword [esp + 0x58]
lea eax, [ecx*8]
mov ebx, dword [eax + edx]
mov eax, dword [eax + edx + 4]
cdq
xor eax, edx
xor ebx, edx
sub ebx, edx
sbb eax, edx
mov edi, eax
push edi
push ebx
call fcn.00501760
mov ecx, dword [ebp + 0x1c]
add esp, 0xc
and ebx, dword [esp + 0x24]
and edi, dword [esp + 0x28]
add dword [ecx], eax
or ebx, edi
je 0x50341f
mov eax, 1
jmp 0x503421
xor eax, eax
push eax
push dword [ebp + 8]
call fcn.00509ee0
add esp, 8
cmp eax, 0xffffffff
je 0x5034b6
mov eax, dword [esi + 4]
or dword [esi], 0x2000
mov ebx, dword [ebp + 0xc]
mov edi, dword [esp + 0x30]
mov dword [esi + 4], eax
mov ecx, dword [esp + 0x3c]
add edi, 8
dec ecx
mov dword [esp + 0x30], edi
mov dword [esp + 0x3c], ecx
test ecx, ecx
mov ecx, dword [esp + 0x5c]
jne 0x503050
mov ecx, dword [esp + 0x34]
mov esi, dword [esp + 0x40]
mov edx, dword [esp + 0x44]
mov eax, dword [esp + 0x10]
sub ecx, 4
shl eax, 5
add esi, eax
mov dword [esp + 0x34], ecx
mov eax, dword [esp + 0x14]
shl eax, 5
add edx, eax
mov dword [esp + 0x40], esi
mov dword [esp + 0x44], edx
test ecx, ecx
jg 0x503020
cmp dword [ebp + 0x18], 0
je 0x5034ad
push 0x2a
push dword [ebp + 8]
call fcn.00509ca0
add esp, 8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret