Function at 0x408490
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x465081
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
mov eax, dword [0x486ed0]
push ebx
mov ebx, ecx
push ebp
push esi
push edi
lea ecx, [ebx + 0xc]
mov dword [esp + 0x20], ebx
mov dword [ecx], eax
mov edx, dword [0x486ed0]
lea edi, [ebx + 0x10]
xor ebp, ebp
mov dword [esp + 0x2c], ebp
mov dword [edi], edx
mov al, byte [esp + 0x34]
lea esi, [ebx + 0x14]
mov byte [esi], al
mov dword [esi + 4], ebp
mov dword [esi + 8], ebp
mov dword [esi + 0xc], ebp
mov ebp, dword [esp + 0x34]
mov byte [esp + 0x2c], 2
mov edx, dword [ebp]
mov dword [ebx], edx
mov eax, dword [ebp + 4]
lea edx, [ebp + 0xc]
mov dword [ebx + 4], eax
push edx
call fcn.0045b362
mov eax, dword [ebp + 8]
lea ecx, [ebp + 0x10]
push ecx
mov ecx, edi
mov dword [ebx + 8], eax
call fcn.0045b362
xor eax, eax
mov byte [ebx + 0x24], 0
mov dword [ebx + 0x28], 0xffffffff
mov dword [ebx + 0x2c], eax
mov dword [ebx + 0x30], eax
mov dword [esp + 0x14], eax
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x4086bd
mov edx, dword [ebp + 0x1c]
sub edx, ecx
sar edx, 2
cmp eax, edx
jae 0x4086bd
lea edx, [ecx + eax*4]
mov eax, dword [esi + 8]
mov ecx, dword [esi + 0xc]
mov dword [esp + 0x10], edx
sub ecx, eax
mov edi, eax
sar ecx, 2
cmp ecx, 1
jae 0x40862d
mov edx, dword [esi + 4]
test edx, edx
je 0x40856f
mov ecx, eax
sub ecx, edx
sar ecx, 2
cmp ecx, 1
ja 0x408574
mov ecx, 1
test edx, edx
jne 0x40857c
xor eax, eax
jmp 0x408581
sub eax, edx
sar eax, 2
add eax, ecx
test eax, eax
mov dword [esp + 0x1c], eax
jge 0x40858d
xor eax, eax
lea edx, [eax*4]
push edx
call fcn.0045af6a
mov ebx, dword [esi + 4]
add esp, 4
cmp ebx, edi
mov dword [esp + 0x18], eax
mov ebp, eax
je 0x4085be
push ebx
push ebp
call fcn.00406260
add ebx, 4
add esp, 8
add ebp, 4
cmp ebx, edi
jne 0x4085aa
mov eax, dword [esp + 0x10]
mov ecx, esi
push eax
push 1
push ebp
call fcn.00408de0
mov ecx, dword [esi + 8]
add ebp, 4
push ebp
push ecx
push edi
mov ecx, esi
call fcn.00408da0
mov edx, dword [esi + 8]
mov eax, dword [esi + 4]
push edx
push eax
mov ecx, esi
call fcn.00408d70
mov ecx, dword [esi + 4]
push ecx
call fcn.0045af93
mov edi, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
add esp, 4
mov ecx, esi
lea eax, [edi + edx*4]
mov dword [esi + 0xc], eax
call fcn.0041dc20
mov ebx, dword [esp + 0x20]
mov ebp, dword [esp + 0x34]
lea ecx, [edi + eax*4 + 4]
mov eax, dword [esp + 0x14]
inc eax
mov dword [esi + 8], ecx
mov dword [esi + 4], edi
mov dword [esp + 0x14], eax
jmp 0x408524
mov edx, eax
sub edx, edi
sar edx, 2
cmp edx, 1
jae 0x408679
lea ecx, [edi + 4]
push ecx
push eax
push edi
mov ecx, esi
call fcn.00408da0
mov eax, dword [esi + 8]
mov edx, dword [esp + 0x10]
mov ecx, eax
push edx
sub ecx, edi
mov edx, 1
sar ecx, 2
sub edx, ecx
mov ecx, esi
push edx
push eax
call fcn.00408de0
mov eax, dword [esp + 0x10]
mov ecx, dword [esi + 8]
push eax
push ecx
push edi
call fcn.00408e10
add esp, 0xc
jmp 0x4086a6
push eax
push eax
add eax, 0xfffffffc
mov ecx, esi
push eax
call fcn.00408da0
mov eax, dword [esi + 8]
push eax
add eax, 0xfffffffc
push eax
push edi
call fcn.00408e40
mov edx, dword [esp + 0x1c]
lea eax, [edi + 4]
push edx
push eax
push edi
call fcn.00408e10
add esp, 0x18
mov eax, dword [esi + 8]
add eax, 4
mov dword [esi + 8], eax
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
jmp 0x408524
mov ecx, dword [esp + 0x24]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x20
ret 4