Function at 0x477920
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4a1fb1
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4d32ac]
xor eax, esp
push eax
lea eax, [esp + 0x24]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x38]
mov edi, dword [esp + 0x34]
xor eax, eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x14]
push eax
mov ecx, 0x4c347c
call fcn.00404920
lea ecx, [esp + 0x18]
push ecx
mov esi, 1
mov ecx, 0x4c345c
mov dword [esp + 0x30], esi
call fcn.00404920
mov ebx, 2
mov byte [esp + 0x2c], bl
mov edx, dword [0x4dbc78]
mov eax, dword [edx + 0xc]
mov ecx, 0x4dbc78
call eax
add eax, 0x10
mov dword [edi], eax
cmp ebp, 0xa
mov dword [esp + 0x1c], esi
jne 0x4779c8
lea ecx, [esp + 0x14]
push ecx
mov eax, ebx
xor ecx, ecx
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 3
call fcn.00403b10
jmp 0x477acf
cmp ebp, 0x14
jne 0x477a62
lea ecx, [esp + 0x18]
push ecx
mov eax, esi
mov ecx, esi
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 4
call fcn.00403b10
mov byte [esp + 0x2c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477a11
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
mov eax, esi
mov ecx, esi
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 5
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
push edi
call fcn.0040ddc0
mov byte [esp + 0x2c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477b96
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x477b96
cmp ebp, 0x1e
jne 0x477afc
lea ecx, [esp + 0x18]
push ecx
mov eax, esi
mov ecx, ebx
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 6
call fcn.00403b10
mov byte [esp + 0x2c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477aab
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esp + 0x14]
push ecx
mov eax, esi
mov ecx, esi
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 7
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
push edi
call fcn.0040ddc0
mov byte [esp + 0x2c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477b96
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x477b96
mov eax, 0x66666667
imul ebp
sar edx, 2
mov esi, edx
shr esi, 0x1f
add esi, edx
lea ecx, [esp + 0x14]
push ecx
mov eax, 1
mov ecx, esi
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 8
call fcn.00403b10
mov byte [esp + 0x2c], bl
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x477b50
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [esi + esi*4]
add ecx, ecx
mov edx, ebp
sub edx, ecx
test edx, edx
jle 0x477b96
lea eax, [ebp - 1]
cdq
mov ecx, 0xa
idiv ecx
lea eax, [esp + 0x18]
push eax
lea eax, [ecx - 9]
mov ecx, edx
lea edx, [esp + 0x24]
call fcn.00404be0
mov byte [esp + 0x2c], 9
mov eax, dword [eax]
mov ecx, dword [eax - 0xc]
push ecx
push eax
push edi
call fcn.0040ddc0
lea ecx, [esp + 0x20]
call fcn.00404eb0
mov byte [esp + 0x2c], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477bbb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x2c], 0
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x477be0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x24]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1c
ret