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

Disassembly:
mov ecx, dword fs:[0x14]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x508a38
sub esp, 0x60
mov ecx, dword [esp + 0x6c]
cmp ecx, 1
je 0x508a23
mov edx, dword [esp + 0x64]
mov edi, dword [edx + 0x10]
lea ebx, [edx + 0x10]
mov dword [esp + 0x5c], ebx
test edi, edi
je 0x508a04
mov dword [esp + 0x44], edi
mov ebp, dword [0xa08230]
mov esi, dword [edi + 0x10]
test ebp, ebp
jne 0x5089d5
mov dword [edx + 0x10], esi
xor eax, eax
call fcn.0044d9b1
mov eax, dword [esp + 0x44]
mov dword [esp + 0x3c], eax
movzx ecx, byte [esp + 0x74]
mov byte [eax], cl
lea ebp, [eax + 0x10]
test byte [ebp], al
mov dword [eax + 8], 0
mov dword [eax + 0xc], 1
mov esi, dword [0xa08230]
lea edi, [eax + 4]
mov dword [esp + 0x58], edi
test esi, esi
jne 0x5089af
mov dword [eax + 4], ebp
xor ebp, ebp
jmp 0x5086bc
inc ebp
movzx ecx, byte [esp + 0x74]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
mov esi, dword [esp + 0x6c]
cmp ebp, esi
jge 0x5088ea
mov dword [esp + 0x34], ebp
mov ebx, dword [esp + 0x68]
mov edi, dword [ebx + ebp*4]
mov dword [esp + 0x40], edi
movzx edx, byte [edi]
cmp dl, cl
je 0x508792
mov edx, dword [eax + 4]
mov ecx, dword [eax + 8]
mov ebx, dword [eax + 0xc]
lea esi, [ecx + 1]
cmp esi, ebx
jg 0x508720
lea ebx, [ecx + 1]
mov dword [eax + 8], ebx
lea ebx, [edx + ecx*4]
mov esi, dword [0xa08230]
test esi, esi
jne 0x50870a
mov dword [edx + ecx*4], edi
jmp 0x5086aa
mov dword [esp], ebx
mov dword [esp + 4], edi
call fcn.0040f250
mov eax, dword [esp + 0x3c]
mov ebp, dword [esp + 0x34]
jmp 0x5086aa
lea eax, [0x780800]
mov dword [esp], eax
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ebx
mov dword [esp + 0x10], esi
call fcn.00439c80
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x3c]
mov dword [ebx + 0xc], edx
mov edx, dword [0xa08230]
test edx, edx
jne 0x50876c
mov dword [ebx + 4], eax
mov ebp, dword [esp + 0x34]
mov edi, dword [esp + 0x40]
mov edx, eax
mov eax, ebx
jmp 0x5086f2
mov dword [esp + 0x54], eax
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x58]
mov dword [esp], ecx
mov dword [esp + 4], eax
call fcn.0040f250
mov eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x3c]
jmp 0x50875e
mov edx, dword [eax + 8]
mov ecx, dword [edi + 8]
lea ebx, [edx + ecx]
mov dword [esp + 0x2c], ebx
mov esi, dword [eax + 0xc]
mov ebp, dword [eax + 4]
mov eax, dword [edi + 0xc]
mov edi, dword [edi + 4]
cmp ebx, esi
ja 0x50889b
cmp ebx, esi
ja 0x508a31
cmp edx, ebx
ja 0x508a31
mov dword [esp + 0x28], esi
mov dword [esp + 0x50], ebp
sub esi, edx
mov dword [esp + 0x24], esi
xchg esi, ebx
neg ebx
xchg esi, ebx
shl edx, 2
sar esi, 0x1f
and edx, esi
add edx, ebp
mov dword [esp + 4], edx
mov dword [esp + 8], ecx
mov edx, dword [esp + 0x24]
mov dword [esp + 0xc], edx
lea edx, [0x780800]
mov dword [esp], edx
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
call fcn.0040f5b0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x3c]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x28]
mov dword [ecx + 0xc], eax
mov eax, dword [0xa08230]
test eax, eax
jne 0x508881
mov eax, dword [esp + 0x50]
mov dword [ecx + 4], eax
mov eax, dword [0xa08230]
mov edx, dword [esp + 0x40]
lea ebx, [edx + 0x10]
mov ebp, dword [esp + 0x64]
mov esi, dword [ebp + 0x10]
test eax, eax
jne 0x508857
mov dword [edx + 0x10], esi
mov dword [ebp + 0x10], edx
mov eax, ecx
mov ebp, dword [esp + 0x34]
jmp 0x5086aa
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.0040f250
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov ecx, dword [esp + 0x40]
mov dword [esp + 4], ecx
call fcn.0040f250
mov ecx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x64]
jmp 0x50884c
mov eax, dword [esp + 0x58]
mov dword [esp], eax
mov ecx, dword [esp + 0x50]
mov dword [esp + 4], ecx
call fcn.0040f250
mov ecx, dword [esp + 0x3c]
jmp 0x50882e
mov dword [esp + 0x28], eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x20], edx
lea eax, [0x780800]
mov dword [esp], eax
mov dword [esp + 4], ebp
mov dword [esp + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 0x10], ebx
call fcn.00439c80
mov esi, dword [esp + 0x1c]
mov ebp, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
mov ebx, dword [esp + 0x2c]
mov edi, dword [esp + 0x4c]
jmp 0x5087b3
cmp cl, 0x13
je 0x5088f7
mov dword [esp + 0x78], eax
add esp, 0x60
ret
mov ecx, dword [eax + 4]
mov ebx, dword [eax + 8]
mov ebp, dword [eax + 0xc]
mov dword [esp + 4], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0xc], ebp
mov dword [esp], edx
call fcn.00508a50
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x3c]
mov dword [ebx + 8], ecx
mov dword [ebx + 0xc], eax
mov eax, dword [0xa08230]
test eax, eax
jne 0x508991
mov dword [ebx + 4], edx
mov eax, dword [ebx + 8]
cmp eax, 1
jne 0x50898a
mov eax, dword [edx]
mov ecx, dword [0xa08230]
lea edx, [ebx + 0x10]
mov ebp, dword [esp + 0x64]
mov esi, dword [ebp + 0x10]
test ecx, ecx
jne 0x50895d
mov dword [ebx + 0x10], esi
mov dword [ebp + 0x10], ebx
jmp 0x5088ef
mov dword [esp + 0x38], eax
mov dword [esp], edx
mov dword [esp + 4], esi
call fcn.0040f250
mov eax, dword [esp + 0x5c]
mov dword [esp], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 4], eax
call fcn.0040f250
mov eax, dword [esp + 0x38]
jmp 0x5088ef
mov eax, ebx
jmp 0x5088ef
mov dword [esp + 0x48], edx
mov eax, dword [esp + 0x58]
mov dword [esp], eax
mov dword [esp + 4], edx
call fcn.0040f250
mov edx, dword [esp + 0x48]
mov ebx, dword [esp + 0x3c]
jmp 0x508937
mov dword [esp], edi
mov dword [esp + 4], ebp
call fcn.0040f250
mov eax, dword [esp + 0x3c]
movzx ecx, byte [esp + 0x74]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
mov edi, dword [esp + 0x58]
jmp 0x5086a6
mov dword [esp], ebx
mov dword [esp + 4], esi
call fcn.0040f250
lea eax, [0x78ab00]
mov dword [esp], eax
mov eax, dword [esp + 0x44]
mov dword [esp + 4], eax
call fcn.0040f760
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
jmp 0x50866b
lea eax, [0x78ab00]
mov dword [esp], eax
call fcn.0040e9e0
mov eax, dword [esp + 4]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x5c]
jmp 0x50866f
mov eax, dword [esp + 0x68]
mov eax, dword [eax]
mov dword [esp + 0x78], eax
add esp, 0x60
ret
call fcn.004269c0
ud2
call fcn.0044be50
jmp fcn.00508610