Function at 0x40ca60
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x54d4b8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
mov eax, dword [esp + 0x64]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push eax
lea ecx, [esp + 0x34]
push ecx
call fcn.0041e730
add esp, 8
mov ecx, dword [esp + 0x78]
xor ebp, ebp
mov dword [esp + 0x6c], ebp
call fcn.00401400
mov eax, dword [esi + 0x20]
mov edx, dword [esi]
push ebp
push ebp
push eax
mov ecx, esi
call dword [edx + 0x28]
mov edx, dword [esi]
mov ecx, esi
mov dword [esp + 0x2c], ebp
call dword [edx + 0xc]
mov edi, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
cmp edi, eax
jae 0x40ce80
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
push 2
lea ecx, [esp + 0x40]
mov ebx, eax
mov eax, dword [esi]
push ecx
mov ecx, esi
mov dword [esp + 0x54], ebx
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov eax, dword [esp + 0x3c]
mov di, ax
and eax, 0x3f
shr di, 6
cmp eax, 0x3f
mov dword [esp + 0x28], eax
jne 0x40cb20
mov edx, dword [esi]
push 4
lea eax, [esp + 0x44]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
mov ecx, dword [esp + 0x40]
mov dword [esp + 0x28], ecx
cmp di, 0x27
jne 0x40cb36
mov dword [esp + 0x2c], 1
mov dword [esp + 0x28], 4
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov ecx, dword [esp + 0x28]
sub ecx, ebx
add eax, ecx
cmp di, bp
mov dword [esp + 0x48], eax
jne 0x40cb5c
cmp dword [esp + 0x2c], ebp
je 0x40ce80
mov dword [esp + 0x2c], ebp
cmp di, 0xc
jne 0x40ce59
lea ecx, [esp + 0x50]
call fcn.0051e4d0
mov edx, dword [esi]
push 1
lea eax, [esp + 0x17]
push eax
mov ecx, esi
mov byte [esp + 0x74], 1
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
mov bl, byte [esp + 0x13]
test bl, bl
je 0x40ce31
cmp bl, 0x80
mov dword [esp + 0x38], ebp
jb 0x40cbbe
mov edx, dword [esi]
push 2
lea eax, [esp + 0x20]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
movzx ecx, word [esp + 0x1c]
mov dword [esp + 0x38], ecx
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
cmp bl, 0x88
mov dword [esp + 0x44], eax
jne 0x40cd01
push 0xffffffffffffffff
push ebp
lea ecx, [esp + 0x58]
call fcn.0051e542
mov eax, dword [esi]
push 2
lea ecx, [esp + 0x1c]
push ecx
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
movzx eax, word [esp + 0x18]
cmp eax, ebp
mov dword [esp + 0x24], ebp
jbe 0x40cdfb
call fcn.0051fbb3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x78]
push ecx
mov ecx, esi
mov byte [esp + 0x74], 2
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov bl, byte [esp + 0x74]
test bl, bl
je 0x40ccb0
jmp 0x40cc40
mov edx, dword [esp + 0x20]
mov eax, dword [edx - 4]
mov ebp, dword [edx - 0xc]
mov ecx, 1
sub ecx, eax
mov eax, dword [edx - 8]
lea edi, [ebp + 1]
sub eax, edi
or eax, ecx
jge 0x40cc6b
push edi
lea ecx, [esp + 0x24]
call fcn.00401470
mov edx, dword [esp + 0x20]
test edi, edi
mov byte [edx + ebp], bl
jl 0x40cebd
mov eax, dword [esp + 0x20]
cmp edi, dword [eax - 8]
jg 0x40cebd
mov dword [eax - 0xc], edi
mov edx, dword [esp + 0x20]
mov byte [edi + edx], 0
mov word [esi + 0x10], 0
push 1
lea ecx, [esp + 0x78]
mov byte [esi + 0x12], 0
mov eax, dword [esi]
push ecx
mov ecx, esi
call dword [eax + 0x34]
mov bl, byte [esp + 0x74]
test bl, bl
jne 0x40cc40
xor ebp, ebp
mov eax, dword [esp + 0x58]
lea edx, [esp + 0x20]
push edx
push eax
lea ecx, [esp + 0x58]
call fcn.0051e684
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov byte [esp + 0x6c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cce6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x24]
movzx eax, word [esp + 0x18]
inc ecx
cmp ecx, eax
mov dword [esp + 0x24], ecx
jb 0x40cc05
jmp 0x40cdfb
cmp bl, 0x96
jne 0x40cdfb
call fcn.0051fbb3
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x18]
push ecx
mov ecx, esi
mov byte [esp + 0x74], 3
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov al, byte [esp + 0x14]
test al, al
jne 0x40cd80
mov edx, dword [esi]
mov byte [esi + 0x12], al
push 1
lea eax, [esp + 0x19]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
call dword [edx + 0x34]
mov al, byte [esp + 0x15]
test al, al
mov byte [esp + 0x34], al
je 0x40cdc2
mov ecx, dword [esp + 0x34]
push ecx
lea ecx, [esp + 0x28]
call fcn.0040ad70
mov ecx, esi
call fcn.00408a30
test al, al
mov byte [esp + 0x34], al
jne 0x40cd61
jmp 0x40cdc2
cmp al, 8
jne 0x40cdc2
mov edx, dword [esi]
push 1
lea eax, [esp + 0x1a]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
movzx eax, byte [esp + 0x16]
cmp eax, ebp
jl 0x40d024
cmp eax, dword [esp + 0x58]
jge 0x40d024
mov ecx, dword [esp + 0x54]
lea eax, [ecx + eax*4]
push eax
lea ecx, [esp + 0x28]
call fcn.00401a70
mov edx, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
push edx
push edi
call fcn.004656e2
add esp, 8
test eax, eax
je 0x40cec7
lea eax, [edi - 0x10]
mov byte [esp + 0x6c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cdfb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x44]
mov eax, dword [esi]
push ebp
add edx, ecx
push ebp
push edx
mov ecx, esi
call dword [eax + 0x28]
mov eax, dword [esi]
push 1
lea ecx, [esp + 0x1b]
push ecx
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [eax + 0x34]
mov bl, byte [esp + 0x17]
test bl, bl
jne 0x40cb96
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x48]
mov ebx, dword [esp + 0x4c]
mov edx, dword [esi]
push ebp
sub eax, ecx
add eax, ebx
push ebp
push eax
mov ecx, esi
call dword [edx + 0x28]
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.0051e522
mov ecx, dword [esp + 0x28]
mov eax, dword [esi]
push 1
push ebp
push ecx
mov ecx, esi
call dword [eax + 0x28]
mov edx, dword [esi]
mov ecx, esi
call dword [edx + 0xc]
mov edi, eax
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 0x30]
cmp edi, eax
jb 0x40cac8
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x6c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cea6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x54]
mov dword fs:[0], ecx
add esp, 0x60
ret 8
push 0x80070057
call fcn.00401120
lea ecx, [esp + 0x24]
call fcn.00401400
mov edx, dword [esi]
push 1
lea eax, [esp + 0x78]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
mov al, byte [esp + 0x74]
test al, al
jne 0x40cfe1
mov edx, dword [esi]
mov byte [esi + 0x12], al
push 1
lea eax, [esp + 0x78]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
call dword [edx + 0x34]
mov al, byte [esp + 0x74]
test al, al
mov byte [esp + 0x74], al
je 0x40cf30
mov ecx, dword [esp + 0x74]
push ecx
lea ecx, [esp + 0x28]
call fcn.0040ad70
mov ecx, esi
call fcn.00408a30
test al, al
mov byte [esp + 0x74], al
jne 0x40cf13
mov esi, dword [esp + 0x24]
lea edx, [esp + 0x74]
push esi
push edx
call fcn.0041e870
add esp, 8
mov ecx, dword [esp + 0x78]
push eax
mov byte [esp + 0x70], 4
call fcn.00401a70
mov eax, dword [esp + 0x74]
add eax, 0xfffffff0
mov byte [esp + 0x6c], 3
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf74
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea eax, [esi - 0x10]
mov byte [esp + 0x6c], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cf93
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
lea ecx, [esp + 0x50]
mov byte [esp + 0x6c], 0
call fcn.0051e522
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
mov dword [esp + 0x6c], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40cfc7
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x64]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
mov dword fs:[0], ecx
add esp, 0x60
ret 8
cmp al, 8
jne 0x40cf30
mov edx, dword [esi]
push 1
lea eax, [esp + 0x78]
push eax
mov ecx, esi
mov word [esi + 0x10], bp
mov byte [esi + 0x12], 0
call dword [edx + 0x34]
movzx eax, byte [esp + 0x74]
cmp eax, ebp
jl 0x40d024
cmp eax, dword [esp + 0x58]
jge 0x40d024
mov ecx, dword [esp + 0x54]
lea eax, [ecx + eax*4]
push eax
lea ecx, [esp + 0x28]
call fcn.00401a70
jmp 0x40cf30
call fcn.0051c508
int3