Function at 0x40cca0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4208b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
mov edx, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [esp + 0x2c]
xor eax, eax
mov ecx, esi
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
push edi
mov dword [ecx + 0xc], eax
push edx
lea ecx, [esp + 0x34]
call fcn.00409cf0
mov edx, dword [esp + 0x30]
mov eax, dword [edx - 0xc]
cmp eax, 3
mov dword [esp + 0x24], 0
jge 0x40ccfb
push 0x80070057
call fcn.00405860
mov cl, byte [edx + 3]
or ebp, 0xffffffff
cmp cl, 0x20
je 0x40ceff
cmp cl, 0x2c
je 0x40ce3e
test eax, eax
jl 0x40cfd1
push 0x421e04
push edx
call fcn.00413787
add esp, 8
test eax, eax
je 0x40cfd1
sub eax, dword [esp + 0x30]
mov ebx, eax
cmp ebx, ebp
je 0x40cfd1
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 2
lea ecx, [ebx + 2]
push ecx
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
add esp, 4
push 3
lea edx, [ebx + 5]
mov word [esi + 6], ax
push edx
lea eax, [esp + 0x34]
push eax
lea ecx, [esp + 0x3c]
call fcn.004067a0
mov edi, eax
call fcn.0040b8e0
mov word [esi + 2], ax
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cd9e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 2
lea ecx, [ebx + 9]
push ecx
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
mov edx, esp
mov dword [esp + 0x1c], esp
mov word [esi], ax
push 2
lea eax, [ebx + 0xc]
push eax
push edx
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
lea edx, [ebx + 0xf]
push edx
push ecx
lea ecx, [esp + 0x40]
mov word [esi + 8], ax
call fcn.004067a0
call fcn.0040c050
mov dword [esp + 0x1c], esp
mov word [esi + 0xa], ax
mov eax, esp
push 2
add ebx, 0x12
push ebx
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
mov word [esi + 0xc], ax
xor eax, eax
mov ax, word [esi]
add esp, 4
mov cx, 0x32
cmp cx, ax
sbb edx, edx
and edx, 0xffffff9c
add edx, 0x7d0
add edx, eax
mov word [esi], dx
jmp 0x40cfd1
push ecx
mov eax, esp
mov dword [esp + 0x30], esp
push 2
push 5
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
add esp, 4
push 3
push 8
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esp + 0x3c]
mov word [esi + 6], ax
call fcn.004067a0
mov edi, eax
call fcn.0040b8e0
mov word [esi + 2], ax
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, ebp
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ce99
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 4
push 0xc
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
push 0x11
push ecx
lea ecx, [esp + 0x40]
mov word [esi], ax
call fcn.004067a0
call fcn.0040c050
mov edx, esp
mov dword [esp + 0x1c], esp
push 2
push 0x14
push edx
lea ecx, [esp + 0x40]
mov word [esi + 8], ax
call fcn.004067a0
call fcn.0040c050
mov word [esi + 0xa], ax
mov eax, esp
mov dword [esp + 0x1c], esp
push 2
push 0x17
jmp 0x40cfbb
push ecx
mov ecx, esp
mov dword [esp + 0x30], esp
push 2
push 8
push ecx
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
add esp, 4
push 3
push 4
lea edx, [esp + 0x1c]
push edx
lea ecx, [esp + 0x3c]
mov word [esi + 6], ax
call fcn.004067a0
mov edi, eax
call fcn.0040b8e0
mov word [esi + 2], ax
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
mov edx, ebp
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf5a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
push ecx
mov eax, esp
mov dword [esp + 0x1c], esp
push 4
push 0x14
push eax
lea ecx, [esp + 0x40]
call fcn.004067a0
call fcn.0040c050
mov ecx, esp
mov dword [esp + 0x1c], esp
push 2
push 0xb
push ecx
lea ecx, [esp + 0x40]
mov word [esi], ax
call fcn.004067a0
call fcn.0040c050
mov edx, esp
mov dword [esp + 0x1c], esp
push 2
push 0xe
push edx
lea ecx, [esp + 0x40]
mov word [esi + 8], ax
call fcn.004067a0
call fcn.0040c050
mov word [esi + 0xa], ax
mov eax, esp
mov dword [esp + 0x1c], esp
push 2
push 0x11
lea ecx, [esp + 0x3c]
push eax
call fcn.004067a0
call fcn.0040c050
add esp, 4
mov word [esi + 0xc], ax
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
cmp word [esi], 0
mov dword [esp + 0x24], ebp
lea ecx, [eax + 0xc]
je 0x40d010
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x40cff6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, 1
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
lock xadd dword [ecx], ebp
dec ebp
test ebp, ebp
jg 0x40d021
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
xor eax, eax
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret 8