Function at 0x511030
Capabilities:
Check for time delay via gettickcount
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x5d6e71
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x17c
push ebx
push esi
push edi
lea ecx, [esp + 0x158]
call fcn.0051d410
mov ecx, dword [ebp + 0x14]
lea eax, [esp + 0x158]
push eax
xor ebx, ebx
push ecx
mov ecx, dword [ebp + 8]
mov dword [esp + 0x198], ebx
call fcn.0050b020
push eax
call fcn.00559830
xor eax, eax
add esp, 0xc
mov dword [esp + 0x48], 0x5e2824
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], eax
mov edx, dword [ebp + 0x18]
mov byte [esp + 0x190], 1
mov ecx, dword [edx + 8]
cmp ecx, ebx
jle 0x5110fd
jmp 0x5110b8
mov eax, dword [esp + 0x50]
mov ecx, dword [ebp + 0x18]
mov edi, eax
push 0xffffffffffffffff
mov edx, dword [ecx + 4]
lea ecx, [esp + 0x4c]
mov esi, dword [edx + ebx*4]
add eax, dword [esi + 0x10]
push eax
call fcn.0046d900
mov eax, dword [esi + 0x10]
mov ecx, dword [esp + 0x4c]
mov esi, dword [esi + 0xc]
mov edx, eax
dec eax
lea ecx, [ecx + edi*4]
test edx, edx
je 0x5110f4
inc eax
mov edx, dword [esi]
add esi, 4
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x5110e7
mov eax, dword [ebp + 0x18]
inc ebx
cmp ebx, dword [eax + 8]
jl 0x5110b4
lea ecx, [esp + 0x124]
call fcn.004b6ca0
lea ecx, [esp + 0x80]
mov byte [esp + 0x190], 2
call sub.mfc42u.dll_CString::CString_3
fld qword [ebp + 0xc]
fmul qword [0x5e2850]
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
xor ebx, ebx
mov dword [esi + 0x260], ebx
mov dword [esi + 0x250], ebx
fstp qword [esi + 0x268]
mov dword [esi + 0x264], ebx
mov dword [esi + 0x270], ebx
mov dword [esi + 0x274], ebx
mov ecx, dword [edi + 0x78]
mov edx, dword [edi + 0x7c]
mov dword [esi + 0x258], ecx
mov ecx, dword [ebp + 0xc]
push 0x3fe00000
mov dword [esi + 0x25c], edx
mov edx, dword [ebp + 0x14]
push ebx
push eax
push ecx
push edx
push edi
push esi
mov byte [esp + 0x1ac], 3
call fcn.0050efd0
mov eax, dword [edi + 0x78]
mov ecx, dword [edi + 0x7c]
fld qword [ebp + 0xc]
fxch st(1)
mov dword [esp + 0xe0], eax
mov dword [esp + 0xe4], ecx
fdiv qword [esp + 0xe0]
mov eax, 0x5e78f8
mov dword [esp + 0xf4], ebx
mov dword [esp + 0xf8], 0x3fe00000
mov dword [esp + 0xfc], ebx
mov dword [esp + 0x100], 0x3fe00000
mov dword [esp + 0xec], ebx
mov dword [esp + 0x12c], eax
mov dword [esp + 0x130], ebx
mov dword [esp + 0x13c], ebx
mov dword [esp + 0x138], ebx
mov dword [esp + 0x134], ebx
fmul qword [esi + 0x30]
fsubr st(1)
fstp qword [esp + 0x10c]
fst qword [esp + 0x104]
fstp qword [esp + 0xc8]
mov dword [esp + 0x118], eax
mov dword [esp + 0x11c], ebx
mov dword [esp + 0x128], ebx
mov dword [esp + 0x124], ebx
mov dword [esp + 0x120], ebx
lea edx, [esp + 0x118]
lea eax, [esp + 0x64]
push edx
push eax
mov byte [esp + 0x1b4], 5
call fcn.0050b980
lea ecx, [esp + 0x134]
lea edx, [esp + 0x6c]
push ecx
push edx
call fcn.0050b980
mov edi, dword [ebp + 0x18]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov eax, dword [edi + 8]
mov dword [esi + 0x254], eax
mov eax, dword [edi + 8]
lea eax, [eax*8 + 0x20]
push eax
call sub.mfc42u.dll_operatornew
mov ebx, dword [edi + 8]
mov dword [esp + 0xb8], eax
add ebx, 4
lea ecx, [ebx + ebx*4]
lea edx, [ecx*4 + 4]
push edx
call sub.mfc42u.dll_operatornew
add esp, 0x34
mov dword [esp + 0x94], eax
test eax, eax
mov byte [esp + 0x190], 6
je 0x5112ed
push fcn.0040bf90
mov dword [eax], ebx
push fcn.005170c0
add eax, 4
push ebx
push 0x14
push eax
mov dword [esp + 0x28], eax
call fcn.005c1f9f
mov eax, dword [esp + 0x14]
xor ebx, ebx
mov dword [esp + 0x84], eax
jmp 0x5112f6
xor ebx, ebx
mov dword [esp + 0x84], ebx
mov eax, dword [edi + 8]
mov byte [esp + 0x190], 5
add eax, 4
mov dword [esp + 0x14], eax
lea ecx, [eax + eax*4]
lea edx, [ecx*4 + 4]
push edx
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x94], eax
cmp eax, ebx
mov byte [esp + 0x190], 7
je 0x511358
mov ecx, dword [esp + 0x14]
push fcn.00517160
mov dword [eax], ecx
push 0x517140
add eax, 4
push ecx
push 0x14
push eax
mov dword [esp + 0x28], eax
call fcn.005c1f9f
mov eax, dword [esp + 0x14]
mov dword [esp + 0x7c], eax
jmp 0x51135c
mov dword [esp + 0x7c], ebx
mov eax, dword [edi + 8]
mov byte [esp + 0x190], 5
add eax, 4
mov dword [esp + 0x14], eax
lea ecx, [eax + eax*4]
lea edx, [ecx*4 + 4]
push edx
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x94], eax
cmp eax, ebx
mov byte [esp + 0x190], 8
je 0x5113c1
mov ecx, dword [esp + 0x14]
push fcn.00517460
mov dword [eax], ecx
push 0x517440
add eax, 4
push ecx
push 0x14
push eax
mov dword [esp + 0x28], eax
call fcn.005c1f9f
mov eax, dword [esp + 0x14]
mov dword [esp + 0x90], eax
jmp 0x5113c8
mov dword [esp + 0x90], ebx
mov dword [esp + 0x30], 0x5e2824
mov dword [esp + 0x34], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x38], ebx
mov eax, 0x5f01d8
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x18], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x78], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x70], ebx
mov ecx, dword [edi + 8]
push 0xffffffffffffffff
push ecx
lea ecx, [esp + 0x70]
mov byte [esp + 0x198], 0xb
call fcn.0046d900
mov edx, dword [edi + 4]
mov eax, dword [edi + 8]
mov ecx, dword [esp + 0x6c]
mov dword [esp + 0x14], edx
mov edx, eax
dec eax
test edx, edx
je 0x511457
inc eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
add eax, 4
mov dword [ecx], edx
mov edx, dword [esp + 0x2c]
add ecx, 4
dec edx
mov dword [esp + 0x2c], edx
jne 0x511442
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
push 0x50d2f0
push 4
push eax
push ecx
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
call dword [sym.imp.kernel32.dll_GetTickCount]
lea edx, [esp + 0x48]
mov dword [esp + 0x2c], eax
push edx
mov byte [esp + 0x17], 1
call fcn.0050b840
fstp qword [esp + 0xc8]
add esp, 4
mov dword [esp + 0x8c], ebx
push ebx
lea eax, [esp + 0x84]
push ebx
push eax
call fcn.00436a50
add esp, 0xc
test al, al
je 0x512290
mov al, byte [esp + 0x13]
test al, al
je 0x511554
mov edx, dword [esi + 0x278]
mov ecx, dword [esp + 0x70]
push 0xffffffffffffffff
inc edx
push ecx
lea ecx, [esp + 0x20]
mov dword [esi + 0x278], edx
mov dword [esp + 0x4c], 0
mov dword [esp + 0x64], 0
mov dword [esp + 0x68], 0
call fcn.0046d900
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0x6c]
mov eax, dword [esp + 0x1c]
test edx, edx
je 0x511513
mov ebx, dword [ecx]
add ecx, 4
mov dword [eax], ebx
add eax, 4
dec edx
jne 0x511506
mov ebx, dword [ebp + 0x14]
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov edx, dword [ebx + 8]
push edx
call fcn.0046d900
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov eax, dword [esp + 0x34]
mov ebx, edx
dec edx
test ebx, ebx
je 0x511544
inc edx
mov ebx, dword [ecx]
add ecx, 4
mov dword [eax], ebx
add eax, 4
dec edx
jne 0x511537
lea eax, [esp + 0xfc]
push eax
call fcn.0050bb60
add esp, 4
mov ecx, dword [esi + 0x270]
xor ebx, ebx
inc ecx
push ebx
mov dword [esi + 0x270], ecx
lea ecx, [esp + 0x4c]
push ecx
call fcn.004f0d90
lea edx, [esp + 0x38]
push 1
push edx
call fcn.004f0d90
mov ecx, dword [esp + 0x30]
add esp, 0x10
xor eax, eax
cmp ecx, ebx
jle 0x5115a0
mov ecx, dword [esp + 0x1c]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov dword [edx + 0x50], ebx
mov dword [edx + 0x54], ebx
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jl 0x511587
cmp ecx, ebx
je 0x511a1e
mov ecx, dword [esp + 0x88]
mov eax, dword [esp + 0x44]
mov edi, dword [esp + 0x7c]
lea edx, [ecx + eax*8]
mov ecx, dword [esp + 0x84]
lea eax, [eax + eax*4]
mov dword [esp + 0x14], edx
shl eax, 2
lea edx, [ecx + eax]
mov dword [esp + 0xb8], edx
lea edx, [edi + eax + 4]
mov dword [esp + 0xf8], edx
mov edx, dword [esp + 0x90]
lea ebx, [edx + eax + 8]
mov eax, ecx
sub eax, edx
sub ecx, edi
mov dword [esp + 0x148], eax
mov dword [esp + 0x94], ecx
push 0
lea eax, [esp + 0x84]
push 0
push eax
call fcn.00436a50
add esp, 0xc
test al, al
je 0x511a1b
lea ecx, [esp + 0x18]
lea edx, [esp + 0x30]
push ecx
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x15c]
push edx
push eax
mov eax, dword [esp + 0x6c]
lea edx, [esp + 0xdc]
push ecx
mov ecx, dword [esp + 0x6c]
push edx
push esi
push eax
push ecx
call fcn.00510710
mov edi, eax
add esp, 0x20
cmp edi, 0xfffffffe
mov dword [esp + 0xa8], edi
je 0x511a02
cmp edi, 0xffffffff
je 0x511a1b
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x60]
mov dword [esp + 0xbc], edx
mov edx, dword [ecx + edi*4]
mov dword [esp + 0xc0], eax
mov esi, dword [edx + 0x10]
dec esi
js 0x51196e
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + edi*4]
mov edx, dword [ecx + 0xc]
mov ecx, dword [edx + esi*4]
call fcn.0050b020
fld qword [eax + 0x10]
fcomp qword [esp + 0xbc]
fnstsw ax
test ah, 1
jne 0x5116cb
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax + edi*4]
mov edx, dword [ecx + 0xc]
mov ecx, dword [edx + esi*4]
call fcn.0050b020
fld qword [eax + 0x10]
fstp qword [esp + 0xbc]
dec esi
jns 0x51168c
fld qword [esp + 0xbc]
fcomp qword [esp + 0x5c]
fnstsw ax
test ah, 0x41
jne 0x511961
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x38]
mov eax, dword [eax + ebx]
cmp ecx, eax
jle 0x511965
fld qword [esp + 0xac]
fmul qword [0x5e2790]
fcomp qword [esp + 0x5c]
fnstsw ax
test ah, 1
je 0x51174c
lea ecx, [esp + 0x30]
push ecx
call fcn.0050b8d0
fcomp qword [0x5e7ed8]
add esp, 4
fnstsw ax
test ah, 0x41
jne 0x511748
push 0
lea edx, [esp + 0x84]
push 1
push edx
call fcn.00436a50
add esp, 0xc
test al, al
je 0x511a10
mov ecx, dword [esp + 0x38]
xor edi, edi
mov esi, ecx
cmp ecx, edi
mov dword [esp + 0x144], esi
jne 0x511781
mov eax, dword [ebx - 4]
cmp eax, edi
je 0x511777
mov ecx, dword [ebx]
push eax
mov dword [esp + 0xa0], ecx
call sub.mfc42u.dll_operatordelete
add esp, 4
mov dword [ebx - 4], edi
mov dword [ebx + 4], edi
mov dword [ebx], edi
jmp 0x51189a
mov edx, dword [ebx - 4]
cmp edx, edi
jne 0x5117bb
lea edi, [ecx*4]
push edi
call sub.mfc42u.dll_operatornew
mov edx, eax
mov ecx, edi
mov dword [ebx - 4], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov dword [ebx + 4], esi
mov dword [ebx], esi
jmp 0x51189a
mov edi, dword [ebx + 4]
cmp ecx, edi
jg 0x5117ed
mov eax, dword [ebx]
cmp eax, ecx
jge 0x5117db
sub ecx, eax
lea eax, [edx + eax*4]
push ecx
push eax
call fcn.005463a0
mov dword [ebx], esi
jmp 0x51189a
jle 0x5117e6
sub eax, ecx
mov dword [esp + 0x9c], eax
mov dword [ebx], esi
jmp 0x51189a
mov eax, dword [ebx + 8]
test eax, eax
jne 0x511817
mov eax, dword [ebx]
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x51180b
mov eax, 4
jmp 0x511817
cmp eax, 0x400
jle 0x511817
mov eax, 0x400
add eax, edi
cmp ecx, eax
mov dword [esp + 0xb4], eax
jl 0x51182b
mov dword [esp + 0xb4], ecx
mov ecx, dword [esp + 0xb4]
lea edx, [ecx*4]
push edx
call sub.mfc42u.dll_operatornew
mov ecx, dword [ebx]
mov esi, dword [ebx - 4]
shl ecx, 2
mov edx, ecx
mov edi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x9c], eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x144]
mov ecx, dword [ebx]
mov edx, esi
sub edx, ecx
lea eax, [eax + ecx*4]
push edx
push eax
call fcn.005463a0
mov eax, dword [ebx - 4]
push eax
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0xa0]
mov edx, dword [esp + 0xb8]
add esp, 4
mov dword [ebx - 4], ecx
mov dword [ebx], esi
mov dword [ebx + 4], edx
mov ecx, dword [esp + 0x38]
xor eax, eax
test ecx, ecx
jle 0x5118bf
mov ecx, dword [esp + 0x34]
inc eax
mov edx, dword [ecx + eax*4 - 4]
mov ecx, dword [ebx - 4]
mov edx, dword [edx + 0xc]
mov dword [ecx + eax*4 - 4], edx
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jl 0x5118a4
push 0xffffffffffffffff
push ecx
mov ecx, dword [esp + 0xc0]
call fcn.0046d900
mov eax, dword [esp + 0x94]
mov esi, dword [esp + 0xf8]
mov edx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov eax, dword [eax + esi]
test edx, edx
je 0x5118f8
mov edi, dword [ecx]
add ecx, 4
mov dword [eax], edi
add eax, 4
dec edx
jne 0x5118eb
mov ecx, dword [esp + 0x20]
push 0xffffffffffffffff
push ecx
lea ecx, [esi - 4]
call fcn.0046d900
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi]
test edx, edx
je 0x511922
mov edi, dword [ecx]
add ecx, 4
mov dword [eax], edi
add eax, 4
dec edx
jne 0x511915
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x5c]
mov ecx, dword [esp + 0x60]
mov edi, dword [esp + 0xb8]
mov dword [eax], edx
mov edx, dword [esp + 0x44]
mov dword [eax + 4], ecx
inc edx
add ebx, 0x14
add edi, 0x14
add esi, 0x14
add eax, 8
mov dword [esp + 0x44], edx
mov dword [esp + 0xb8], edi
mov dword [esp + 0xf8], esi
mov dword [esp + 0x14], eax
mov ecx, dword [esp + 0x38]
mov edi, dword [esp + 0xa8]
jmp 0x511972
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0xbc]
mov eax, dword [esp + 0xc0]
mov dword [esp + 0x5c], edx
mov edx, dword [esp + 0x1c]
mov dword [esp + 0x9c], ecx
push 0xffffffffffffffff
mov esi, dword [edx + edi*4]
mov edx, dword [esi + 0x10]
add esi, 8
add ecx, edx
push ecx
lea ecx, [esp + 0x38]
mov dword [esp + 0x68], eax
call fcn.0046d900
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x9c]
mov eax, dword [esi + 8]
mov esi, dword [esi + 4]
lea ecx, [ecx + edx*4]
mov edx, eax
dec eax
test edx, edx
je 0x5119d3
inc eax
mov edx, dword [esi]
add esi, 4
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x5119c6
mov eax, dword [esp + 0x20]
sub eax, edi
dec eax
je 0x5119f6
shl eax, 2
push eax
mov eax, dword [esp + 0x20]
lea ecx, [eax + edi*4 + 4]
lea edx, [eax + edi*4]
push ecx
push edx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
mov eax, dword [esp + 0x20]
mov esi, dword [ebp + 0x1c]
dec eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x20]
test eax, eax
jne 0x5115fd
jmp 0x511a1b
mov eax, dword [ebp + 0x1c]
mov esi, eax
mov dword [eax], 1
mov edi, dword [ebp + 0x18]
lea ecx, [esp + 0x124]
lea edx, [esp + 0x30]
push ecx
push edx
mov byte [esp + 0x1b], 0
call fcn.0050b890
mov eax, dword [edi + 8]
add esp, 8
cmp eax, 5
mov eax, dword [esp + 0x20]
jge 0x511a98
test eax, eax
je 0x511ee4
mov eax, dword [esp + 0x2c]
push esi
push 0
push eax
call fcn.0050fc00
add esp, 0xc
test al, al
je 0x512290
fld qword [esp + 0xac]
fadd st(0), st(0)
mov eax, dword [esi + 0x280]
mov byte [esp + 0x13], 1
inc eax
fadd qword [esp + 0xe8]
mov dword [esi + 0x280], eax
fmul qword [0x5e79d8]
fstp qword [esp + 0xe8]
jmp 0x512268
test eax, eax
je 0x511ee4
fld qword [esp + 0xd8]
fsub qword [0x5e2640]
mov edx, dword [esi + 0x27c]
mov edi, dword [esp + 0x2c]
push esi
inc edx
push 0
push edi
fstp qword [esp + 0xe4]
fld qword [esp + 0xec]
fsub qword [0x5e2640]
mov dword [esi + 0x27c], edx
fstp qword [esp + 0xec]
call fcn.0050fc00
add esp, 0xc
test al, al
je 0x512284
mov eax, dword [esp + 0x8c]
cdq
idiv dword [esi + 0x10]
test edx, edx
je 0x511b19
fld qword [esp + 0xac]
fadd st(0), st(0)
fadd qword [esp + 0xe8]
fmul qword [0x5e79d8]
fstp qword [esp + 0xe8]
lea ecx, [esp + 0x68]
lea edx, [esp + 0x18]
push ecx
push edx
push esi
call fcn.0050fac0
mov ebx, eax
mov eax, dword [esp + 0x98]
cdq
idiv dword [esi + 0x14]
add esp, 0xc
test edx, edx
jne 0x511ec0
cmp ebx, dword [esp + 0x70]
je 0x511ec0
fld qword [esp + 0xe8]
fcomp qword [esp + 0xf0]
fnstsw ax
test ah, 1
jne 0x511ec0
lea eax, [esp + 0x30]
push eax
call fcn.0050b840
fld qword [esp + 0xc8]
fmul qword [0x5e7930]
add esp, 4
fcompp
fnstsw ax
test ah, 0x41
je 0x511ec0
mov ecx, dword [esp + 0x70]
mov eax, ecx
sub eax, ebx
cmp ebx, ecx
mov dword [esp + 0x94], eax
jge 0x511bb6
mov ecx, dword [esp + 0x6c]
inc ebx
mov edx, dword [ecx + ebx*4 - 4]
mov dword [edx + 0x58], 0xffffffff
mov ecx, dword [esp + 0x70]
cmp ebx, ecx
jl 0x511b9e
mov edx, dword [esp + 0x44]
lea ebx, [edx - 1]
test ebx, ebx
jl 0x511bfd
mov edx, dword [esp + 0x7c]
lea ecx, [ebx + ebx*4]
lea edx, [edx + ecx*4 + 8]
mov ecx, dword [edx]
xor esi, esi
test ecx, ecx
jle 0x511bed
mov eax, dword [edx - 4]
mov edi, dword [eax]
cmp dword [edi + 0x58], 0xffffffff
jne 0x511be0
inc esi
add eax, 4
dec ecx
jne 0x511bd7
mov eax, dword [esp + 0x94]
cmp esi, eax
je 0x511bf9
dec ebx
sub edx, 0x14
test ebx, ebx
jge 0x511bcc
mov ecx, dword [esp + 0x70]
cmp ebx, 0xffffffff
jne 0x511c22
mov eax, dword [esp + 0x6c]
push 0x50d2f0
push 4
push ecx
push eax
mov byte [esp + 0x23], 1
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
jmp 0x512268
mov edi, dword [esp + 0x7c]
lea esi, [ebx + ebx*4]
shl esi, 2
push 0x50d2f0
push 4
mov ecx, dword [esi + edi + 8]
mov edx, dword [esi + edi + 4]
push ecx
push edx
call dword [sym.imp.msvcrt.dll_qsort]
mov eax, dword [esi + edi + 8]
add esp, 0x10
lea ecx, [esp + 0x18]
push 0xffffffffffffffff
push eax
call fcn.0046d900
mov eax, dword [esi + edi + 8]
mov edi, dword [esi + edi + 4]
mov ecx, dword [esp + 0x1c]
mov edx, eax
dec eax
test edx, edx
je 0x511c77
inc eax
mov edx, dword [edi]
add edi, 4
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x511c6a
mov edi, dword [esp + 0x84]
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov eax, dword [esi + edi + 8]
push eax
call fcn.0046d900
mov eax, dword [esi + edi + 8]
mov edx, dword [esi + edi + 4]
mov ecx, dword [esp + 0x34]
mov edi, eax
dec eax
test edi, edi
je 0x511caf
inc eax
mov edi, dword [edx]
add edx, 4
mov dword [ecx], edi
add ecx, 4
dec eax
jne 0x511ca2
mov ecx, dword [esp + 0x88]
xor eax, eax
mov dword [esp + 0x44], ebx
fld qword [ecx + ebx*8]
mov ecx, dword [esp + 0x38]
fstp qword [esp + 0x5c]
test ecx, ecx
jle 0x511cee
mov edx, dword [esp + 0x90]
inc eax
mov ecx, dword [esi + edx + 4]
mov edx, dword [esp + 0x34]
mov edx, dword [edx + eax*4 - 4]
mov ecx, dword [ecx + eax*4 - 4]
mov dword [edx + 0xc], ecx
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jl 0x511ccb
mov ecx, dword [esp + 0x70]
xor eax, eax
test ecx, ecx
jle 0x511d0b
mov edx, dword [esp + 0x6c]
mov ecx, dword [edx + eax*4]
mov dword [ecx + 0x58], eax
mov ecx, dword [esp + 0x70]
inc eax
cmp eax, ecx
jl 0x511cf8
mov ecx, dword [esp + 0x20]
xor eax, eax
test ecx, ecx
jle 0x511d2d
mov edx, dword [esp + 0x1c]
inc eax
mov ecx, dword [edx + eax*4 - 4]
mov dword [ecx + 0x58], 0xffffffff
mov ecx, dword [esp + 0x20]
cmp eax, ecx
jl 0x511d15
mov eax, dword [esp + 0x70]
lea esi, [eax - 1]
test esi, esi
jl 0x511d72
mov edx, dword [esp + 0x6c]
mov edi, dword [sym.imp.msvcrt.dll_memmove]
mov ebx, dword [edx + esi*4]
lea ecx, [edx + esi*4]
cmp dword [ebx + 0x58], 0xffffffff
jne 0x511d6f
sub eax, esi
dec eax
je 0x511d66
shl eax, 2
lea edx, [edx + esi*4 + 4]
push eax
push edx
push ecx
call edi
mov edx, dword [esp + 0x78]
add esp, 0xc
mov eax, dword [esp + 0x70]
dec eax
mov dword [esp + 0x70], eax
dec esi
jns 0x511d42
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x30]
push eax
call fcn.0050b020
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xec]
push eax
mov eax, dword [ebp + 0x1c]
push 0x40080000
push 0
push 0x40080000
push 0
push ecx
mov ecx, dword [eax + 0x24]
push edx
mov edx, dword [eax + 0x20]
push ecx
push edx
call fcn.0050e7d0
mov eax, dword [esp + 0x48]
add esp, 0x28
lea ebx, [eax - 1]
test ebx, ebx
jl 0x511e6a
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + ebx*4]
push edx
call fcn.0050f950
add esp, 4
test al, al
je 0x511e63
mov eax, dword [esp + 0x1c]
push 0xffffffffffffffff
lea ecx, [esp + 0x6c]
mov esi, dword [eax + ebx*4]
mov eax, dword [esp + 0x74]
mov edi, eax
inc eax
push eax
call fcn.0046d900
mov ecx, dword [esp + 0x6c]
push 0xffffffffffffffff
mov dword [ecx + edi*4], esi
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x3c]
lea ecx, [esp + 0x34]
mov esi, dword [edx + ebx*4]
mov edx, dword [esi + 0x10]
add esi, 8
mov edi, eax
add eax, edx
push eax
call fcn.0046d900
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x34]
mov esi, dword [esi + 4]
mov edx, eax
dec eax
lea ecx, [ecx + edi*4]
test edx, edx
je 0x511e3c
inc eax
mov edx, dword [esi]
add esi, 4
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x511e2f
mov eax, dword [esp + 0x20]
sub eax, ebx
dec eax
je 0x511e5f
shl eax, 2
push eax
mov eax, dword [esp + 0x20]
lea ecx, [eax + ebx*4 + 4]
lea edx, [eax + ebx*4]
push ecx
push edx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
dec dword [esp + 0x20]
dec ebx
jns 0x511dc0
lea eax, [esp + 0xfc]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00510f90
mov eax, dword [esp + 0x78]
mov edx, dword [esp + 0x28]
add esp, 8
add edx, eax
lea ecx, [esp + 0x68]
mov esi, eax
push 0xffffffffffffffff
push edx
call fcn.0046d900
mov eax, dword [esp + 0x6c]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
test edx, edx
lea eax, [eax + esi*4]
je 0x512268
mov esi, dword [ecx]
add ecx, 4
mov dword [eax], esi
add eax, 4
dec edx
jne 0x511eae
jmp 0x512268
mov ecx, dword [esp + 0x70]
mov edx, dword [esp + 0x6c]
push 0x50d2f0
push 4
push ecx
push edx
mov byte [esp + 0x23], 1
call dword [sym.imp.msvcrt.dll_qsort]
add esp, 0x10
jmp 0x512268
fild dword [esp + 0xd0]
fmul qword [esi + 0x18]
call sub.msvcrt.dll__ftol
mov ecx, dword [esp + 0xd0]
mov dword [esp + 0x8c], 1
add ecx, eax
lea eax, [esp + 0x124]
mov dword [esp + 0xd0], ecx
lea ecx, [esp + 0x30]
push eax
push ecx
call fcn.0050b890
mov edx, dword [esp + 0x13c]
mov eax, dword [esp + 0x140]
mov dword [esp + 0xb4], edx
lea ecx, [esp + 0x118]
lea edx, [esp + 0x50]
push ecx
push edx
mov dword [esp + 0xc0], eax
call fcn.0050b980
mov eax, dword [edi + 8]
add esp, 0x10
xor ebx, ebx
test eax, eax
jle 0x511f6d
mov eax, dword [edi + 4]
mov ecx, dword [eax + ebx*4]
call fcn.00588980
mov eax, dword [edi + 8]
inc ebx
cmp ebx, eax
jl 0x511f5a
mov ecx, dword [esp + 0xec]
mov edx, dword [esp + 0xe8]
mov edi, dword [ebp + 8]
push 0x3fe80000
push 0
push ecx
lea eax, [esp + 0x3c]
push edx
push eax
push edi
push esi
call fcn.0050efd0
fstp qword [esp + 0xb0]
fld qword [edi + 0x78]
fld qword [esp + 0xb0]
fdiv st(1)
mov ecx, dword [esp + 0x60]
add esp, 0x1c
or ebx, 0xffffffff
cmp ecx, 3
fmul qword [esi + 0x30]
fsubr qword [esp + 0x134]
fstp qword [esp + 0xe8]
fstp st(0)
jle 0x512011
mov edx, dword [esp + 0x88]
lea ebx, [ecx - 2]
fld qword [edx + ebx*8]
fcomp qword [esp + 0xe8]
fnstsw ax
test ah, 0x41
jne 0x511fef
fld qword [edx + ebx*8]
fstp qword [esp + 0xe8]
jmp 0x512011
lea ebx, [ecx - 1]
test ebx, ebx
jl 0x512011
lea ecx, [edx + ebx*8]
fld qword [ecx]
fcomp qword [esp + 0xe8]
fnstsw ax
test ah, 1
jne 0x512011
dec ebx
sub ecx, 8
test ebx, ebx
jge 0x511ff9
inc dword [esi + 0x280]
call dword [sym.imp.kernel32.dll_GetTickCount]
fld qword [esp + 0xc4]
fmul qword [0x5e27a0]
mov edx, dword [esp + 0x2c]
lea ecx, [esp + 0x124]
sub eax, edx
mov dword [esi + 0x250], eax
fstp qword [esp + 0x9c]
call fcn.004b71f0
fdivr qword [esp + 0x9c]
mov ecx, dword [esi + 0x274]
push 1
inc ecx
mov dword [esi + 0x274], ecx
lea ecx, [esp + 0x4c]
push ecx
fstp qword [esi + 0x260]
call fcn.004f0d90
fld qword [edi + 0x78]
fld qword [esp + 0x9c]
fdiv st(1)
add esp, 8
mov edx, dword [edi + 0x78]
mov eax, dword [edi + 0x7c]
mov dword [esp + 0x14c], edx
push esi
push 0
sub esp, 8
mov dword [esp + 0x160], eax
sub esp, 8
fstp qword [esp + 8]
fstp st(0)
fld qword [esp + 0xdc]
fdiv qword [esp + 0x14c]
fdiv qword [esp + 0x164]
fstp qword [esp]
call fcn.0050fc40
add esp, 0x18
test al, al
je 0x512290
cmp ebx, 0xffffffff
jne 0x5120d8
mov byte [esp + 0x13], 1
jmp 0x512268
mov edi, dword [esp + 0x7c]
lea esi, [ebx + ebx*4]
shl esi, 2
push 0xffffffffffffffff
mov ecx, dword [esi + edi + 8]
push ecx
lea ecx, [esp + 0x20]
call fcn.0046d900
mov eax, dword [esi + edi + 8]
mov edx, dword [esi + edi + 4]
mov ecx, dword [esp + 0x1c]
mov edi, eax
dec eax
test edi, edi
je 0x512113
inc eax
mov edi, dword [edx]
add edx, 4
mov dword [ecx], edi
add ecx, 4
dec eax
jne 0x512106
mov edi, dword [esp + 0x84]
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov edx, dword [esi + edi + 8]
push edx
call fcn.0046d900
mov eax, dword [esi + edi + 8]
mov edx, dword [esi + edi + 4]
mov ecx, dword [esp + 0x34]
mov edi, eax
dec eax
test edi, edi
je 0x51214b
inc eax
mov edi, dword [edx]
add edx, 4
mov dword [ecx], edi
add ecx, 4
dec eax
jne 0x51213e
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x38]
mov dword [esp + 0x44], ebx
fld qword [eax + ebx*8]
xor eax, eax
fstp qword [esp + 0x5c]
test ecx, ecx
jle 0x51218a
mov ecx, dword [esp + 0x90]
inc eax
mov edx, dword [esi + ecx + 4]
mov ecx, dword [esp + 0x34]
mov ecx, dword [ecx + eax*4 - 4]
mov edx, dword [edx + eax*4 - 4]
mov dword [ecx + 0xc], edx
mov ecx, dword [esp + 0x38]
cmp eax, ecx
jl 0x512167
mov ecx, dword [ebp + 8]
lea eax, [esp + 0x30]
push eax
call fcn.0050b020
mov ecx, dword [esp + 0xf0]
mov edx, dword [esp + 0xec]
push eax
mov eax, dword [ebp + 0x1c]
push 0x40080000
push 0
push 0x40080000
push 0
push ecx
mov ecx, dword [eax + 0x24]
push edx
mov edx, dword [eax + 0x20]
push ecx
push edx
call fcn.0050e7d0
mov eax, dword [esp + 0x48]
add esp, 0x28
lea edi, [eax - 1]
test edi, edi
jl 0x512253
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + edi*4]
push edx
call fcn.0050f950
add esp, 4
test al, al
je 0x512250
mov eax, dword [esp + 0x1c]
push 0xffffffffffffffff
lea ecx, [esp + 0x34]
mov esi, dword [eax + edi*4]
mov eax, dword [esp + 0x3c]
add esi, 8
mov ebx, eax
add eax, dword [esi + 8]
push eax
call fcn.0046d900
mov eax, dword [esi + 8]
mov ecx, dword [esp + 0x34]
mov esi, dword [esi + 4]
mov edx, eax
dec eax
lea ecx, [ecx + ebx*4]
test edx, edx
je 0x512229
inc eax
mov edx, dword [esi]
add esi, 4
mov dword [ecx], edx
add ecx, 4
dec eax
jne 0x51221c
mov eax, dword [esp + 0x20]
sub eax, edi
dec eax
je 0x51224c
shl eax, 2
push eax
mov eax, dword [esp + 0x20]
lea ecx, [eax + edi*4 + 4]
lea edx, [eax + edi*4]
push ecx
push edx
call dword [sym.imp.msvcrt.dll_memmove]
add esp, 0xc
dec dword [esp + 0x20]
dec edi
jns 0x5121d4
lea eax, [esp + 0xfc]
lea ecx, [esp + 0x18]
push eax
push ecx
call fcn.00510f90
add esp, 8
mov eax, dword [esp + 0x8c]
mov edi, dword [ebp + 0x18]
mov esi, dword [ebp + 0x1c]
inc eax
mov dword [esp + 0x8c], eax
xor ebx, ebx
jmp 0x51149b
push esi
push 0
push edi
call fcn.0050fc00
add esp, 0xc
mov ecx, dword [esp + 0x90]
test ecx, ecx
je 0x5122a2
mov edx, dword [ecx]
push 3
call dword [edx + 4]
mov eax, dword [esp + 0x88]
push eax
call sub.mfc42u.dll_operatordelete
mov ecx, dword [esp + 0x88]
add esp, 4
test ecx, ecx
je 0x5122c4
mov edx, dword [ecx]
push 3
call dword [edx + 4]
mov ecx, dword [esp + 0x7c]
test ecx, ecx
je 0x5122d3
mov eax, dword [ecx]
push 3
call dword [eax + 4]
mov eax, dword [esi + 0x274]
test eax, eax
je 0x51252e
lea ecx, [esp + 0x80]
call sub.mfc42u.dll_CString::Empty
lea ecx, [esp + 0x48]
push 1
push ecx
call fcn.004f0d90
lea edx, [esp + 0x118]
push edx
call fcn.0050bb60
push 0
lea eax, [esp + 0x90]
push 1
push eax
call fcn.00436a50
mov edi, dword [ebp + 0x14]
mov ecx, dword [esp + 0x68]
mov ebx, ecx
add esp, 0x18
mov eax, dword [edi + 8]
mov dword [esp + 0x9c], ecx
add ebx, eax
mov eax, dword [esp + 0x4c]
jne 0x512357
xor ebx, ebx
cmp eax, ebx
je 0x51234a
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
xor eax, eax
mov dword [esp + 0x4c], eax
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], ebx
jmp 0x51244c
test eax, eax
jne 0x512387
lea ecx, [ebx*4]
push ecx
call sub.mfc42u.dll_operatornew
add esp, 4
mov dword [esp + 0x4c], eax
push ebx
push eax
call fcn.005463a0
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x54], ebx
mov dword [esp + 0x50], ebx
jmp 0x51244c
cmp ebx, dword [esp + 0x54]
jg 0x5123ac
cmp ebx, ecx
jle 0x5123a3
mov edx, ebx
lea eax, [eax + ecx*4]
sub edx, ecx
push edx
push eax
call fcn.005463a0
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x50], ebx
jmp 0x51244c
mov eax, dword [esp + 0x58]
test eax, eax
jne 0x5123d7
mov eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
cmp eax, 4
jge 0x5123cb
mov eax, 4
jmp 0x5123d7
cmp eax, 0x400
jle 0x5123d7
mov eax, 0x400
mov ecx, dword [esp + 0x54]
add eax, ecx
cmp ebx, eax
mov dword [esp + 0x2c], eax
jl 0x5123e9
mov dword [esp + 0x2c], ebx
mov edx, dword [esp + 0x2c]
lea eax, [edx*4]
push eax
call sub.mfc42u.dll_operatornew
mov ecx, dword [esp + 0x54]
mov esi, dword [esp + 0x50]
mov edi, eax
mov edx, ebx
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x54]
add esp, 4
mov dword [esp + 0x94], eax
sub edx, ecx
lea eax, [eax + ecx*4]
push edx
push eax
call fcn.005463a0
mov ecx, dword [esp + 0x4c]
push ecx
call sub.mfc42u.dll_operatordelete
mov eax, dword [esp + 0x98]
mov edx, dword [esp + 0x30]
mov esi, dword [ebp + 0x1c]
mov edi, dword [ebp + 0x14]
add esp, 4
mov dword [esp + 0x4c], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], edx
mov edx, dword [edi + 8]
mov ecx, dword [edi + 4]
mov edi, dword [esp + 0x9c]
lea eax, [eax + edi*4]
mov edi, edx
dec edx
test edi, edi
je 0x512471
inc edx
mov edi, dword [ecx]
add ecx, 4
mov dword [eax], edi
add eax, 4
dec edx
jne 0x512464
lea eax, [esp + 0x124]
lea ecx, [esp + 0x48]
push eax
push ecx
call fcn.0050b890
mov ecx, dword [ebp + 8]
add esp, 8
call fcn.0050b020
push eax
lea ecx, [esp + 0x16c]
call fcn.004b6cb0
mov edx, dword [esp + 0x134]
mov eax, dword [esp + 0x138]
mov dword [esp + 0x178], edx
lea ecx, [esp + 0x48]
mov dword [esp + 0x17c], eax
lea edx, [esp + 0x158]
push ecx
lea eax, [esp + 0x16c]
push edx
push eax
mov byte [esp + 0x19c], 0xc
call fcn.0050f6f0
lea ecx, [esp + 0x130]
lea edx, [esp + 0x54]
push ecx
push edx
call fcn.0050b890
mov eax, dword [esp + 0x148]
mov ecx, dword [esp + 0x14c]
mov dword [esp + 0xc0], eax
mov edx, eax
mov dword [esp + 0xc4], ecx
mov eax, ecx
add esp, 0x14
mov dword [esi + 0x268], edx
lea ecx, [esp + 0x168]
mov dword [esi + 0x26c], eax
mov byte [esp + 0x190], 0xb
call fcn.0042bd50
mov esi, 0x5f01d8
mov dword [esp + 0x68], esi
mov eax, dword [esp + 0x6c]
mov byte [esp + 0x190], 0xd
test eax, eax
je 0x512550
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov edi, 0x5e262c
mov dword [esp + 0x18], esi
mov dword [esp + 0x68], edi
mov eax, dword [esp + 0x1c]
mov byte [esp + 0x190], 0xe
test eax, eax
je 0x512576
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov dword [esp + 0x18], edi
mov dword [esp + 0x30], 0x5e2824
mov eax, dword [esp + 0x34]
mov byte [esp + 0x190], 0xf
test eax, eax
je 0x51259b
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov ebx, 0x5e78f8
mov dword [esp + 0x30], edi
mov dword [esp + 0xfc], ebx
mov esi, dword [esp + 0x100]
mov byte [esp + 0x190], 0x10
test esi, esi
je 0x5125f0
mov eax, dword [esp + 0x104]
test eax, eax
je 0x5125e2
add esi, 8
lea edi, [eax]
mov ecx, esi
call fcn.0042bd50
add esi, 0x58
dec edi
jne 0x5125ce
mov esi, dword [esp + 0x100]
push esi
call sub.mfc42u.dll_operatordelete
add esp, 4
mov edi, 0x5e262c
mov dword [esp + 0xfc], edi
mov dword [esp + 0x110], ebx
mov eax, dword [esp + 0x114]
mov byte [esp + 0x190], 0x11
test eax, eax
je 0x512643
mov ecx, dword [esp + 0x118]
test ecx, ecx
je 0x512635
lea esi, [eax + 8]
lea edi, [ecx]
mov ecx, esi
call fcn.0042bd50
add esi, 0x58
dec edi
jne 0x512621
mov eax, dword [esp + 0x114]
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
mov edi, 0x5e262c
lea ecx, [esp + 0x80]
mov dword [esp + 0x110], edi
mov byte [esp + 0x190], 2
call sub.mfc42u.dll_CString::CString
lea ecx, [esp + 0x124]
mov byte [esp + 0x190], 1
call fcn.0042bd50
mov dword [esp + 0x48], 0x5e2824
mov eax, dword [esp + 0x4c]
mov byte [esp + 0x190], 0x12
test eax, eax
je 0x512693
push eax
call sub.mfc42u.dll_operatordelete
add esp, 4
lea ecx, [esp + 0x158]
mov dword [esp + 0x48], edi
mov dword [esp + 0x190], 0xffffffff
call fcn.0051d670
mov ecx, dword [esp + 0x188]
pop edi
fld qword [esp + 0xa8]
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret