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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45e6f9
mov eax, dword fs:[0]
push eax
sub esp, 0x50
push ebx
push esi
push edi
mov eax, dword [0x4c003c]
xor eax, esp
push eax
lea eax, [esp + 0x60]
mov dword fs:[0], eax
mov eax, dword [ecx + 0x2c]
mov ecx, dword [ecx + 0xc]
push eax
mov dword [esp + 0x14], 0
call dword [0x46be18]
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x24]
call eax
mov dword [esp + 0x30], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x14]
push ecx
mov ecx, dword [eax + 0x10]
push edx
mov edx, dword [eax + 0xc]
push ecx
push edx
lea ecx, [esp + 0x5c]
call dword [0x46a668]
lea eax, [esp + 0x4c]
push eax
lea ecx, [esp + 0x24]
push ecx
mov ecx, dword [ebp + 0xc]
call dword [0x46b8d4]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x24]
mov dword [esp + 0x6c], 0
call dword [0x46b8d8]
push eax
lea eax, [esp + 0x40]
push eax
mov byte [esp + 0x70], 1
call fcn.004045b0
add esp, 8
mov eax, dword [esp + 0x14]
mov byte [esp + 0x68], 3
test eax, eax
je 0x40586e
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x40586e
mov edx, dword [esp + 0x14]
push 4
push edx
call dword [0x46a6f8]
add esp, 8
mov eax, dword [esp + 0x40]
mov ecx, eax
inc eax
mov dword [esp + 0x40], eax
test ecx, ecx
jne 0x40588b
mov edx, dword [esp + 0x44]
cmp edx, dword [esp + 0x48]
je 0x40588b
mov bl, 1
jmp 0x40588d
xor bl, bl
test byte [esp + 0x10], 2
je 0x4058ba
mov eax, dword [esp + 0x24]
and dword [esp + 0x10], 0xfffffffd
test eax, eax
je 0x4058ba
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4058ba
mov edx, dword [esp + 0x24]
push 4
push edx
call dword [0x46a6f8]
add esp, 8
test bl, bl
je 0x405a19
test byte [esp + 0x10], 4
mov ebx, dword [esp + 0x44]
je 0x4058f3
mov eax, dword [esp + 0x28]
and dword [esp + 0x10], 0xfffffffb
test eax, eax
je 0x4058f3
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x4058f3
mov edx, dword [esp + 0x28]
push 4
push edx
call dword [0x46a6f8]
add esp, 8
test byte [esp + 0x10], 0x10
mov esi, dword [esp + 0x40]
je 0x405924
mov eax, dword [esp + 0x2c]
and dword [esp + 0x10], 0xffffffef
test eax, eax
je 0x405924
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x405924
mov edx, dword [esp + 0x2c]
push 4
push edx
call dword [0x46a6f8]
add esp, 8
test esi, esi
je 0x4059dc
mov edi, dword [ebx]
cmp edi, dword [ebx + 8]
jg 0x4059a0
mov esi, dword [ebx + 4]
cmp esi, dword [ebx + 0xc]
jg 0x40599a
jmp 0x405940
test edi, edi
jl 0x405994
test esi, esi
jl 0x405994
mov ecx, dword [esp + 0x30]
cmp edi, dword [ecx + 0x14]
jge 0x405994
cmp esi, dword [ecx + 0x18]
jge 0x405994
push esi
push edi
call dword [0x46be64]
cmp dword [eax], 0
je 0x405994
mov ecx, dword [ebp + 8]
cmp edi, dword [ecx + 0x14]
jge 0x405994
cmp esi, dword [ecx + 0x18]
jge 0x405994
lea eax, [esp + 0x34]
push eax
push esi
push edi
mov dword [esp + 0x40], 0
mov byte [esp + 0x44], 0
mov byte [esp + 0x45], 0
mov byte [esp + 0x46], 0
call dword [0x46be68]
inc esi
cmp esi, dword [ebx + 0xc]
jle 0x405940
inc edi
cmp edi, dword [ebx + 8]
jle 0x405933
dec dword [esp + 0x40]
test byte [esp + 0x10], 8
je 0x4058f3
and dword [esp + 0x10], 0xfffffff7
cmp dword [esp + 0x18], 0
je 0x4058f3
mov ecx, dword [esp + 0x18]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x4058f3
mov eax, dword [esp + 0x18]
push 4
push eax
jmp 0x4058ea
add dword [esp + 0x44], 0x10
test byte [esp + 0x10], 1
je 0x40586e
and dword [esp + 0x10], 0xfffffffe
cmp dword [esp + 0x1c], 0
je 0x40586e
mov ecx, dword [esp + 0x1c]
or edx, 0xffffffff
lock xadd dword [ecx], edx
jne 0x40586e
mov eax, dword [esp + 0x1c]
push 4
push eax
jmp 0x405865
mov eax, dword [esp + 0x3c]
mov byte [esp + 0x68], 0
test eax, eax
je 0x405a3f
or ecx, 0xffffffff
lock xadd dword [eax], ecx
jne 0x405a3f
mov edx, dword [esp + 0x3c]
push 4
push edx
call dword [0x46a6f8]
add esp, 8
lea ecx, [esp + 0x20]
mov dword [esp + 0x68], 0xffffffff
call dword [0x46b8ec]
mov ecx, dword [esp + 0x60]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8