Function at 0x406c40
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4b537b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push ebp
mov ebp, dword [esp + 0x3c]
mov dword [esp + 8], ecx
push esi
push edi
lea ecx, [esp + 0x44]
call fcn.00408a10
mov ebx, ebp
lea ecx, [esp + 0x24]
mov dword [esp + 0x14], ebx
call fcn.004a5b90
mov edi, dword [ebp]
mov eax, dword [0x4cdef4]
cmp edi, eax
mov dword [esp + 0x38], 0
jne 0x406cb1
mov edi, dword [ebp + 8]
mov edx, dword [ebx + 4]
mov ecx, dword [esp + 0x10]
mov dword [edi + 4], edx
mov eax, dword [ecx + 4]
cmp dword [eax + 4], ebp
jne 0x406d53
mov dword [eax + 4], edi
jmp 0x406d61
mov esi, dword [ebp + 8]
cmp esi, eax
je 0x406c93
lea ecx, [esp + 0x18]
call fcn.004a5b90
mov eax, dword [esi]
mov ecx, dword [0x4cdef4]
cmp eax, ecx
je 0x406cd5
mov esi, eax
mov eax, dword [esi]
cmp eax, ecx
jne 0x406ccd
lea ecx, [esp + 0x18]
call fcn.004a5c2c
mov edi, dword [esi + 8]
mov ebx, esi
cmp esi, ebp
mov dword [esp + 0x14], ebx
je 0x406c93
mov eax, dword [ebp]
mov dword [eax + 4], esi
mov ecx, dword [ebp]
mov dword [esi], ecx
mov eax, dword [ebp + 8]
cmp esi, eax
jne 0x406d02
mov dword [edi + 4], esi
jmp 0x406d19
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
mov eax, dword [esi + 4]
mov dword [eax], edi
mov eax, dword [ebp + 8]
mov dword [esi + 8], eax
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], esi
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
cmp dword [eax + 4], ebp
jne 0x406d2a
mov dword [eax + 4], esi
jmp 0x406d38
mov eax, dword [ebp + 4]
cmp dword [eax], ebp
jne 0x406d35
mov dword [eax], esi
jmp 0x406d38
mov dword [eax + 8], esi
mov eax, dword [ebp + 4]
mov dword [esp + 0x14], ebp
mov dword [esi + 4], eax
mov ecx, dword [ebp + 0x44]
mov eax, dword [esi + 0x44]
mov dword [esi + 0x44], ecx
mov dword [ebp + 0x44], eax
jmp 0x406e02
mov eax, dword [ebp + 4]
cmp dword [eax], ebp
jne 0x406d5e
mov dword [eax], edi
jmp 0x406d61
mov dword [eax + 8], edi
mov eax, dword [ecx + 4]
cmp dword [eax], ebp
jne 0x406dad
mov ecx, dword [ebp + 8]
mov edx, dword [0x4cdef4]
cmp ecx, edx
jne 0x406d7c
mov edx, dword [ebp + 4]
mov dword [eax], edx
jmp 0x406dad
lea ecx, [esp + 0x1c]
mov esi, edi
call fcn.004a5b90
mov eax, dword [edi]
mov ecx, dword [0x4cdef4]
cmp eax, ecx
je 0x406d9b
mov esi, eax
mov eax, dword [esi]
cmp eax, ecx
jne 0x406d93
lea ecx, [esp + 0x1c]
call fcn.004a5c2c
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 4]
mov dword [eax], esi
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx + 4]
cmp dword [eax + 8], ebp
jne 0x406e02
mov edx, dword [ebp]
mov ecx, dword [0x4cdef4]
cmp edx, ecx
jne 0x406dce
mov ecx, dword [ebp + 4]
mov dword [eax + 8], ecx
jmp 0x406e02
lea ecx, [esp + 0x1c]
mov esi, edi
call fcn.004a5b90
mov eax, dword [edi + 8]
mov ecx, dword [0x4cdef4]
cmp eax, ecx
je 0x406def
mov esi, eax
mov eax, dword [esi + 8]
cmp eax, ecx
jne 0x406de6
lea ecx, [esp + 0x1c]
call fcn.004a5c2c
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
mov dword [eax + 8], esi
mov ecx, dword [esp + 0x14]
mov ebx, 1
cmp dword [ecx + 0x44], ebx
jne 0x40711b
mov edx, dword [esp + 0x10]
mov eax, dword [edx + 4]
cmp edi, dword [eax + 4]
je 0x407118
xor ebp, ebp
cmp dword [edi + 0x44], ebx
jne 0x407118
mov eax, dword [edi + 4]
cmp edi, dword [eax]
jne 0x406ec1
mov esi, dword [eax + 8]
cmp dword [esi + 0x44], ebp
jne 0x406ea5
mov dword [esi + 0x44], ebx
mov ecx, dword [edi + 4]
mov dword [ecx + 0x44], ebp
mov esi, dword [edi + 4]
lea ecx, [esp + 0x1c]
call fcn.004a5b90
mov eax, dword [esi + 8]
mov edx, dword [eax]
mov dword [esi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x4cdef4]
je 0x406e6c
mov dword [ecx + 4], esi
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp esi, dword [ecx + 4]
jne 0x406e83
mov dword [ecx + 4], eax
jmp 0x406e91
mov ecx, dword [esi + 4]
cmp esi, dword [ecx]
jne 0x406e8e
mov dword [ecx], eax
jmp 0x406e91
mov dword [ecx + 8], eax
mov dword [eax], esi
lea ecx, [esp + 0x1c]
mov dword [esi + 4], eax
call fcn.004a5c2c
mov eax, dword [edi + 4]
mov esi, dword [eax + 8]
mov ecx, dword [esi]
cmp dword [ecx + 0x44], ebx
jne 0x406f5e
mov edx, dword [esi + 8]
cmp dword [edx + 0x44], ebx
jne 0x406f5e
jmp 0x406f43
mov esi, dword [eax]
cmp dword [esi + 0x44], ebp
jne 0x406f2c
mov dword [esi + 0x44], ebx
mov eax, dword [edi + 4]
lea ecx, [esp + 0x20]
mov dword [eax + 0x44], ebp
mov esi, dword [edi + 4]
call fcn.004a5b90
mov eax, dword [esi]
mov ecx, dword [eax + 8]
mov dword [esi], ecx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x4cdef4]
je 0x406ef2
mov dword [ecx + 4], esi
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], edx
mov ecx, dword [ecx + 4]
cmp esi, dword [ecx + 4]
jne 0x406f09
mov dword [ecx + 4], eax
jmp 0x406f18
mov ecx, dword [esi + 4]
cmp esi, dword [ecx + 8]
jne 0x406f16
mov dword [ecx + 8], eax
jmp 0x406f18
mov dword [ecx], eax
mov dword [eax + 8], esi
lea ecx, [esp + 0x20]
mov dword [esi + 4], eax
call fcn.004a5c2c
mov eax, dword [edi + 4]
mov esi, dword [eax]
mov edx, dword [esi + 8]
cmp dword [edx + 0x44], ebx
jne 0x407048
mov eax, dword [esi]
cmp dword [eax + 0x44], ebx
jne 0x407048
mov ecx, dword [esp + 0x10]
mov dword [esi + 0x44], ebp
mov edi, dword [edi + 4]
mov edx, dword [ecx + 4]
cmp edi, dword [edx + 4]
jne 0x406e26
jmp 0x407118
mov eax, dword [esi + 8]
cmp dword [eax + 0x44], ebx
jne 0x406fc7
mov ecx, dword [esi]
mov dword [ecx + 0x44], ebx
lea ecx, [esp + 0x20]
mov dword [esi + 0x44], ebp
call fcn.004a5b90
mov eax, dword [esi]
mov edx, dword [eax + 8]
mov dword [esi], edx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x4cdef4]
je 0x406f8c
mov dword [ecx + 4], esi
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp esi, dword [ecx + 4]
jne 0x406fa3
mov dword [ecx + 4], eax
jmp 0x406fb2
mov ecx, dword [esi + 4]
cmp esi, dword [ecx + 8]
jne 0x406fb0
mov dword [ecx + 8], eax
jmp 0x406fb2
mov dword [ecx], eax
mov dword [eax + 8], esi
lea ecx, [esp + 0x20]
mov dword [esi + 4], eax
call fcn.004a5c2c
mov eax, dword [edi + 4]
mov esi, dword [eax + 8]
mov ecx, dword [edi + 4]
mov edx, dword [ecx + 0x44]
mov dword [esi + 0x44], edx
mov eax, dword [edi + 4]
mov dword [eax + 0x44], ebx
mov ecx, dword [esi + 8]
mov dword [ecx + 0x44], ebx
mov esi, dword [edi + 4]
lea ecx, [esp + 0x20]
call fcn.004a5b90
mov eax, dword [esi + 8]
mov edx, dword [eax]
mov dword [esi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x4cdef4]
je 0x406ffd
mov dword [ecx + 4], esi
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp esi, dword [ecx + 4]
jne 0x407020
mov dword [ecx + 4], eax
mov dword [eax], esi
mov dword [esi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x407113
mov ecx, dword [esi + 4]
cmp esi, dword [ecx]
jne 0x407037
mov dword [ecx], eax
mov dword [eax], esi
mov dword [esi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x407113
mov dword [ecx + 8], eax
mov dword [eax], esi
mov dword [esi + 4], eax
lea ecx, [esp + 0x20]
jmp 0x407113
mov eax, dword [esi]
cmp dword [eax + 0x44], ebx
jne 0x4070ae
mov ecx, dword [esi + 8]
mov dword [ecx + 0x44], ebx
lea ecx, [esp + 0x20]
mov dword [esi + 0x44], ebp
call fcn.004a5b90
mov eax, dword [esi + 8]
mov edx, dword [eax]
mov dword [esi + 8], edx
mov ecx, dword [eax]
cmp ecx, dword [0x4cdef4]
je 0x407076
mov dword [ecx + 4], esi
mov ecx, dword [esi + 4]
mov edx, dword [esp + 0x10]
mov dword [eax + 4], ecx
mov ecx, dword [edx + 4]
cmp esi, dword [ecx + 4]
jne 0x40708d
mov dword [ecx + 4], eax
jmp 0x40709b
mov ecx, dword [esi + 4]
cmp esi, dword [ecx]
jne 0x407098
mov dword [ecx], eax
jmp 0x40709b
mov dword [ecx + 8], eax
mov dword [eax], esi
lea ecx, [esp + 0x20]
mov dword [esi + 4], eax
call fcn.004a5c2c
mov eax, dword [edi + 4]
mov esi, dword [eax]
mov eax, dword [edi + 4]
mov ecx, dword [eax + 0x44]
mov dword [esi + 0x44], ecx
mov edx, dword [edi + 4]
lea ecx, [esp + 0x20]
mov dword [edx + 0x44], ebx
mov eax, dword [esi]
mov dword [eax + 0x44], ebx
mov esi, dword [edi + 4]
call fcn.004a5b90
mov eax, dword [esi]
mov ecx, dword [eax + 8]
mov dword [esi], ecx
mov ecx, dword [eax + 8]
cmp ecx, dword [0x4cdef4]
je 0x4070e3
mov dword [ecx + 4], esi
mov edx, dword [esi + 4]
mov ecx, dword [esp + 0x10]
mov dword [eax + 4], edx
mov ecx, dword [ecx + 4]
cmp esi, dword [ecx + 4]
jne 0x4070fa
mov dword [ecx + 4], eax
jmp 0x407109
mov ecx, dword [esi + 4]
cmp esi, dword [ecx + 8]
jne 0x407107
mov dword [ecx + 8], eax
jmp 0x407109
mov dword [ecx], eax
mov dword [eax + 8], esi
mov dword [esi + 4], eax
lea ecx, [esp + 0x20]
call fcn.004a5c2c
mov dword [edi + 0x44], ebx
mov edx, dword [esp + 0x14]
lea edi, [edx + 0x10]
mov dword [esp + 0x1c], edi
mov eax, dword [edi + 0x1c]
lea esi, [edi + 0x18]
push eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x3c], bl
call fcn.00408740
mov ebp, dword [eax]
mov ecx, esi
call fcn.00408290
mov ecx, dword [eax]
push ecx
lea ecx, [esp + 0x2c]
call fcn.00408740
mov eax, dword [eax]
push ebp
lea edx, [esp + 0x30]
push eax
push edx
mov ecx, esi
call fcn.00408130
mov eax, dword [esi + 4]
push ebx
push eax
mov ecx, esi
call fcn.00409b50
xor eax, eax
lea ecx, [esp + 0x20]
mov dword [esi + 4], eax
mov dword [esi + 0xc], eax
call fcn.004a5b90
mov eax, dword [0x4cdf04]
mov byte [esp + 0x38], 2
dec eax
mov dword [0x4cdf04], eax
jne 0x4071a6
mov eax, dword [0x4cdf08]
push ebx
push eax
mov ecx, esi
call fcn.00409b50
xor esi, esi
mov dword [0x4cdf08], esi
jmp 0x4071a8
xor esi, esi
lea ecx, [esp + 0x20]
mov byte [esp + 0x38], bl
call fcn.004a5c2c
mov eax, dword [edi + 0xc]
cmp eax, esi
je 0x4071d9
lea ecx, [eax - 1]
mov al, byte [eax - 1]
test al, al
je 0x4071d0
cmp al, 0xff
je 0x4071d0
dec al
mov byte [ecx], al
jmp 0x4071d9
push ecx
call fcn.004a5c41
add esp, 4
mov ecx, dword [esp + 0x14]
mov dword [edi + 0xc], esi
push ecx
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], esi
call fcn.004a5c41
mov eax, dword [esp + 0x14]
mov esi, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
add esp, 4
mov ecx, dword [eax + 0xc]
mov dword [esp + 0x38], 0xffffffff
dec ecx
mov dword [eax + 0xc], ecx
lea ecx, [esp + 0x24]
mov dword [esi], edx
call fcn.004a5c2c
mov ecx, dword [esp + 0x30]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x2c
ret 8