Function at 0x406040
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
and esp, 0xffffffc0
push 0xffffffffffffffff
push 0x46d6ba
mov eax, dword fs:[0]
push eax
sub esp, 0x34
mov eax, 0xd574
call fcn.00458ea0
mov eax, dword [0x485370]
xor eax, esp
mov dword [esp + 0xd570], eax
push ebx
push esi
push edi
mov eax, dword [0x485370]
xor eax, esp
push eax
lea eax, [esp + 0xd5b8]
mov dword fs:[0], eax
mov edi, ecx
mov ecx, dword [edi + 4]
mov eax, dword [edi]
mov dword [esp + 0x48], ecx
mov ecx, dword [edi + 0x10]
mov esi, edx
mov edx, dword [edi + 8]
mov dword [esp + 0x4c], eax
mov eax, dword [edi + 0xc]
mov dword [esp + 0x40], ecx
mov ecx, dword [edi + 0x14]
mov dword [esp + 0x50], edx
mov edx, dword [ecx]
mov dword [esp + 0x30], eax
mov eax, dword [edx + 0x2c]
push str.ck_W_vN
mov dword [esp + 0x40], edi
mov dword [esp + 0x48], ecx
call eax
mov ebx, dword [edi + 0x34]
mov eax, dword [edi + 0x28]
add edi, 0x28
push ecx
sub eax, 0x10
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], esp
mov dword [esp + 0x38], esp
mov dword [esp + 0x3c], edi
call fcn.00404b40
add eax, 0x10
mov ecx, esp
mov dword [ecx], eax
mov dword [esp + 0xd5c4], 0
mov edx, dword [0x4881ac]
shl ebx, 5
mov eax, dword [ebx + edx + 0xc]
push ecx
sub eax, 0x10
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x28], esp
mov edi, esp
call fcn.00404b40
add eax, 0x10
mov dword [edi], eax
mov byte [esp + 0xd5c8], 1
mov eax, dword [0x4881ac]
mov eax, dword [ebx + eax + 8]
push ecx
sub eax, 0x10
mov dword [esp + 0x30], esp
mov edi, esp
call fcn.00404b40
add eax, 0x10
mov dword [edi], eax
lea edi, [esp + 0x6dc0]
mov dword [esp + 0xd5cc], 0xffffffff
call fcn.00405d40
mov ecx, dword [0x488130]
mov eax, dword [ecx + 0x10]
add esp, 0xc
test eax, eax
je 0x40617a
lea edx, [esp + 0x6db4]
push edx
call eax
add esp, 4
mov ecx, dword [0x488130]
mov ecx, dword [ecx + 0x18]
mov dword [esp + 0x28], eax
test ecx, ecx
je 0x406191
push eax
call ecx
add esp, 4
push 0x595
lea edx, [esp + 0x58]
push 0
push edx
call fcn.00453660
fldz
add esp, 0xc
fst dword [esp + 0x47c]
push 0xc8
fstp dword [esp + 0x4e5]
mov dword [esp + 0x58], 2
mov dword [esp + 0x5c], 0
mov byte [esp + 0x4e4], 0
mov dword [esp + 0x28], 1
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x48813c], 0
jne 0x4066de
cmp dword [0x488138], 0
je 0x406268
mov eax, dword [0x488130]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x40620c
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 0x2c]
push 0x47a214
call eax
cmp dword [0x488138], 0
je 0x406251
jmp 0x406230
cmp dword [0x48813c], 0
jne 0x40671f
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x488138], 0
jne 0x406230
mov ecx, dword [0x488130]
mov eax, dword [ecx + 0x18]
test eax, eax
je 0x406268
mov edx, dword [esp + 0x28]
push edx
call eax
add esp, 4
mov eax, dword [0x488130]
mov eax, dword [eax + 0x24]
test eax, eax
je 0x406283
mov edx, dword [esp + 0x28]
lea ecx, [esp + 0x54]
push ecx
push edx
call eax
add esp, 8
mov ecx, dword [esp + 0x24]
test ecx, ecx
jne 0x406696
fild qword [esp + 0x46c]
sub esp, 8
fmul qword [0x47bb58]
fstp qword [esp]
push 0x47a228
push 0x190
push esi
call fcn.0045150c
mov eax, dword [section..data]
mov edx, dword [eax + 0xc]
add esp, 0x14
mov ecx, section..data
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0xd5c0], 2
test esi, esi
je 0x4062fc
test esi, 0xffff0000
jne 0x406300
movzx edi, si
call fcn.00404bb0
test eax, eax
je 0x406321
push eax
mov eax, edi
lea edi, [esp + 0x24]
call fcn.00404d60
jmp 0x406321
xor eax, eax
jmp 0x406314
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406305
sub eax, edx
sar eax, 1
push esi
lea ecx, [esp + 0x24]
push ecx
mov ebx, eax
call fcn.00404f80
mov ecx, dword [esp + 0x48]
mov dword [esp + 0xd5c0], 3
mov edx, dword [ecx]
mov edi, dword [esp + 0x20]
mov eax, dword [edx + 0x2c]
push edi
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0xd5c0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406363
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x4d4]
cmp eax, 0x400
jge 0x406387
push eax
push 0x47a244
push 0x190
push esi
call fcn.0045150c
add esp, 0x10
jmp 0x4063c4
fild dword [esp + 0x4d4]
sub esp, 8
cmp eax, 0x100000
jge 0x4063a8
fmul qword [0x47bb38]
fstp qword [esp]
push 0x47a25c
jmp 0x4063b6
fmul qword [0x47bb58]
fstp qword [esp]
push 0x47a27c
push 0x190
push esi
call fcn.0045150c
add esp, 0x14
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0xd5c0], 4
test esi, esi
je 0x40640c
test esi, 0xffff0000
jne 0x406410
movzx edi, si
call fcn.00404bb0
test eax, eax
je 0x406431
push eax
mov eax, edi
lea edi, [esp + 0x24]
call fcn.00404d60
jmp 0x406431
xor eax, eax
jmp 0x406424
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x406415
sub eax, edx
sar eax, 1
push esi
lea ecx, [esp + 0x24]
push ecx
mov ebx, eax
call fcn.00404f80
mov ecx, dword [esp + 0x50]
mov dword [esp + 0xd5c0], 5
mov edx, dword [ecx]
mov edi, dword [esp + 0x20]
mov eax, dword [edx + 0x2c]
push edi
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0xd5c0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406473
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
lea ecx, [esp + 0x5c]
push ecx
push eax
push str._s_s
push 0x190
push esi
call fcn.0045150c
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
add esp, 0x14
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0xd5c0], 6
test esi, esi
je 0x4064da
test esi, 0xffff0000
jne 0x4064de
movzx edi, si
call fcn.00404bb0
test eax, eax
je 0x4064ff
push eax
mov eax, edi
lea edi, [esp + 0x24]
call fcn.00404d60
jmp 0x4064ff
xor eax, eax
jmp 0x4064f2
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4064e3
sub eax, edx
sar eax, 1
push esi
lea ecx, [esp + 0x24]
push ecx
mov ebx, eax
call fcn.00404f80
mov ebx, dword [esp + 0x40]
mov dword [esp + 0xd5c0], 7
mov edx, dword [ebx]
mov edi, dword [esp + 0x20]
mov eax, dword [edx + 0xb4]
push edi
mov ecx, ebx
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0xd5c0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406546
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edx, dword [esp + 0x38]
mov eax, dword [edx]
lea ecx, [esp + 0x5c]
push ecx
push eax
push str._f_1_
push 0x190
push esi
call fcn.0045150c
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
add esp, 0x14
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
mov dword [esp + 0xd5c0], 8
test esi, esi
je 0x4065ad
test esi, 0xffff0000
jne 0x4065b1
movzx edi, si
call fcn.00404bb0
test eax, eax
je 0x4065d6
push eax
mov eax, edi
lea edi, [esp + 0x24]
call fcn.00404d60
jmp 0x4065d6
xor eax, eax
jmp 0x4065c5
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4065b6
sub eax, edx
sar eax, 1
push esi
lea ecx, [esp + 0x24]
push ecx
mov ebx, eax
call fcn.00404f80
mov ebx, dword [esp + 0x40]
mov dword [esp + 0xd5c0], 9
mov edx, dword [ebx]
mov edi, dword [esp + 0x20]
mov eax, dword [edx + 0x2c]
push edi
mov ecx, ebx
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0xd5c0], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406616
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
fld dword [esp + 0x47c]
sub esp, 8
fmul qword [0x47bb50]
fstp qword [esp]
push str._.2lf__
push 0x190
push esi
call fcn.0045150c
mov ecx, dword [esp + 0x60]
mov edx, dword [ecx]
mov eax, dword [edx + 0x2c]
add esp, 0x14
push esi
call eax
mov ecx, dword [esp + 0x30]
mov edx, dword [ecx]
mov eax, dword [edx + 0x2c]
push 0x47a2e4
call eax
cmp dword [esp + 0x2c], 0
jne 0x406692
fld dword [0x47bb48]
fcomp dword [esp + 0x47c]
fnstsw ax
test ah, 5
jp 0x406692
mov ecx, dword [esp + 0x3c]
mov edx, dword [ecx + 0x30]
push 0
push 0
push 0x468
push edx
mov dword [esp + 0x3c], 1
call dword [sym.imp.USER32.dll_PostMessageW]
mov ecx, dword [esp + 0x24]
mov eax, dword [esp + 0x54]
cmp eax, 4
je 0x40680d
cmp eax, 1
je 0x40676b
inc ecx
mov eax, 0x99999999
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
add ecx, eax
lea edx, [ecx + eax*4]
push 0xc8
mov dword [esp + 0x28], edx
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0x48813c], 0
je 0x4061ed
mov eax, dword [0x488130]
mov eax, dword [eax + 0x1c]
test eax, eax
je 0x4066f4
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
mov edx, dword [0x488130]
mov eax, dword [edx + 0x14]
test eax, eax
je 0x40670b
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
mov dword [0x48813c], 0
mov eax, 2
jmp 0x406a7b
mov edx, dword [0x488130]
mov eax, dword [edx + 0x1c]
test eax, eax
je 0x406736
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
mov edx, dword [0x488130]
mov eax, dword [edx + 0x14]
test eax, eax
je 0x40674d
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
mov dword [0x48813c], 0
mov dword [0x488138], 0
mov eax, 2
jmp 0x406a7b
mov edx, dword [0x488130]
mov eax, dword [edx + 0x14]
xor edi, edi
cmp eax, edi
je 0x406784
mov ecx, dword [esp + 0x28]
push ecx
call eax
add esp, 4
push 0x67c4
lea edx, [esp + 0x5f0]
push edi
push edx
call fcn.00453660
mov esi, dword [sym.imp.SHLWAPI.dll_StrCpyW]
add esp, 0xc
lea eax, [esp + 0x5c]
push eax
lea ecx, [esp + 0x4684]
push ecx
mov dword [esp + 0x4dac], 5
mov dword [esp + 0x4ca4], edi
mov dword [esp + 0x4db0], edi
mov dword [esp + 0x4da8], edi
mov dword [esp + 0x4db4], 1
call esi
lea edx, [esp + 0xb258]
push edx
lea eax, [esp + 0x4a94]
push eax
call esi
mov ecx, dword [0x488130]
mov eax, dword [ecx + 0x30]
cmp eax, edi
je 0x406806
lea edx, [esp + 0x5ec]
push edx
call eax
add esp, 4
xor eax, eax
jmp 0x406a7b
mov ecx, dword [esp + 0x34]
mov eax, dword [0x4881ac]
mov eax, dword [ecx + eax + 0xc]
lea ecx, [esp + 0x5c]
mov edi, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x406846
test dx, dx
je 0x406842
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x406846
add eax, 4
add ecx, 4
test dx, dx
jne 0x406820
xor eax, eax
jmp 0x40684b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
setne al
test al, al
je 0x406935
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x2c], eax
mov ebx, 0xa
mov dword [esp + 0xd5c0], ebx
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x30], eax
mov esi, dword [esp + 0x38]
lea ecx, [esp + 0x5c]
mov byte [esp + 0xd5c0], 0xb
mov edx, dword [esi]
push ecx
push edx
push str._s_s
lea edi, [esp + 0x3c]
call fcn.00404aa0
mov eax, dword [0x4881ac]
mov ecx, dword [esp + 0x40]
mov edx, dword [ecx + eax + 0xc]
mov eax, dword [esi]
add esp, 0xc
push edx
push eax
push str._s_s
lea edi, [esp + 0x38]
call fcn.00404aa0
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
add esp, 0xc
push edi
push esi
call fcn.0045262e
lea eax, [esi - 0x10]
add esp, 8
mov byte [esp + 0xd5c0], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40690e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
add edi, 0xfffffff0
mov dword [esp + 0xd5c0], 0xffffffff
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406935
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov ecx, dword [esp + 0x44]
mov eax, dword [ecx]
mov edx, dword [eax + 0x2c]
push str.ck_W_h
call edx
mov esi, dword [esp + 0x3c]
mov eax, dword [esi + 0x2c]
cmp dword [eax - 0xc], 0
je 0x406a76
mov edx, dword [section..data]
mov eax, dword [edx + 0xc]
mov ecx, section..data
call eax
add eax, 0x10
mov dword [esp + 0x24], eax
mov edi, dword [esp + 0x38]
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0xd5c8], 0xc
call fcn.004071c0
mov edx, dword [esp + 0x3c]
mov byte [esp + 0xd5c8], 0xd
mov ecx, dword [0x4881ac]
lea ecx, [edx + ecx + 0xc]
mov edx, esp
mov dword [esp + 0x4c], esp
push ecx
push edx
mov ebx, eax
call fcn.00407110
add esp, 8
call fcn.00410d80
mov edi, eax
mov byte [esp + 0xd5c8], 0xc
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
add esp, 8
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4069e5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
test edi, edi
je 0x406a4b
lea ebx, [esp + 0x24]
call fcn.004072e0
mov ebx, eax
call fcn.00407360
mov edi, eax
call fcn.00407040
lea edi, [esi + 0x2c]
mov ebx, eax
call fcn.00407040
push eax
mov eax, ebx
call fcn.00407280
add esp, 4
test al, al
je 0x406a4b
mov dword [esp + 0xd5c0], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a44
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 3
jmp 0x406a7b
mov dword [esp + 0xd5c0], 0xffffffff
mov eax, dword [esp + 0x24]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x406a76
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0xd5b8]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xd570]
xor ecx, esp
call fcn.004501c4
mov esp, ebp
pop ebp
ret