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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [esp + 0x50]
mov esi, dword [esp + 0x58]
mov ebx, dword [esp + 0x78]
mov eax, dword [edx]
lea edx, [esp + 0x30]
mov ebp, dword [esp + 0x5c]
mov edi, dword [esp + 0x60]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x54]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.00505020
mov dword [esp + 0x20], eax
mov edx, dword [esi + 0x30]
test edx, edx
sete dl
xor eax, eax
test ebx, ebx
setne al
test eax, edx
jne 0x516be9
cmp ebx, 5
ja case.default.0x516ad5
jmp dword [ebx*4 + 0x5dcd6c]
mov eax, dword [esi + 0x28]
mov eax, dword [eax + 8]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
lea esi, [esi]
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x68]
test eax, eax
lea esi, [ebp + edx - 1]
je 0x516b03
lea esi, [ebp + 1]
mov ebx, ebp
mov eax, dword [esp + 0x64]
mov ebp, dword [esp + 0x70]
add ebx, eax
test ebp, ebp
je 0x516bde
dec ebx
cmp dword [esp + 0x6c], 1
mov edx, dword [esp + 0x68]
sbb eax, eax
or eax, 1
cmp dword [esp + 0x70], 1
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x68]
sbb ebp, ebp
shr eax, 0x1f
and ebp, 2
add eax, edx
sar eax, 1
dec ebp
add eax, edi
mov dword [esp + 0x28], eax
mov eax, dword [esp + 0x74]
test eax, eax
je 0x516b5d
mov eax, dword [esp + 0x68]
and eax, 1
cmp eax, 1
sbb dword [esp + 0x28], 0xffffffff
mov edx, dword [esp + 0x68]
add edx, edi
cmp edi, edx
mov dword [esp + 0x2c], edx
jmp 0x516bb8
cmp esi, ebx
jge 0x516bab
cmp edi, dword [esp + 0x28]
mov eax, dword [esp + 0x1c]
jl 0x516b82
mov eax, dword [esp + 0x18]
mov dword [esp + 0x14], eax
mov eax, 1
mov dword [esp + 0x10], eax
mov eax, ebx
sub eax, esi
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], eax
call fcn.00507080
mov eax, dword [esp + 0x24]
inc edi
add ebx, ebp
add esi, eax
cmp edi, dword [esp + 0x2c]
jl 0x516b70
lea edx, [esp + 0x30]
mov eax, dword [esp + 0x20]
mov dword [esp + 8], edx
mov edx, dword [esp + 0x54]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.005050f0
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x68]
sub ebx, ecx
jmp 0x516b18
mov dword [esp], esi
mov eax, dword [esp + 0x50]
mov dword [esp + 4], eax
call fcn.00516490
jmp 0x516ad0
mov eax, dword [esp + 0x74]
test eax, eax
je 0x516c7a
mov eax, dword [esi + 0x40]
mov eax, dword [eax]
jmp 0x516c4c
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 8]
mov dword [esp + 0x18], eax
jmp case.default.0x516ad5
mov eax, dword [esp + 0x74]
test eax, eax
je 0x516c69
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x3c]
mov eax, dword [eax]
mov dword [esp + 0x18], eax
jmp case.default.0x516ad5
mov eax, dword [esi + 0x30]
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + 8]
jmp 0x516c1d
xor eax, eax
mov dword [esp + 0x18], eax
xor eax, eax
mov dword [esp + 0x1c], eax
jmp case.default.0x516ad5
mov eax, dword [esi + 0x2c]
mov eax, dword [eax + 8]
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x40]
mov eax, dword [eax]
jmp 0x516c3d
mov eax, dword [esi + 0x3c]
mov eax, dword [eax]
jmp 0x516c13