Function at 0x408060
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a5381
mov eax, dword fs:[0]
push eax
sub esp, 0x1f0
mov eax, dword [0x4d32ac]
xor eax, esp
mov dword [esp + 0x1e8], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d32ac]
xor eax, esp
push eax
lea eax, [esp + 0x204]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x214]
mov eax, dword [ebp + 4]
push eax
call dword [0x4a745c]
mov edx, dword [0x4dbc78]
mov dword [esp + 0x30], eax
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
xor esi, esi
mov dword [esp + 0x20c], esi
mov ecx, dword [ebp + 0x38]
test ecx, ecx
mov dword [esp + 0x28], esi
je 0x40850b
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jae 0x40850b
test ecx, ecx
je 0x4080ff
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x408104
call fcn.0047ebfb
mov ecx, dword [ebp + 0x38]
lea edi, [esi*4]
mov edx, dword [edi + ecx]
cmp word [edx], 0
je 0x4083c2
test ecx, ecx
je 0x40812b
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x408130
call fcn.0047ebfb
mov eax, dword [ebp + 0x38]
add eax, edi
mov eax, dword [eax]
add eax, 8
push eax
lea ecx, [esp + 0x24]
push ecx
mov ebx, str._quickview.png
call fcn.004038a0
add esp, 8
mov byte [esp + 0x20c], 1
mov ecx, dword [eax]
mov edi, dword [esp + 0x1c]
lea eax, [ecx - 0x10]
add edi, 0xfffffff0
cmp eax, edi
je 0x4081ad
cmp dword [edi + 0xc], 0
lea ebx, [edi + 0xc]
jl 0x4081a0
mov edx, dword [eax]
cmp edx, dword [edi]
jne 0x4081a0
call fcn.004046b0
mov dword [esp + 0x18], eax
or eax, 0xffffffff
lock xadd dword [ebx], eax
dec eax
test eax, eax
jg 0x408193
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
mov ecx, dword [esp + 0x18]
add ecx, 0x10
mov dword [esp + 0x1c], ecx
jmp 0x4081ad
mov ebx, dword [ecx - 0xc]
push ecx
lea eax, [esp + 0x20]
call fcn.00404880
mov byte [esp + 0x20c], 0
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4081d5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x1c]
xor eax, eax
push ecx
mov ecx, dword [ebp + 0xac]
lea ebx, [esp + 0x30]
lea edi, [esp + 0x1c]
mov dword [esp + 0x1c], eax
mov dword [esp + 0x30], eax
call fcn.0042ddd0
mov ebx, dword [esp + 0x18]
test ebx, ebx
je 0x4083c2
cmp dword [esp + 0x2c], 0
jbe 0x4083c2
push 0x38
call fcn.0047f14d
xor ecx, ecx
add esp, 4
cmp eax, ecx
je 0x408242
fldz
mov dword [eax], vtable.CxImageSprite.0
fst qword [eax + 0x18]
mov edi, eax
fst qword [eax + 0x20]
fstp qword [eax + 0x28]
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
mov dword [eax + 0x10], ecx
mov dword [eax + 0x30], ecx
jmp 0x408244
xor edi, edi
cmp edi, ecx
mov dword [esp + 0x18], edi
je 0x4083c2
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
push edx
mov edx, ebx
call fcn.00436100
mov eax, dword [edi]
mov edx, dword [eax + 0xc]
mov ecx, edi
call edx
test eax, eax
jne 0x40827e
lea esi, [ebp + 0x24]
lea ebx, [esp + 0x18]
call fcn.00403a50
jmp 0x4083be
push 0
lea esi, [esp + 0x38]
mov dword [esp + 0x38], vtable.CxImage.0
call fcn.004393a0
push 1
push 0x18
push 0x18
mov eax, 0x18
mov ebx, esi
mov byte [esp + 0x218], 2
call fcn.00439720
xor esi, esi
cmp dword [esp + 0x44], esi
jbe 0x408352
mov eax, dword [esp + 0x40]
jmp 0x4082c0
xor edi, edi
test eax, eax
jbe 0x408343
mov byte [esp + 0x26], 0xff
mov byte [esp + 0x25], 0xff
mov byte [esp + 0x24], 0xff
mov byte [esp + 0x27], 0
xor ebx, ebx
cmp dword [esp + 0x38], 0
je 0x408339
test edi, edi
jl 0x408339
test esi, esi
jl 0x408339
cmp edi, eax
jge 0x408339
cmp esi, dword [esp + 0x44]
jge 0x408339
cmp dword [esp + 0x5c], 0
je 0x408319
mov eax, dword [esp + 0x24]
push eax
lea ecx, [esp + 0x38]
push ecx
call fcn.004382e0
push esi
mov edx, edi
lea ecx, [esp + 0x38]
call fcn.00438010
jmp 0x408335
mov eax, dword [esp + 0x64]
imul eax, esi
add eax, ebx
add eax, dword [esp + 0x68]
mov byte [eax], 0xff
add eax, 1
mov byte [eax], 0xff
add eax, 1
mov byte [eax], 0xff
mov eax, dword [esp + 0x40]
add edi, 1
add ebx, 3
cmp edi, eax
jb 0x4082dc
add esi, 1
cmp esi, dword [esp + 0x44]
jb 0x4082c0
xor esi, esi
push 0x38
call fcn.0047f14d
add esp, 4
cmp eax, esi
je 0x408382
fldz
mov dword [eax], vtable.CxImageSprite.0
fst qword [eax + 0x18]
fst qword [eax + 0x20]
fstp qword [eax + 0x28]
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov dword [eax + 0xc], esi
mov dword [eax + 0x10], esi
mov dword [eax + 0x30], esi
jmp 0x408384
xor eax, eax
lea edx, [esp + 0x34]
push edx
mov edi, eax
mov dword [esp + 0x1c], eax
call fcn.00436060
lea esi, [ebp + 0x24]
lea ebx, [esp + 0x18]
call fcn.00403a50
mov byte [esp + 0x20c], 0
lea esi, [esp + 0x34]
mov dword [esp + 0x34], vtable.CxImage.0
call fcn.004394f0
call fcn.00439440
mov esi, dword [esp + 0x28]
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x4083d5
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4083da
call fcn.0047ebfb
mov ecx, dword [ebp + 0x38]
mov eax, 0x88888889
imul esi
add edx, esi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ebx, [esi*4]
mov edx, dword [ebx + ecx]
mov ecx, eax
shl ecx, 4
sub ecx, eax
mov dword [edx + 0x28], eax
mov edx, ecx
mov ecx, esi
sub ecx, edx
mov eax, 0x88888889
mul ecx
mov edi, edx
shr edi, 3
mov eax, edi
shl eax, 4
sub eax, edi
sub ecx, eax
mov eax, dword [ebp + 0x38]
test eax, eax
mov dword [esp + 0x18], ecx
je 0x408436
mov ecx, dword [ebp + 0x3c]
sub ecx, eax
sar ecx, 2
cmp esi, ecx
jb 0x40843b
call fcn.0047ebfb
mov eax, dword [esp + 0x18]
mov ecx, dword [ebp + 0x38]
imul eax, eax, 0x1d
mov edx, dword [ebx + ecx]
mov dword [edx + 0x18], eax
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x40845e
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x408463
call fcn.0047ebfb
mov ecx, dword [ebp + 0x38]
mov edx, dword [ebp + 0x38]
add ecx, ebx
test edx, edx
mov dword [esp + 0x18], ecx
je 0x40847f
mov eax, dword [ebp + 0x3c]
sub eax, edx
sar eax, 2
cmp esi, eax
jb 0x408488
call fcn.0047ebfb
mov ecx, dword [esp + 0x18]
mov eax, dword [ecx]
mov ecx, dword [eax + 0x18]
mov edx, dword [ebp + 0x38]
mov eax, dword [ebx + edx]
add ecx, 0x1d
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x4084ac
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4084b1
call fcn.0047ebfb
mov ecx, dword [ebp + 0x38]
imul edi, edi, 0x1d
mov edx, dword [ebx + ecx]
mov dword [edx + 0x1c], edi
mov ecx, dword [ebp + 0x38]
test ecx, ecx
je 0x4084d0
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4084d5
call fcn.0047ebfb
mov edi, dword [ebp + 0x38]
mov ecx, dword [ebp + 0x38]
add edi, ebx
test ecx, ecx
je 0x4084ed
mov eax, dword [ebp + 0x3c]
sub eax, ecx
sar eax, 2
cmp esi, eax
jb 0x4084f2
call fcn.0047ebfb
mov eax, dword [edi]
mov ecx, dword [eax + 0x1c]
mov edx, dword [ebp + 0x38]
mov eax, dword [ebx + edx]
add ecx, 0x1d
mov dword [eax + 0x24], ecx
add esi, 1
jmp 0x4080d0
xor edi, edi
lea ecx, [ecx]
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x408670
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jae 0x408670
test ecx, ecx
je 0x40853b
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x408540
call fcn.0047ebfb
mov ecx, dword [ebp + 0x48]
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 3
mov eax, edx
shr eax, 0x1f
add eax, edx
mov edx, dword [ecx + edi*4]
mov ecx, eax
lea ebx, [edi*4]
shl ecx, 4
sub ecx, eax
mov dword [edx + 0x38], eax
mov edx, ecx
mov ecx, edi
sub ecx, edx
mov eax, 0xcccccccd
mul ecx
mov esi, edx
shr esi, 2
lea eax, [esi + esi*4]
sub ecx, eax
mov eax, dword [ebp + 0x48]
test eax, eax
mov dword [esp + 0x20], ecx
je 0x408598
mov ecx, dword [ebp + 0x4c]
sub ecx, eax
sar ecx, 2
cmp edi, ecx
jb 0x40859d
call fcn.0047ebfb
mov eax, dword [esp + 0x20]
mov ecx, dword [ebp + 0x48]
imul eax, eax, 0x57
mov edx, dword [ecx + ebx]
mov dword [edx + 0x28], eax
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x4085c0
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x4085c5
call fcn.0047ebfb
mov ecx, dword [ebp + 0x48]
mov edx, dword [ebp + 0x48]
add ecx, ebx
test edx, edx
mov dword [esp + 0x20], ecx
je 0x4085e1
mov eax, dword [ebp + 0x4c]
sub eax, edx
sar eax, 2
cmp edi, eax
jb 0x4085ea
call fcn.0047ebfb
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx]
mov ecx, dword [eax + 0x28]
mov edx, dword [ebp + 0x48]
mov eax, dword [ebx + edx]
add ecx, 0x57
mov dword [eax + 0x30], ecx
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x40860e
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x408613
call fcn.0047ebfb
mov ecx, dword [ebp + 0x48]
mov edx, dword [ecx + ebx]
add esi, 4
imul esi, esi, 0x1d
mov dword [edx + 0x2c], esi
mov ecx, dword [ebp + 0x48]
test ecx, ecx
je 0x408635
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x40863a
call fcn.0047ebfb
mov esi, dword [ebp + 0x48]
mov ecx, dword [ebp + 0x48]
add esi, ebx
test ecx, ecx
je 0x408652
mov eax, dword [ebp + 0x4c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x408657
call fcn.0047ebfb
mov eax, dword [esi]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ebp + 0x48]
mov eax, dword [edx + ebx]
add ecx, 0x1d
mov dword [eax + 0x34], ecx
add edi, 1
jmp 0x408510
xor edi, edi
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x408798
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jae 0x408798
mov eax, 0x88888889
imul edi
add edx, edi
sar edx, 3
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
mov ecx, ebx
shl ecx, 4
sub ecx, ebx
mov esi, edi
sub esi, ecx
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x4086be
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x4086c3
call fcn.0047ebfb
mov edx, dword [ebp + 0x58]
imul esi, esi, 0x1d
mov eax, dword [edx + edi*4]
mov dword [eax + 0x1c], esi
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x4086e2
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x4086e7
call fcn.0047ebfb
mov esi, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x58]
lea eax, [edi*4]
add esi, eax
test ecx, ecx
je 0x408706
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x40870b
call fcn.0047ebfb
mov ecx, dword [esi]
mov edx, dword [ecx + 0x1c]
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + edi*4]
add edx, 0x1d
mov dword [ecx + 0x24], edx
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x40872f
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x408734
call fcn.0047ebfb
mov edx, dword [ebp + 0x58]
mov eax, dword [edx + edi*4]
add ebx, 1
imul ebx, ebx, 0x1d
mov dword [eax + 0x20], ebx
mov ecx, dword [ebp + 0x58]
test ecx, ecx
je 0x408756
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x40875b
call fcn.0047ebfb
mov esi, dword [ebp + 0x58]
mov ecx, dword [ebp + 0x58]
lea eax, [edi*4]
add esi, eax
test ecx, ecx
je 0x40877a
mov eax, dword [ebp + 0x5c]
sub eax, ecx
sar eax, 2
cmp edi, eax
jb 0x40877f
call fcn.0047ebfb
mov ecx, dword [esi]
mov edx, dword [ecx + 0x20]
mov eax, dword [ebp + 0x58]
mov ecx, dword [eax + edi*4]
add edx, 0x1d
mov dword [ecx + 0x28], edx
add edi, 1
jmp 0x408672
mov edx, dword [esp + 0x30]
mov eax, dword [ebp + 4]
push edx
push eax
call dword [0x4a742c]
mov dword [esp + 0x20c], 0xffffffff
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4087d2
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x204]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x1e8]
xor ecx, esp
call fcn.0047f0e0
add esp, 0x1fc
ret 4