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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d6968
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x84
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
xor edi, edi
xor eax, eax
cmp dword [esi + 8], edi
jle 0x50d6d2
mov ecx, dword [esi + 4]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x1c], edi
mov ecx, dword [esi + 8]
cmp eax, ecx
jl 0x50d6c0
mov ecx, dword [esi + 8]
cmp ecx, 2
jl 0x50d9ad
mov eax, dword [esi + 4]
push 0x50b640
push 4
push ecx
push eax
call dword [sym.imp.msvcrt.dll_qsort]
mov ebx, 1
add esp, 0x10
mov dword [esp + 0x60], edi
mov dword [esp + 0x64], 6
mov dword [esp + 0x68], ebx
mov dword [esp + 0x6c], 2
mov dword [esp + 0x70], 7
mov dword [esp + 0x74], 8
mov dword [esp + 0x78], 5
mov dword [esp + 0x7c], 0xb
mov dword [esp + 0x80], 3
mov dword [esp + 0x84], 4
mov dword [esp + 0x88], 9
mov dword [esp + 0x8c], 0xa
mov dword [esp + 0x2c], 0x5e78f8
mov dword [esp + 0x30], edi
mov dword [esp + 0x3c], edi
mov dword [esp + 0x38], edi
mov dword [esp + 0x34], edi
lea ecx, [esp + 0x40]
mov dword [esp + 0x98], edi
call fcn.004b6ca0
push esi
push edi
mov byte [esp + 0xa0], bl
mov dword [esp + 0x18], edi
call fcn.0050d330
fstp qword [esp + 0x1c]
lea eax, [esp + 0x48]
push eax
push esi
call fcn.0050b890
add esp, 0x10
lea ecx, [esp + 0x40]
call fcn.004b7040
fstp qword [esp + 0x24]
lea ecx, [esp + 0x2c]
push ecx
push esi
call fcn.0050b980
add esp, 8
mov edi, ebx
cmp edi, 6
jne 0x50d7e2
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push 0x50b680
push 4
push eax
push ecx
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
mov ebx, dword [esp + edi*4 + 0x60]
push esi
push ebx
call fcn.0050d330
fst qword [esp + 0x24]
fcomp qword [esp + 0x1c]
add esp, 8
fnstsw ax
test ah, 0x41
jne 0x50d89f
fld qword [esp + 0x14]
fadd qword [0x5e4668]
fcomp qword [esp + 0x1c]
fnstsw ax
test ah, 1
je 0x50d84e
lea edx, [esp + 0x40]
push edx
push esi
call fcn.0050b890
add esp, 8
lea ecx, [esp + 0x40]
call fcn.004b7040
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
fstp qword [esp + 0x24]
lea edx, [esp + 0x2c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], ecx
push edx
jmp 0x50d896
lea eax, [esp + 0x40]
push eax
push esi
call fcn.0050b890
add esp, 8
lea ecx, [esp + 0x40]
call fcn.004b7040
fcomp qword [esp + 0x24]
fnstsw ax
test ah, 1
je 0x50d89f
lea ecx, [esp + 0x40]
call fcn.004b7040
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
fstp qword [esp + 0x24]
lea eax, [esp + 0x2c]
mov dword [esp + 0x10], ebx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], edx
push eax
push esi
call fcn.0050b980
add esp, 8
inc edi
cmp edi, 0xc
jl 0x50d7c5
mov ecx, dword [esi + 4]
fld qword [0x5e2858]
mov edx, dword [ecx]
fdiv qword [edx + 0x60]
fadd qword [0x5e78f0]
fcomp qword [esp + 0x14]
fnstsw ax
test ah, 0x41
jne 0x50d91a
lea ecx, [esp + 0x40]
mov byte [esp + 0x98], 0
call fcn.0042bd50
mov dword [esp + 0x2c], 0x5e78f8
mov esi, dword [esp + 0x30]
mov dword [esp + 0x98], 2
test esi, esi
je 0x50d9ad
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50d9a4
lea edi, [eax]
push 0
mov ecx, esi
call fcn.00464ac0
add esi, 0x58
dec edi
jne 0x50d906
jmp 0x50d9a0
cmp dword [esp + 0x10], 0xa
je 0x50d92e
lea eax, [esp + 0x2c]
push eax
call fcn.0050bb60
add esp, 4
lea ecx, [esp + 0x40]
push ecx
push esi
call fcn.0050b890
add esp, 8
lea ecx, [esp + 0x40]
call fcn.004b7060
fcomp qword [ebp + 8]
fnstsw ax
test ah, 0x41
jne 0x50dabc
mov ecx, dword [esi + 8]
cmp ecx, 4
jge 0x50d9c5
lea ecx, [esp + 0x40]
mov byte [esp + 0x98], 0
call fcn.0042bd50
mov dword [esp + 0x2c], 0x5e78f8
mov esi, dword [esp + 0x30]
mov dword [esp + 0x98], 3
test esi, esi
je 0x50d9ad
mov eax, dword [esp + 0x34]
test eax, eax
je 0x50d9a4
lea edi, [eax]
push 0
mov ecx, esi
call fcn.00464ac0
add esi, 0x58
dec edi
jne 0x50d991
mov esi, dword [esp + 0x30]
push esi
call sub.mfc42u.dll_operatordelete
add esp, 4
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [ebp + 0x14]
xor eax, eax
test ecx, ecx
jle 0x50d9e0
mov edx, dword [esi + 4]
inc eax
mov ecx, dword [edx + eax*4 - 4]
mov dword [ecx + 0x1c], ebx
mov ecx, dword [esi + 8]
cmp eax, ecx
jl 0x50d9ce
mov eax, dword [esi + 8]
mov ecx, dword [esi + 4]
push 0x50b6c0
push 4
push eax
push ecx
call dword [sym.imp.msvcrt.dll_qsort]
fld qword [esp + 0x58]
add esp, 8
fchs
fstp qword [esp]
fld qword [esp + 0x48]
sub esp, 8
fchs
fstp qword [esp]
push esi
call fcn.004f0c50
mov eax, dword [esi + 8]
add esp, 0x14
xor edi, edi
test eax, eax
mov dword [esp + 0x10], edi
jle 0x50dada
mov edx, dword [esi + 4]
mov ecx, dword [edx + edi*4]
call fcn.0050b020
fld qword [eax + 0x18]
fcomp qword [ebp + 8]
fnstsw ax
test ah, 0x41
jne 0x50daaa
mov eax, dword [esi + 4]
inc ebx
mov dword [ebp + 0x14], ebx
mov ecx, dword [eax + edi*4]
call fcn.0050b020
fld qword [eax + 8]
mov eax, dword [esi + 8]
fchs
fstp qword [esp + 0x24]
cmp edi, eax
jge 0x50daaa
mov ebx, dword [esi + 4]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
lea eax, [edi*4]
add eax, ebx
push ecx
push edx
lea ecx, [esp + 0x48]
mov eax, dword [eax]
mov dword [esp + 0x1c], eax
mov ebx, dword [eax]
call fcn.004b7040
mov ecx, dword [esp + 0x1c]
sub esp, 8
fstp qword [esp]
call dword [ebx + 0xc]
mov eax, dword [esi + 4]
mov ebx, dword [ebp + 0x14]
mov ecx, dword [eax + edi*4]
inc edi
mov dword [ecx + 0x1c], ebx
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x50da5e
mov edi, dword [esp + 0x10]
mov eax, dword [esi + 8]
inc edi
cmp edi, eax
mov dword [esp + 0x10], edi
jl 0x50da27
jmp 0x50dada
mov ecx, dword [esi + 8]
mov ebx, dword [ebp + 0x14]
xor eax, eax
test ecx, ecx
jle 0x50dada
mov edx, dword [esi + 4]
inc eax
mov ecx, dword [edx + eax*4 - 4]
mov dword [ecx + 0x1c], ebx
mov ecx, dword [esi + 8]
cmp eax, ecx
jl 0x50dac8
lea ecx, [esp + 0x40]
inc ebx
mov byte [esp + 0x98], 0
call fcn.0042bd50
mov dword [esp + 0x2c], 0x5e78f8
mov eax, dword [esp + 0x30]
mov dword [esp + 0x98], 4
test eax, eax
je 0x50db2e
mov ecx, dword [esp + 0x34]
test ecx, ecx
je 0x50db25
lea esi, [eax + 8]
lea edi, [ecx]
mov ecx, esi
call fcn.0042bd50
add esi, 0x58
dec edi
jne 0x50db14
mov eax, dword [esp + 0x30]
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov ecx, dword [esp + 0x90]
pop edi
mov eax, ebx
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret