Function at 0x4877e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a6abc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x114
mov eax, 0x7fff
push ebx
mov word [esp + 0xc], ax
mov word [esp + 0xe], ax
push ebp
mov eax, 0xffff8001
push esi
push edi
mov word [esp + 0x1c], ax
mov word [esp + 0x1e], ax
mov ebp, dword [esp + 0x134]
lea ecx, [esp + 0x30]
mov dword [esp + 0x12c], 0
lea eax, [ebp + 0x70]
push eax
call fcn.0040f9a0
mov esi, dword [esp + 0x138]
lea ecx, [esp + 0x20]
push esi
push 0
call fcn.00439d40
push fcn.00439e10
push fcn.00439d80
push 0xb
lea ecx, [esp + 0x80]
push 0x10
push ecx
mov byte [esp + 0x140], 1
call fcn.004a31f0
fld dword [ebp + 0x2c]
fmul qword [0x4dd358]
mov byte [esp + 0x12c], 2
fadd qword [0x4a8270]
call sub.MSVCRT.dll__ftol
mov edx, dword [esp + 0x30]
mov ebx, eax
cmp dword [edx], 0
je 0x487907
mov eax, dword [esp + 0x38]
movsx edi, word [eax + 0xc]
lea ecx, [esp + 0x30]
call fcn.004403e0
mov ecx, dword [esp + 0x30]
mov ecx, dword [ecx]
test ecx, ecx
je 0x487907
mov eax, dword [esp + 0x38]
mov edx, dword [ecx]
cmp eax, edx
je 0x487907
test eax, eax
jne 0x4878d0
cmp dword [esp + 0x34], ecx
jne 0x4878d0
mov cl, byte [esp + 0x40]
test cl, cl
je 0x487907
mov edx, dword [eax + 4]
shr edx, 0x1e
test dl, 1
jne 0x4878a1
mov ecx, dword [eax + 8]
mov edx, dword [eax + 0xc]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
movsx eax, word [esp + 0x18]
sub eax, edi
cmp eax, esi
jge 0x487900
push 1
push eax
lea ecx, [esp + 0x28]
call fcn.00439e30
movsx edi, word [esp + 0x1c]
jmp 0x4878a1
mov eax, dword [esp + 0x28]
test eax, eax
je 0x48796b
fld dword [ebp + 0x2c]
fmul qword [0x4dd248]
push ebx
lea ecx, [esp + 0x24]
xor esi, esi
fstp dword [esp + 0x18]
fld dword [ebp + 0x2c]
fmul qword [0x4dd238]
fstp dword [esp + 0x14]
call fcn.0043a190
mov ebx, dword [esp + 0x14]
fld qword [0x4dd1d8]
mov edx, dword [esp + 0x10]
lea ecx, [esp + 0x74]
push ecx
push 0xa
push ecx
lea ecx, [esp + 0x2c]
mov edi, esi
fstp dword [esp]
push edx
push ebx
call fcn.0043a300
mov esi, eax
cmp esi, edi
jle 0x487966
cmp esi, 0xa
jl 0x487939
cmp esi, 1
jge 0x48799e
push fcn.00439e10
push 0xb
lea eax, [esp + 0x7c]
push 0x10
push eax
mov byte [esp + 0x13c], 1
call fcn.004a30f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x12c], 0
call fcn.00439e10
xor al, al
jmp 0x487bee
test esi, esi
jle 0x4879ce
lea ebp, [esp + 0x4c]
lea edi, [esp + 0x84]
mov ebx, esi
push 0x3f000000
mov ecx, edi
call fcn.00439fc0
fstp dword [ebp]
add edi, 0x10
add ebp, 4
dec ebx
jne 0x4879af
mov ebp, dword [esp + 0x134]
mov bl, byte [esp + 0x13c]
test bl, bl
je 0x487a35
push esi
push 0x4c6388
call fcn.00443600
add esp, 8
test esi, esi
jle 0x487a28
lea ebp, [esp + 0x4c]
lea edi, [esp + 0x8c]
mov ebx, esi
mov eax, dword [edi]
fld dword [ebp]
push eax
sub esp, 8
fstp qword [esp]
push 0x4c6380
call fcn.00443600
add esp, 0x10
add edi, 0x10
add ebp, 4
dec ebx
jne 0x4879f8
mov bl, byte [esp + 0x13c]
mov ebp, dword [esp + 0x134]
push 0x4b18c8
call fcn.00443600
add esp, 4
push 0x41ea70
push 4
lea ecx, [esp + 0x54]
push esi
push ecx
call dword [sym.imp.MSVCRT.dll_qsort]
fld dword [ebp + 0x2c]
fmul qword [0x4dd228]
add esp, 0x10
xor ecx, ecx
test esi, esi
fstp dword [esp + 0x14]
fld dword [ebp + 0x2c]
fmul qword [0x4dd2f8]
fstp dword [esp + 0x10]
jle 0x487a88
lea edx, [esp + 0x4c]
fld dword [edx]
fcomp dword [esp + 0x14]
fnstsw ax
test ah, 1
je 0x487a84
inc ecx
add edx, 4
cmp ecx, esi
jl 0x487a6f
test ecx, ecx
jne 0x487abe
test bl, bl
je 0x487a99
push 0x4c6358
call fcn.00443600
add esp, 4
cmp esi, 1
jle 0x487aae
mov edx, dword [esp + 0x4c]
mov eax, dword [esp + 0x50]
mov dword [ebp + 0x24], edx
mov dword [ebp + 0x20], eax
jmp 0x487b0d
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x4c]
mov dword [ebp + 0x24], ecx
mov dword [ebp + 0x20], edx
jmp 0x487b0d
mov eax, dword [esp + ecx*4 + 0x48]
lea edx, [esp + ecx*4 + 0x4c]
cmp ecx, esi
mov dword [ebp + 0x24], eax
jge 0x487ae4
fld dword [edx]
fcomp dword [esp + 0x10]
fnstsw ax
test ah, 1
je 0x487ae2
inc ecx
add edx, 4
cmp ecx, esi
jl 0x487acd
cmp ecx, esi
jne 0x487b06
test bl, bl
je 0x487af7
push 0x4c6330
call fcn.00443600
add esp, 4
fld dword [esp + 0x14]
fmul qword [0x4dd1d8]
fstp dword [ebp + 0x20]
jmp 0x487b0d
mov ecx, dword [esp + ecx*4 + 0x4c]
mov dword [ebp + 0x20], ecx
fld dword [ebp + 0x2c]
fmul qword [0x4dd218]
xor ecx, ecx
test esi, esi
fstp dword [esp + 0x10]
jle 0x487b3d
lea edx, [esp + 0x4c]
fld dword [edx]
fcomp dword [esp + 0x10]
fnstsw ax
test ah, 1
je 0x487b39
inc ecx
add edx, 4
cmp ecx, esi
jl 0x487b24
test ecx, ecx
jne 0x487b5e
test bl, bl
je 0x487b4e
push 0x4c6308
call fcn.00443600
add esp, 4
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 0x4c]
mov dword [ebp + 0x1c], edx
mov dword [ebp + 0x18], eax
jmp 0x487b8b
mov edx, dword [esp + ecx*4 + 0x48]
lea eax, [esp + ecx*4 + 0x4c]
cmp ecx, esi
mov dword [ebp + 0x1c], edx
jne 0x487b86
test bl, bl
je 0x487b7e
push 0x4c62e0
call fcn.00443600
add esp, 4
mov eax, dword [ebp + 0x2c]
mov dword [ebp + 0x18], eax
jmp 0x487b8b
mov ecx, dword [eax]
mov dword [ebp + 0x18], ecx
test bl, bl
je 0x487bc0
fld dword [ebp + 0x18]
sub esp, 8
fstp qword [esp]
fld dword [ebp + 0x1c]
sub esp, 8
fstp qword [esp]
fld dword [ebp + 0x20]
sub esp, 8
fstp qword [esp]
fld dword [ebp + 0x24]
sub esp, 8
fstp qword [esp]
push 0x4c6298
call fcn.00443600
add esp, 0x24
push fcn.00439e10
push 0xb
lea edx, [esp + 0x7c]
push 0x10
push edx
mov byte [esp + 0x13c], 1
call fcn.004a30f0
lea ecx, [esp + 0x20]
mov byte [esp + 0x12c], 0
call fcn.00439e10
mov al, 1
mov ecx, dword [esp + 0x124]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x120
ret