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

Disassembly:
mov ecx, dword [0x9aee30]
mov ecx, dword fs:[ecx]
mov ecx, dword [ecx]
cmp esp, dword [ecx + 8]
jbe 0x508f9f
sub esp, 0x70
mov eax, dword [esp + 0x94]
mov dword [esp], eax
mov eax, dword [esp + 0x74]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x78]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x7c]
mov dword [esp + 0xc], eax
call fcn.00508890
mov eax, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x54], ecx
mov edx, dword [eax + 0x18]
mov dword [esp], ecx
call edx
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x90]
lea edx, [ecx + eax - 1]
test eax, eax
je 0x508f99
mov dword [esp + 0x34], eax
mov dword [esp + 0x4c], edx
lea eax, [0x68dfc0]
mov dword [esp], eax
call fcn.0040d2a0
mov eax, dword [esp + 0x4c]
mov ecx, dword [esp + 0x34]
cmp ecx, 0xffffffff
je 0x508ca5
cdq
idiv ecx
jmp 0x508ca7
neg eax
mov dword [esp + 0x1c], eax
imul eax, ecx
mov dword [esp + 0x24], eax
mov ebx, dword [esp + 4]
mov dword [esp + 0x6c], ebx
lea ebp, [0x692a40]
mov dword [esp], ebp
mov dword [esp + 4], 0
mov dword [esp + 8], eax
call fcn.004507f0
mov eax, dword [esp + 0xc]
mov dword [esp + 0x68], eax
lea ecx, [0x692a40]
mov dword [esp], ecx
mov ecx, dword [esp + 0x34]
mov dword [esp + 4], ecx
mov dword [esp + 8], ecx
call fcn.004507f0
mov eax, dword [esp + 0xc]
mov ecx, 1
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x68]
xor ebp, ebp
mov esi, dword [esp + 0x34]
mov edi, esi
jmp 0x508d28
mov eax, dword [esp + 0x2c]
inc eax
mov ecx, eax
mov ebp, dword [esp + 0x48]
mov eax, esi
mov esi, ebx
mov ebx, edx
mov edx, edi
mov edi, dword [esp + 0x3c]
mov dword [esp + 0x3c], edi
mov edi, dword [esp + 0x1c]
cmp ecx, edi
jg 0x508e88
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x38], esi
mov dword [esp + 0x58], eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ebp
mov dword [esp + 0x50], ebx
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x14]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
call ecx
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x20]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
mov ebx, dword [esp + 0x80]
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0x84]
mov dword [esp + 8], ebp
mov esi, dword [esp + 0x88]
mov dword [esp + 0xc], esi
call ecx
mov eax, dword [esp + 0x2c]
mov ecx, eax
sar eax, 0x18
mov edx, dword [esp + 0x6c]
mov byte [edx], al
mov eax, ecx
sar ecx, 0x10
mov byte [edx + 1], cl
mov ecx, eax
sar eax, 8
mov byte [edx + 2], al
mov byte [edx + 3], cl
mov eax, dword [esp + 0x28]
mov ebx, dword [eax + 0x20]
mov ebp, dword [esp + 0x54]
mov dword [esp], ebp
mov dword [esp + 4], edx
mov dword [esp + 8], 4
mov dword [esp + 0xc], 4
call ebx
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x1c]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
mov ebx, dword [esp + 0x50]
mov dword [esp + 4], ebx
mov ebx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0xc], ebx
call ecx
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x34]
mov edx, eax
sub edx, ecx
cmp eax, edx
jb 0x508f90
mov ebx, dword [esp + 0x10]
mov ebp, dword [esp + 0x18]
mov esi, eax
sub eax, edx
mov dword [esp + 0x40], eax
mov edi, ebp
sub ebp, edx
xchg ebp, ebx
neg ebx
xchg ebp, ebx
sar ebp, 0x1f
and edx, ebp
lea ebp, [ebx + edx]
mov edx, ebx
mov ebx, dword [esp + 0x38]
cmp ebx, eax
jg 0x508e41
mov eax, ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x48], esi
mov dword [esp + 0x64], edx
mov dword [esp + 0x5c], ebp
mov esi, dword [esp + 0x58]
cmp esi, ebp
je 0x508e81
mov dword [esp], esi
mov dword [esp + 4], ebp
mov dword [esp + 8], eax
call fcn.0046d220
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x64]
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x5c]
mov esi, dword [esp + 0x58]
mov edi, dword [esp + 0x4c]
mov eax, 2
jmp 0x508ed0
mov ecx, dword [esp + 0x90]
cmp ecx, edx
ja 0x508eac
mov dword [esp + 0x98], ebx
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], edx
add esp, 0x70
ret
call fcn.0046c950
mov esi, dword [esp + 0x30]
inc esi
mov edx, dword [esp + 0x64]
mov ebp, ebx
mov edi, dword [esp + 0x4c]
mov ebx, ecx
mov ecx, dword [esp + 0x34]
mov ecx, eax
mov eax, esi
mov esi, ecx
mov ecx, dword [esp + 0x34]
mov ebp, dword [esp + 0x8c]
cmp ebp, eax
jl 0x508d11
mov dword [esp + 0x30], eax
mov dword [esp + 0x44], ebx
mov dword [esp + 0x60], esi
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x14]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
call ecx
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x20]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
mov ebx, dword [esp + 0x60]
mov dword [esp + 4], ebx
mov ebp, dword [esp + 0x44]
mov dword [esp + 8], ebp
mov ebp, dword [esp + 0x3c]
mov dword [esp + 0xc], ebp
call ecx
mov eax, dword [esp + 0x28]
mov ecx, dword [eax + 0x1c]
mov edx, dword [esp + 0x54]
mov dword [esp], edx
mov ebx, dword [esp + 0x60]
mov dword [esp + 4], ebx
mov dword [esp + 8], 0
mov ebx, dword [esp + 0x3c]
mov dword [esp + 0xc], ebx
call ecx
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
mov dword [esp + 0x3c], edx
mov ebx, dword [esp + 0x5c]
mov ebp, dword [esp + 0x40]
xor esi, esi
jmp 0x508f7b
movzx edi, byte [esi + ebx]
movzx edx, byte [esi + eax]
xor edi, edx
xchg edi, eax
mov byte [ebx + esi], al
xchg edi, eax
inc esi
mov edx, dword [esp + 0x3c]
cmp esi, ecx
jge 0x508eb1
cmp esi, ebp
jb 0x508f67
mov eax, esi
mov ecx, ebp
call fcn.0046c910
mov ecx, eax
mov eax, edx
call fcn.0046c970
call fcn.00438c60
nop
call fcn.0046b490
jmp fcn.00508c10