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

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, dword [esp + 0x48]
xor ebp, ebp
push edi
cmp esi, ebp
mov dword [esp + 0x14], ebp
mov byte [esp + 0x13], 0
je 0x500642
mov eax, dword [esi + 4]
test byte [eax + 0x14], 2
je 0x500642
movsx eax, byte [esi + 0x26]
cmp eax, ebp
je 0x500642
mov eax, 1
jmp 0x500644
xor eax, eax
mov ecx, dword [esp + 0x2c]
and al, 1
push ecx
mov bl, al
call fcn.004f4b20
movsx edx, bl
lea eax, [eax + edx + 1]
lea eax, [eax + eax*8]
shl eax, 2
push eax
call sub.HCLXT.dll_Ordinal_127
add esp, 8
mov edi, eax
test bl, bl
mov ebx, dword [esp + 0x50]
mov dword [esp + 0x1c], edi
mov dword [esp + 0x18], ebp
je 0x5006b9
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
lea ecx, [edi + 4]
mov dword [edi], esi
push ecx
push edx
push eax
push ebx
push esi
call fcn.004f4a50
mov eax, dword [esp + 0x4c]
add esp, 0x14
mov word [edi + 0x1c], bp
mov word [edi + 0x1e], bp
cmp eax, ebp
mov word [edi + 0x20], bp
je 0x5006b1
mov cx, word [esp + 0x3c]
mov word [edi + 0x10], cx
mov dword [esp + 0x14], 1
mov edx, dword [esp + 0x2c]
cmp dword [edx + 0x78], ebp
jle 0x50087c
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
lea edi, [edi + eax*4 + 0x1c]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
mov edx, dword [ecx + 0x74]
mov esi, dword [edx + eax*4]
mov ecx, dword [esi + 4]
test byte [ecx + 0x14], 2
je 0x50080a
movsx eax, byte [esi + 0x26]
cmp eax, ebp
je 0x50080a
cmp esi, dword [esp + 0x48]
jne 0x500708
mov byte [esp + 0x13], 1
jmp 0x50080a
mov eax, dword [esp + 0x34]
mov ecx, dword [esp + 0x30]
lea edx, [edi - 0x18]
mov dword [edi - 0x1c], esi
push edx
push eax
push ecx
push ebx
push esi
call fcn.004f4a50
mov word [edi], bp
mov word [edi + 2], bp
mov word [edi + 4], bp
mov eax, dword [esi + 4]
mov edx, dword [0x57125c]
add eax, 0x70
add esp, 0x14
mov ecx, dword [eax]
cmp ecx, ebp
je 0x50074c
cmp dword [ecx + 4], edx
jne 0x50074c
mov dword [0x571260], eax
jmp 0x500761
push edx
push eax
call fcn.00471040
mov edx, dword [0x57125c]
add esp, 8
mov dword [0x571260], eax
cmp eax, ebp
je 0x500778
mov eax, dword [eax]
cmp eax, ebp
je 0x500778
mov al, byte [eax + 0x2e]
shr eax, 6
and eax, 1
cmp eax, ebp
jne 0x5007b0
mov eax, dword [esi + 4]
add eax, 0x70
mov ecx, dword [eax]
cmp ecx, ebp
je 0x500789
cmp dword [ecx + 4], edx
je 0x500793
push edx
push eax
call fcn.00471040
add esp, 8
cmp eax, ebp
mov dword [0x571260], eax
je 0x5007ef
mov eax, dword [eax]
cmp eax, ebp
je 0x5007ef
xor edx, edx
mov dl, byte [eax + 0x2e]
mov eax, edx
shr eax, 7
cmp eax, ebp
je 0x5007ef
mov eax, dword [esp + 0x2c]
cmp byte [eax + 0x139], 3
je 0x5007ef
lea edx, [esp + 0x20]
push 1
lea ecx, [esp + 0x50]
push edx
push esi
mov dword [esp + 0x2c], str.orientation
mov dword [esp + 0x30], ecx
call sub.HCLXT.dll_Ordinal_184
mov al, byte [esp + 0x58]
add esp, 0xc
cmp al, 2
jne 0x5007eb
mov word [edi - 0x10], bp
jmp 0x5007ef
mov word [edi - 0xe], bp
cmp dword [esp + 0x38], ebp
je 0x5007fe
mov ax, word [esp + 0x3c]
mov word [edi - 0xc], ax
mov ecx, dword [esp + 0x14]
inc ecx
add edi, 0x24
mov dword [esp + 0x14], ecx
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x18]
inc eax
mov edx, dword [ecx + 0x78]
mov dword [esp + 0x18], eax
cmp eax, edx
jl 0x5006d1
mov al, byte [esp + 0x13]
test al, al
je 0x500878
mov edi, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
lea edx, [edi + edi*8]
lea esi, [eax + edx*4]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x48]
lea ecx, [esi + 4]
mov dword [esi], eax
push ecx
mov ecx, dword [esp + 0x34]
push edx
push ecx
push ebx
push eax
call fcn.004f4a50
mov eax, dword [esp + 0x4c]
add esp, 0x14
mov word [esi + 0x1c], bp
mov word [esi + 0x1e], bp
cmp eax, ebp
mov word [esi + 0x20], bp
je 0x500873
mov dx, word [esp + 0x3c]
mov word [esi + 0x10], dx
inc edi
mov dword [esp + 0x14], edi
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
lea eax, [eax + eax*8]
mov dword [edi + eax*4], ebp
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret