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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x6c
mov eax, dword [0x6bec78]
push ebx
push esi
push edi
xor esi, esi
mov dword [esp + 0x10], esi
mov ecx, dword [eax]
mov edi, dword [ecx + 0x138]
xor edx, edx
cmp edi, esi
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
mov ecx, dword [eax + 0x2c]
mov ebx, dword [edi + 0xc]
setne dl
mov dword [esp + 0x48], ecx
lea ecx, [esp + 0x40]
push ecx
mov ecx, dword [0x6bec7c]
shr ebx, 8
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], edx
mov edx, dword [eax + 0x30]
mov dword [esp + 0x50], edx
mov edx, dword [ecx + 0x54]
mov ecx, dword [ecx + 0x50]
push edx
mov edx, dword [eax + 0x30]
mov eax, dword [eax + 0x2c]
push ecx
push edx
push eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], ebx
call fcn.00487d70
mov eax, dword [esp + 0x58]
movzx ecx, bx
add esp, 0x14
cmp ecx, eax
mov dword [esp + 0x34], eax
jl 0x518701
mov edx, dword [0x6bec78]
mov eax, dword [edx]
test dword [eax + 0x34], 0x10000000
jne 0x5186ea
mov eax, dword [esp + 0x24]
test eax, eax
je 0x518701
mov eax, dword [edi + 0xc]
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x14]
and eax, 0xff
mov dword [edi + 0xc], eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x1bc]
mov edx, dword [eax + 0x1b8]
mov eax, dword [esp + 0x4c]
push ecx
mov ecx, dword [esp + 0x4c]
push edx
push eax
push ecx
call fcn.00487bc0
mov ecx, dword [esp + 0x54]
movzx edx, bx
add esp, 0x10
cmp edx, ecx
mov dword [esp + 0x28], eax
jge 0x518d2f
test eax, eax
jne 0x5187d4
lea eax, [esp + 0x40]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x9c]
mov edx, dword [eax + 0x98]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
call fcn.00487d70
mov edx, dword [esp + 0x58]
lea eax, [esp + 0x54]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x1fc]
push ecx
mov ecx, dword [esp + 0x64]
mov dword [esp + 0x54], edx
mov edx, dword [eax + 0x1f8]
mov eax, dword [esp + 0x68]
push edx
push eax
push ecx
call fcn.00487d70
mov edx, dword [esp + 0x6c]
lea eax, [esp + 0x68]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x144]
push ecx
mov ecx, dword [esp + 0x78]
mov dword [esp + 0x4c], edx
mov edx, dword [eax + 0x140]
mov eax, dword [esp + 0x7c]
push edx
push eax
push ecx
call fcn.00487d70
mov edx, dword [esp + 0x80]
add esp, 0x3c
mov dword [esp + 0x18], edx
lea eax, [esp + 0x50]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x20c]
mov edx, dword [eax + 0x208]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
call fcn.00487d70
mov edx, dword [esp + 0x64]
and dl, 0xf0
add esp, 0x14
cmp dl, 0x10
jne 0x518836
lea eax, [esp + 0x58]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0xdc]
mov edx, dword [eax + 0xd8]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
call fcn.00487d70
add esp, 0x14
jmp 0x518850
mov edx, dword [0x682788]
mov eax, dword [0x68278c]
mov dword [esp + 0x58], edx
mov dword [esp + 0x5c], eax
lea esp, [esp]
mov eax, dword [esp + 0x28]
test eax, eax
je 0x5188ad
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x34]
push edx
push ebx
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x68]
push ecx
lea edx, [esp + 0x5c]
push edx
call fcn.005d52f0
add esp, 0x18
test eax, eax
je 0x518895
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x10]
mov edx, dword [edi]
push eax
push ecx
push edx
call fcn.005d77e0
add esp, 0xc
mov esi, eax
mov eax, dword [0x682788]
mov ecx, dword [0x68278c]
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], ecx
jmp 0x518c20
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x214]
lea edx, [esp + 0x68]
push edx
mov edx, dword [eax + 0x210]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
call fcn.00487dd0
add esp, 0x14
test eax, eax
je 0x518a41
mov ecx, dword [esp + 0x68]
mov eax, ecx
shr eax, 4
and eax, 0xf
sub eax, 8
je 0x518930
dec eax
je 0x518908
mov eax, dword [0x6bf3a0]
mov ecx, dword [0x6bf3a4]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jmp 0x518982
movzx ebx, bx
shr ecx, 0x10
cmp ebx, ecx
jb 0x518917
call fcn.004856b0
mov ecx, dword [esp + 0x6c]
mov eax, dword [ecx + ebx*8]
mov dword [esp + 0x40], eax
mov ecx, dword [ecx + ebx*8 + 4]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x44], ecx
jmp 0x518982
mov edx, dword [0x682794]
mov eax, dword [0x682790]
mov dword [esp + 0x44], edx
movzx edx, bx
lea edi, [esp + 0x40]
push edi
push edx
push eax
mov dword [esp + 0x4c], eax
mov eax, dword [esp + 0x78]
push eax
push ecx
mov dword [esp + 0x58], edx
call fcn.00487dd0
mov edi, dword [ebp + 0xc]
add esp, 0x14
test eax, eax
mov eax, dword [esp + 0x40]
jne 0x51897e
mov ecx, dword [0x6bf3a0]
mov edx, dword [0x6bf3a4]
mov dword [esp + 0x50], ecx
mov dword [esp + 0x54], edx
mov ecx, dword [esp + 0x44]
mov edx, eax
and edx, 0xf0
cmp dl, 0x50
jne 0x518c20
mov esi, dword [esp + 0x18]
shr eax, 0x10
mov edi, eax
xor eax, eax
cmp esi, eax
mov ebx, ecx
jne 0x5189b9
push ebx
push edi
mov dword [esp + 0x18], eax
call fcn.004c4eb0
add esp, 8
mov esi, eax
jmp 0x518c19
cmp esi, 4
ja case.default.0x5189be
jmp dword [esi*4 + 0x518dbc]
movzx eax, byte [ecx]
mov dword [esp + 0x10], eax
jmp 0x518a2c
movzx edx, byte [ecx]
movzx eax, byte [ecx + 1]
shl edx, 8
add edx, eax
mov dword [esp + 0x10], edx
jmp 0x518a2c
movzx edx, byte [ecx]
movzx eax, byte [ecx + 1]
movzx ecx, byte [ecx + 2]
shl edx, 8
add edx, eax
shl edx, 8
add edx, ecx
mov dword [esp + 0x10], edx
jmp 0x518a2c
movzx edx, byte [ecx]
movzx eax, byte [ecx + 1]
shl edx, 8
add edx, eax
movzx eax, byte [ecx + 2]
movzx ecx, byte [ecx + 3]
shl edx, 8
add edx, eax
shl edx, 8
add edx, ecx
mov dword [esp + 0x10], edx
jmp 0x518a2c
call fcn.004856b0
mov dword [esp + 0x10], 0
add ebx, esi
sub edi, esi
push ebx
push edi
call fcn.004c4eb0
add esp, 8
mov esi, eax
jmp 0x518c19
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
lea edi, [edx + eax]
movzx ecx, bx
imul ecx, edi
xor edx, edx
mov eax, ecx
mov esi, 0x3e8
div esi
mov eax, dword [esp + 0x34]
mov ebx, edx
sub ecx, ebx
inc eax
imul eax, edi
lea edx, [edi + edi*2 + 0x3e8]
lea esi, [edx + ecx]
cmp esi, eax
jbe 0x518a7b
sub eax, ecx
mov edx, eax
push edx
mov edx, dword [esp + 0x3c]
add ecx, edx
push ecx
lea eax, [esp + 0x58]
push eax
lea ecx, [esp + 0x64]
push ecx
call fcn.005168f0
mov esi, dword [eax + 8]
add esi, ebx
mov ebx, dword [esp + 0x28]
mov dword [esp + 0x4c], eax
xor eax, eax
add esp, 0x10
cmp ebx, eax
jne 0x518aae
mov dword [esp + 0x10], eax
jmp 0x518b23
cmp ebx, 4
ja case.default.0x518ab3
jmp dword [ebx*4 + 0x518dd0]
movzx edx, byte [esi]
mov dword [esp + 0x10], edx
jmp 0x518b21
movzx eax, byte [esi]
movzx ecx, byte [esi + 1]
shl eax, 8
add eax, ecx
mov dword [esp + 0x10], eax
jmp 0x518b21
movzx edx, byte [esi]
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 2]
shl edx, 8
add edx, eax
shl edx, 8
add edx, ecx
mov dword [esp + 0x10], edx
jmp 0x518b21
movzx edx, byte [esi]
movzx eax, byte [esi + 1]
movzx ecx, byte [esi + 2]
shl edx, 8
add edx, eax
movzx eax, byte [esi + 3]
shl edx, 8
add edx, ecx
shl edx, 8
add edx, eax
mov dword [esp + 0x10], edx
jmp 0x518b21
call fcn.004856b0
mov dword [esp + 0x10], 0
add esi, ebx
mov eax, dword [esp + 0x1c]
cmp eax, 4
ja case.default.0x518b2c
jmp dword [eax*4 + 0x518de4]
movzx ebx, byte [esi]
jmp 0x518b84
movzx ebx, byte [esi]
movzx ecx, byte [esi + 1]
shl ebx, 8
add ebx, ecx
jmp 0x518b84
movzx ebx, byte [esi]
movzx edx, byte [esi + 1]
movzx eax, byte [esi + 2]
shl ebx, 8
add ebx, edx
shl ebx, 8
add ebx, eax
jmp 0x518b84
movzx ebx, byte [esi]
movzx ecx, byte [esi + 1]
movzx edx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl ebx, 8
add ebx, ecx
shl ebx, 8
add ebx, edx
shl ebx, 8
add ebx, eax
jmp 0x518b84
call fcn.004856b0
xor ebx, ebx
mov eax, dword [esp + 0x1c]
add esi, edi
cmp eax, 4
ja case.default.0x518b8f
jmp dword [eax*4 + 0x518df8]
movzx edi, byte [esi]
jmp 0x518be7
movzx edi, byte [esi]
movzx ecx, byte [esi + 1]
shl edi, 8
add edi, ecx
jmp 0x518be7
movzx edi, byte [esi]
movzx edx, byte [esi + 1]
movzx eax, byte [esi + 2]
shl edi, 8
add edi, edx
shl edi, 8
add edi, eax
jmp 0x518be7
movzx edi, byte [esi]
movzx ecx, byte [esi + 1]
movzx edx, byte [esi + 2]
movzx eax, byte [esi + 3]
shl edi, 8
add edi, ecx
shl edi, 8
add edi, edx
shl edi, 8
add edi, eax
jmp 0x518be7
call fcn.004856b0
xor edi, edi
mov ecx, dword [esp + 0x3c]
push ecx
sub edi, ebx
call fcn.004c4f30
add esp, 4
xor esi, esi
test edi, edi
je 0x518cee
push edi
push ebx
lea edx, [esp + 0x58]
push edx
lea eax, [esp + 0x64]
push eax
call fcn.005168f0
mov esi, eax
add esp, 0x10
mov dword [esi + 0xc], edi
mov ebx, dword [esp + 0x14]
mov edi, dword [ebp + 0xc]
test esi, esi
je 0x518cf5
lea eax, [esp + 0x70]
push eax
mov eax, dword [0x6bec7c]
mov ecx, dword [eax + 0x13c]
mov edx, dword [eax + 0x138]
mov eax, dword [esp + 0x50]
push ecx
mov ecx, dword [esp + 0x50]
push edx
push eax
push ecx
call fcn.00487d70
mov edx, dword [esp + 0x84]
mov eax, dword [esp + 0x24]
shr edx, 0x10
add esp, 0x14
cmp eax, edx
jb 0x518c6d
call fcn.00485770
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x28]
test ecx, ecx
jne 0x518d83
lea ecx, [esp + 0x60]
push ecx
mov ecx, dword [0x6bec7c]
mov edx, dword [ecx + 0x29c]
mov ecx, dword [ecx + 0x298]
push edx
push ecx
mov ecx, dword [esp + 0x80]
mov edx, dword [ecx + eax*8 + 4]
mov eax, dword [ecx + eax*8]
push edx
push eax
call fcn.00487d70
mov eax, dword [0x6bec7c]
mov edx, dword [eax + 0x2c4]
mov eax, dword [eax + 0x2c0]
lea ecx, [esp + 0x54]
push ecx
mov ecx, dword [esp + 0x7c]
push edx
mov edx, dword [esp + 0x7c]
push eax
push ecx
push edx
call fcn.00487e20
add esp, 0x28
test eax, eax
je 0x518d46
mov ecx, dword [0x6bec7c]
mov eax, dword [esp + 0x44]
cmp eax, dword [ecx + 0x44]
je 0x518d46
mov dword [esp + 0x20], 1
jmp 0x518d54
mov ebx, dword [esp + 0x14]
mov edi, dword [ebp + 0xc]
test bx, bx
je 0x518d34
mov ecx, dword [0x6bec78]
mov edx, dword [ecx]
test dword [edx + 0x34], 0x10000000
jne 0x518d13
mov eax, dword [esp + 0x24]
test eax, eax
je 0x518d2f
mov eax, dword [edi + 0xc]
mov dword [esp + 0x14], 0
mov ebx, dword [esp + 0x14]
and eax, 0xff
mov dword [edi + 0xc], eax
jmp 0x518850
test bx, bx
jne 0x518d3b
call fcn.004856b0
jmp 0x518d9d
push edi
call fcn.005cb060
add esp, 4
jmp 0x518d9d
test byte [esi + 0x10], 2
mov dword [esp + 0x20], 0
je 0x518d6c
lea edx, [esp + 0x58]
push edx
call fcn.004c7ac0
add esp, 4
test eax, eax
jne 0x518d6c
mov eax, 1
jmp 0x518d6e
xor eax, eax
mov ebx, dword [esi + 0x10]
add eax, eax
xor eax, ebx
and eax, 2
mov ecx, ebx
xor ecx, eax
mov dword [esi + 0x10], ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x20]
mov edx, dword [esp + 0x64]
push ecx
mov ecx, dword [esp + 0x64]
push edx
push ecx
push esi
push eax
push edi
call fcn.00517b00
add esp, 0x18
mov edx, dword [edi + 0xc]
mov eax, dword [esp + 0x2c]
and edx, 0xff
shl eax, 8
or edx, eax
mov dword [edi + 0xc], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret