Function at 0x40aaa0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x580540
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov eax, dword [0x5e4a44]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebp, dword [esp + 0x30]
lea ebx, [ebp + 0x58]
mov dword [esp + 0x28], 0
mov esi, dword [ebx + 0x10]
cmp dword [ebx + 0xc], esi
jbe 0x40aae3
call fcn.005519ed
mov edi, dword [ebx + 0xc]
mov eax, dword [ebx]
mov dword [esp + 0x18], eax
cmp edi, dword [ebx + 0x10]
jbe 0x40aaf6
call fcn.005519ed
mov ecx, dword [esp + 0x18]
mov eax, dword [ebx]
push esi
push ecx
push edi
push eax
lea edx, [esp + 0x28]
push edx
call fcn.0040da20
mov edi, dword [ebp + 0x38]
cmp dword [ebp + 0x34], edi
lea esi, [ebp + 0x28]
jbe 0x40ab1a
call fcn.005519ed
mov ebx, dword [esi + 0xc]
mov eax, dword [esi]
mov dword [esp + 0x18], eax
cmp ebx, dword [esi + 0x10]
jbe 0x40ab2d
call fcn.005519ed
mov ecx, dword [esp + 0x18]
mov eax, dword [esi]
push edi
push ecx
push ebx
push eax
lea ebx, [esp + 0x28]
call fcn.0040d8e0
mov edi, dword [ebp + 0x50]
cmp dword [ebp + 0x4c], edi
lea esi, [ebp + 0x40]
jbe 0x40ab50
call fcn.005519ed
mov ebx, dword [esi + 0xc]
mov ebp, dword [esi]
cmp ebx, dword [esi + 0x10]
jbe 0x40ab5f
call fcn.005519ed
mov eax, dword [esi]
push edi
push ebp
push ebx
push eax
lea ebx, [esp + 0x28]
call fcn.0040d8e0
mov ebp, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov dword [ebp + 0x70], 0
mov eax, dword [ecx - 0xc]
test eax, eax
jle 0x40ac3a
push 0x3a
push ecx
call fcn.005513b5
add esp, 8
test eax, eax
je 0x40ac3a
sub eax, dword [esp + 0x34]
mov esi, eax
test esi, esi
jle 0x40ac3a
lea edx, [esi + 1]
push edx
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x3c]
call fcn.004027c0
mov bl, 1
mov byte [esp + 0x28], bl
mov edi, dword [esp + 0x14]
cmp dword [edi - 0xc], 0
jle 0x40abd7
push edi
call fcn.005520a9
add esp, 4
mov dword [ebp + 0x70], eax
push esi
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x3c]
call fcn.004027f0
push eax
lea ecx, [esp + 0x38]
mov byte [esp + 0x2c], 2
call fcn.00402bc0
mov byte [esp + 0x28], bl
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ac19
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov byte [esp + 0x28], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ac3a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov bl, 3
mov eax, dword [esp + 0x34]
cmp dword [eax - 0xc], 0
jle 0x40ad20
push 0x7c
push eax
call fcn.005513b5
add esp, 8
test eax, eax
je 0x40ad20
sub eax, dword [esp + 0x34]
mov esi, eax
test esi, esi
jle 0x40ad20
push ecx
mov ecx, esp
mov dword [esp + 0x18], esp
push esi
push ecx
lea ecx, [esp + 0x40]
call fcn.004027f0
push ebp
call fcn.0040a880
inc esi
push esi
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x3c]
call fcn.004027c0
mov byte [esp + 0x28], bl
mov ecx, dword [eax]
mov esi, dword [esp + 0x34]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x40acf2
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x40ace4
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x40ace4
push eax
call fcn.00403050
mov ebp, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x40acd7
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebp, 0x10
mov dword [esp + 0x34], ebp
mov ebp, dword [esp + 0x30]
jmp 0x40acf2
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [esp + 0x3c]
call fcn.00402ef0
mov byte [esp + 0x28], 0
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 0x40ac3c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40ac3c
mov eax, dword [esp + 0x34]
push ecx
add eax, 0xfffffff0
mov dword [esp + 0x34], esp
mov esi, esp
push eax
call fcn.00403050
add esp, 4
add eax, 0x10
push ebp
mov dword [esi], eax
call fcn.0040a880
mov dword [esp + 0x28], 0xffffffff
mov eax, dword [esp + 0x34]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40ad6a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8