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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x10
mov eax, dword [edx + 0x20]
push ebx
mov ebx, ecx
push ebp
mov eax, dword [eax + 0x1c]
push esi
mov esi, dword [ebx + 8]
mov dword [esp + 0x14], ebx
mov eax, dword [eax + 0x1c]
push edi
mov edi, dword [edx + 0x44]
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x5096d8
cmp dword [ebx + 0x74], esi
jne 0x5096cd
mov eax, dword [ebx]
test byte [eax + 0x50], 8
jne 0x5096cd
mov byte [ebx + 0x17], 1
call fcn.00491bf0
mov esi, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [edi + 0x30]
lea ecx, [edi + 0x30]
mov dword [esp + 0x14], ecx
lea ebp, [esi + 0x70]
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x10], ebp
cmp dword [esi + 0x78], ecx
jg 0x509706
push 0
push eax
push edx
mov edx, 0x74
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509736
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
mov dword [eax + ecx*4 + 0xc], ebp
mov dword [eax + ecx*4 + 0x10], ebp
lea ebp, [esi + 0x70]
mov dword [eax + ecx*4 + 4], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4], 0x74
mov dword [eax + ecx*4 + 8], edx
mov dword [esp + 0x10], ebp
mov edx, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
mov edx, dword [edx]
lea eax, [edx + 1]
cmp dword [esi + 0x78], ecx
jg 0x50975c
push 0
push edx
push eax
mov edx, 0x71
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509790
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
lea ebp, [edx + 1]
mov dword [eax + ecx*4 + 4], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
mov edx, dword [eax]
lea eax, [edx + 2]
cmp dword [esi + 0x78], ecx
jg 0x5097b6
push 0
push edx
push eax
mov edx, 0x71
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x5097ea
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
lea ebp, [edx + 2]
mov dword [eax + ecx*4 + 4], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
mov edx, dword [eax]
lea eax, [edx + 3]
cmp dword [esi + 0x78], ecx
jg 0x509810
push 0
push edx
push eax
mov edx, 0x71
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509844
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
lea ebp, [edx + 3]
mov dword [eax + ecx*4 + 4], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [edi + 8]
test ecx, ecx
je 0x5098ad
mov ecx, dword [ecx]
mov eax, dword [ebx + 0x2c]
inc eax
mov dword [edi + 0x44], eax
add dword [ebx + 0x2c], ecx
lea eax, [ecx - 1]
mov edx, dword [edi + 0x44]
add eax, edx
mov ecx, dword [esi + 0x74]
mov dword [esp + 0x1c], eax
cmp dword [esi + 0x78], ecx
jg 0x509880
push eax
push edx
push 0
mov edx, 0x4a
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x5098ad
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
mov dword [eax + ecx*4 + 8], edx
mov edx, dword [esp + 0x1c]
mov dword [eax + ecx*4 + 4], ebp
mov dword [eax + ecx*4 + 0x10], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x4a
mov dword [eax + ecx*4 + 0xc], edx
mov edx, dword [ebx + 0x2c]
inc edx
mov dword [ebx + 0x2c], edx
mov dword [edi + 0x54], edx
mov ecx, dword [esi + 0x74]
cmp dword [esi + 0x78], ecx
jg 0x5098d5
push 0
push edx
push 1
mov edx, 0x47
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509902
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
xor ebp, ebp
mov dword [eax + ecx*4 + 0xc], ebp
mov dword [eax + ecx*4 + 0x10], ebp
mov ebp, dword [esp + 0x10]
mov dword [eax + ecx*4], 0x47
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 8], edx
cmp byte [edi + 0x14], 0
je 0x509a30
inc dword [ebx + 0x2c]
mov eax, dword [ebx + 0x2c]
mov dword [edi + 0x58], eax
inc dword [ebx + 0x2c]
mov eax, dword [ebx + 0x2c]
mov dword [edi + 0x5c], eax
mov eax, dword [ebx + 0x28]
mov dword [edi + 0x3c], eax
inc dword [ebx + 0x28]
mov ecx, dword [esi + 0x74]
mov edx, dword [edi + 0x58]
cmp dword [esi + 0x78], ecx
jg 0x509948
push 0
push edx
push 1
mov edx, 0x47
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509977
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
mov dword [eax + ecx*4], 0x47
mov dword [eax + ecx*4 + 4], 1
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi + 0x74]
mov edx, dword [edi + 0x5c]
cmp dword [esi + 0x78], ecx
jg 0x509998
push 0
push edx
push 0
mov edx, 0x47
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x5099c7
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
mov dword [eax + ecx*4], 0x47
mov dword [eax + ecx*4 + 4], 0
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
mov edi, dword [edi + 0x3c]
mov edx, dword [eax]
cmp dword [esi + 0x78], ecx
jg 0x5099f3
push 0
push edx
push edi
mov edx, 0x71
mov ecx, esi
call fcn.00491e40
add esp, 0xc
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp]
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 4], edi
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi + 0x2c]
test dword [eax + 4], 0x1000
je 0x509b58
cmp byte [edi + 0x11], 0x5a
je 0x509b58
mov eax, dword [edi + 0x48]
mov ecx, ebx
push 0
push 0
mov edx, dword [eax + 0x14]
call fcn.004e0130
mov ecx, dword [ebx + 0x28]
mov ebp, eax
mov dword [edi + 0x3c], ecx
add esp, 8
mov eax, dword [ebx + 0x2c]
inc dword [ebx + 0x28]
inc eax
mov dword [edi + 0x40], eax
add dword [ebx + 0x2c], 3
test ebp, ebp
je 0x509a8a
mov eax, dword [edi + 0x2c]
mov eax, dword [eax + 0x20]
cmp byte [eax + 1], 0x69
jne 0x509a8a
mov eax, dword [ebp + 0x10]
mov byte [eax], 1
mov ecx, dword [esi + 0x74]
mov edx, dword [edi + 0x3c]
cmp dword [esi + 0x78], ecx
jg 0x509aab
push 0
push 2
push edx
mov edx, 0x74
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509ae1
mov ebx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax + ecx*4], 0x74
mov dword [eax + ecx*4 + 4], edx
mov dword [eax + ecx*4 + 8], 2
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4 + 0x10], 0
mov ecx, dword [esi]
cmp byte [ecx + 0x57], 0
je 0x509af9
push ebp
mov edx, 0xfffffff7
call fcn.00492950
add esp, 4
jmp 0x509b0e
mov eax, dword [esi + 0x74]
lea ecx, [eax + eax*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov byte [eax + ecx*4 - 0x13], 0xf7
mov dword [eax + ecx*4 - 4], ebp
mov edx, dword [edi + 0x40]
mov ecx, dword [esi + 0x74]
inc edx
cmp dword [esi + 0x78], ecx
jg 0x509b33
push 0
push edx
push 0
mov edx, 0x47
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509beb
lea eax, [ecx + 1]
xor ebp, ebp
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax + ecx*4], 0x47
mov dword [eax + ecx*4 + 0xc], ebp
mov dword [eax + ecx*4 + 0x10], ebp
jmp 0x509be3
mov eax, dword [eax + 0x20]
cmp eax, str.nth_value
je 0x509b7f
cmp eax, str.first_value
je 0x509b7f
cmp eax, str.lead
je 0x509b77
cmp eax, 0x592320
jne 0x509beb
mov eax, dword [ebx + 0x28]
mov dword [edi + 0x3c], eax
jmp 0x509b90
mov eax, dword [ebx + 0x2c]
inc eax
mov dword [edi + 0x40], eax
mov eax, dword [ebx + 0x28]
mov dword [edi + 0x3c], eax
add dword [ebx + 0x2c], 2
inc dword [ebx + 0x28]
mov eax, dword [esp + 0x14]
mov ecx, dword [esi + 0x74]
mov ebp, dword [edi + 0x3c]
mov edx, dword [eax]
cmp dword [esi + 0x78], ecx
jg 0x509bb9
push 0
push edx
push ebp
mov edx, 0x71
mov ecx, esi
call fcn.00491e40
add esp, 0xc
jmp 0x509beb
mov ebx, dword [esp + 0x18]
lea eax, [ecx + 1]
mov dword [esi + 0x74], eax
lea ecx, [ecx + ecx*4]
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax + ecx*4 + 0x10], 0
mov dword [eax + ecx*4 + 0xc], 0
mov dword [eax + ecx*4], 0x71
mov dword [eax + ecx*4 + 8], edx
mov dword [eax + ecx*4 + 4], ebp
mov edi, dword [edi + 0x24]
test edi, edi
jne 0x509a30
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret