Function at 0x406150
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x6157f0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x68
push ebx
push ebp
xor ebp, ebp
push esi
push edi
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x40], ebp
mov dword [esp + 0x44], ebp
mov dword [esp + 0x80], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], ebp
mov dword [esp + 0x34], ebp
mov ecx, dword [esp + 0x8c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x1c]
lea edx, [esp + 0x28]
push edx
lea edx, [esp + 0x3c]
push edx
mov byte [esp + 0x88], 1
call eax
mov ebx, dword [esp + 0x88]
mov ecx, dword [ebx + 0x14]
mov edx, dword [ebx + 0x10]
cmp edx, ecx
lea esi, [ebx + 0xc]
mov dword [esp + 0x1c], esi
je 0x4061e7
cmp ecx, ecx
mov eax, ecx
je 0x4061e4
jmp 0x4061d0
mov edi, dword [eax]
mov dword [edx], edi
mov edi, dword [eax + 4]
mov dword [edx + 4], edi
add eax, 8
add edx, 8
cmp eax, ecx
jne 0x4061d0
mov dword [esi + 8], edx
mov ecx, ebx
call fcn.00405fb0
mov ecx, dword [esp + 0x3c]
cmp ecx, ebp
jne 0x406201
xor edi, edi
mov dword [esp + 0x88], edi
jmp 0x406213
mov eax, dword [esp + 0x40]
sub eax, ecx
sar eax, 4
mov dword [esp + 0x88], eax
mov edi, eax
lea ecx, [esp + 0x8c]
push ecx
push edi
lea ecx, [esp + 0x50]
mov dword [esp + 0x94], ebp
call fcn.00405220
cmp edi, ebp
mov byte [esp + 0x80], 2
jle 0x406364
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x10], edi
jmp 0x406250
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x8c]
mov ecx, dword [eax + edx + 0xc]
lea ebp, [eax + edx]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x58]
call fcn.00405b40
mov esi, dword [ebx + 4]
mov edx, dword [esi + 4]
push eax
push edx
push esi
mov ecx, ebx
mov byte [esp + 0x8c], 3
call fcn.00405ed0
push 1
mov ecx, ebx
mov edi, eax
call fcn.004db2c0
mov dword [esi + 4], edi
mov eax, dword [edi + 4]
lea ecx, [esp + 0x58]
mov dword [eax], edi
mov byte [esp + 0x80], 2
call fcn.00405520
mov eax, dword [ebx + 4]
mov edx, dword [ebp]
mov esi, dword [eax + 4]
mov eax, edx
add esi, 8
mov dword [esp + 0x14], edx
lea ecx, [eax + 2]
mov di, word [eax]
add eax, 2
test di, di
jne 0x4062c0
sub eax, ecx
mov ecx, dword [esi + 8]
sub ecx, dword [esi]
sar eax, 1
lea edi, [eax + eax]
sar ecx, 1
sar edi, 1
cmp ecx, edi
jae 0x4062ec
push ecx
push edi
mov ecx, esi
call fcn.00518d09
mov edx, dword [esp + 0x14]
mov eax, dword [esi]
cmp eax, 0x6575cc
je 0x40630f
add edi, edi
push edi
push edx
push eax
call fcn.005f7b00
mov ecx, dword [esi]
lea eax, [edi + ecx]
mov dword [esi + 4], eax
add esp, 0xc
mov word [eax], 0
mov edx, dword [ebp + 4]
mov edi, dword [esp + 0x18]
mov dword [esi + 0xc], edx
mov eax, dword [ebp + 8]
mov dword [esi + 0x10], eax
add edi, 0x14
add esi, 0x14
cmp esi, edi
je 0x406344
mov eax, dword [esi + 4]
mov ecx, dword [eax]
push eax
push ecx
lea ecx, [esp + 0x28]
push ecx
mov ecx, esi
call fcn.00404b40
push edi
mov ecx, esi
call fcn.00404720
add dword [esp + 0x8c], 0x10
sub dword [esp + 0x10], 1
jne 0x406250
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x88]
xor ebp, ebp
mov eax, dword [esp + 0x2c]
cmp eax, ebp
je 0x406377
mov edx, dword [esp + 0x30]
sub edx, eax
sar edx, 3
jne 0x40637b
xor ebx, ebx
jmp 0x40637d
mov ebx, eax
cmp edi, ebp
jle 0x40645a
mov dword [esp + 0x8c], ebp
mov dword [esp + 0x88], edi
jmp 0x4063a0
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x8c]
cmp dword [ecx + eax + 4], 0
lea edi, [ecx + eax + 4]
mov dword [esp + 0x18], edi
jle 0x40643e
mov edi, edi
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
mov dword [esp + 0x20], edx
mov edx, dword [esi + 4]
test edx, edx
mov dword [esp + 0x24], eax
jne 0x4063d8
xor ecx, ecx
jmp 0x4063e0
mov ecx, dword [esi + 8]
sub ecx, edx
sar ecx, 3
test edx, edx
je 0x406422
mov eax, dword [esi + 0xc]
sub eax, edx
sar eax, 3
cmp ecx, eax
jae 0x406422
mov edx, dword [esp + 0x8c]
mov edi, dword [esi + 8]
mov byte [esp + 0x1c], 0
mov ecx, dword [esp + 0x1c]
push ecx
push edx
push esi
lea eax, [esp + 0x2c]
push eax
push 1
push edi
call fcn.00403dc0
add esp, 0x18
add edi, 8
mov dword [esi + 8], edi
mov edi, dword [esp + 0x18]
jmp 0x406434
mov eax, dword [esi + 8]
lea ecx, [esp + 0x20]
push ecx
push 1
push eax
mov ecx, esi
call fcn.00404e80
add ebp, 1
add ebx, 8
cmp ebp, dword [edi]
jl 0x4063c0
add dword [esp + 0x8c], 0x10
xor ebp, ebp
sub dword [esp + 0x88], 1
jne 0x4063a0
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x4c]
cmp ecx, ebp
je 0x40646f
push ecx
call fcn.005f7e65
mov eax, dword [esp + 0x30]
add esp, 4
cmp eax, ebp
je 0x40647c
push eax
call fcn.005f7e65
add esp, 4
mov eax, dword [esp + 0x3c]
pop edi
pop esi
mov dword [esp + 0x24], ebp
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
cmp eax, ebp
pop ebp
pop ebx
je 0x40649d
push eax
call fcn.005f7e65
add esp, 4
mov ecx, dword [esp + 0x68]
mov dword fs:[0], ecx
add esp, 0x74
ret 8