Function at 0x405940
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push 0xffffffffffffffff
push 0x416b98
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push ebx
push ebp
push esi
push edi
mov eax, dword [0x41e8b8]
xor eax, esp
push eax
lea eax, [esp + 0x44]
mov dword fs:[0], eax
xor eax, eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
mov eax, dword [esp + 0x54]
mov eax, dword [eax]
xor ebp, ebp
push eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x28], ebp
mov dword [esp + 0x38], ebp
call fcn.00405170
mov ecx, dword [esp + 0x58]
mov eax, dword [ecx]
push eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x50], ebp
call fcn.00405170
mov edx, dword [0x41f8e8]
mov eax, dword [edx + 0xc]
mov ecx, 0x41f8e8
mov byte [esp + 0x4c], 1
call eax
add eax, 0x10
mov dword [esp + 0x54], eax
mov byte [esp + 0x4c], 2
mov dword [esp + 0x58], ebp
xor esi, esi
mov bl, 3
jmp 0x4059e0
lea ecx, [esp + 0x58]
push ecx
push 0x418854
lea edx, [esp + 0x24]
push edx
lea ecx, [esp + 0x24]
call fcn.00405760
push eax
lea ecx, [esp + 0x58]
mov byte [esp + 0x50], bl
call fcn.004048e0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405a2b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x58], 0xffffffff
mov edi, dword [esp + 0x54]
je 0x405a49
push edi
call fcn.0040bae0
mov dword [esp + esi*4 + 0x28], eax
inc esi
add esp, 4
cmp esi, 4
jl 0x4059e0
mov dword [esp + 0x58], ebp
mov dword [esp + 0x1c], ebp
lea ecx, [esp + 0x58]
push ecx
push 0x418854
lea edx, [esp + 0x28]
push edx
lea ecx, [esp + 0x20]
call fcn.00405760
mov eax, dword [eax]
lea esi, [eax - 0x10]
lea ebp, [edi - 0x10]
mov byte [esp + 0x4c], 4
cmp esi, ebp
je 0x405b15
cmp dword [ebp + 0xc], 0
lea ebx, [ebp + 0xc]
jl 0x405b03
mov ecx, dword [esi]
cmp ecx, dword [ebp]
jne 0x405b03
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
call edx
cmp dword [esi + 0xc], 0
lea ecx, [esi + 0xc]
jl 0x405aaf
cmp eax, dword [esi]
jne 0x405aaf
mov edi, esi
mov eax, 1
lock xadd dword [ecx], eax
jmp 0x405ae3
mov ecx, dword [esi + 4]
mov edx, dword [eax]
mov edx, dword [edx]
push 1
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
je 0x405c04
mov eax, dword [esi + 4]
mov dword [edi + 4], eax
mov eax, dword [esi + 4]
inc eax
push eax
add esi, 0x10
push esi
push eax
lea ecx, [edi + 0x10]
push ecx
call fcn.0040a52e
add esp, 0x10
or edx, 0xffffffff
lock xadd dword [ebx], edx
dec edx
test edx, edx
jg 0x405afa
mov ecx, dword [ebp]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push ebp
call edx
add edi, 0x10
mov dword [esp + 0x54], edi
jmp 0x405b15
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ecx, [esp + 0x5c]
call fcn.00404060
mov edi, dword [esp + 0x54]
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 2
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405b3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x58], 0xffffffff
je 0x405b60
push edi
call fcn.0040bae0
mov ecx, dword [esp + 0x20]
mov dword [esp + ecx*4 + 0x38], eax
inc ecx
add esp, 4
cmp ecx, 4
mov dword [esp + 0x1c], ecx
jl 0x405a51
xor eax, eax
mov ecx, dword [esp + eax + 0x24]
mov edx, dword [esp + eax + 0x34]
cmp ecx, edx
jg 0x405c09
jl 0x405c90
add eax, 4
cmp eax, 0x10
jl 0x405b62
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405ba1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405bc6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405bee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
call fcn.00401c60
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c2a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c4f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405c77
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret
lea eax, [edi - 0x10]
mov byte [esp + 0x4c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405cb1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
mov byte [esp + 0x4c], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405cd6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
mov dword [esp + 0x4c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405cfe
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
or eax, 0xffffffff
mov ecx, dword [esp + 0x44]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3c
ret