Function at 0x4045b0
Capabilities:
Check for peb ntglobalflag flag
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x426080
mov eax, dword fs:[0]
push eax
sub esp, 0x70
mov eax, dword [0x42d414]
xor eax, esp
mov dword [esp + 0x68], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x42d414]
xor eax, esp
push eax
lea eax, [esp + 0x84]
mov dword fs:[0], eax
mov ebx, ecx
mov edi, edx
mov ecx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
push ecx
push eax
mov eax, ebx
mov dword [esp + 0x20], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x34], ebx
call fcn.004039d0
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x30], ebp
je 0x40461b
lea eax, [ebp + 0xec]
push eax
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
test ebp, ebp
mov dword [esp + 0x8c], 0
je 0x404c41
mov esi, dword [esp + 0x94]
cmp dword [ebp + 8], esi
lea eax, [ebp + 8]
jne 0x404641
mov cl, 1
jmp 0x404646
xor cl, cl
lea eax, [ebp + 0x24]
mov edx, dword [esp + 0x98]
test edx, edx
mov byte [eax + 5], 0
jne 0x404716
cmp dword [esp + 0x9c], edx
je 0x404666
mov byte [eax + 8], 1
cmp dword [ebp + 0x40], 4
jne 0x4046da
cmp dword [ebx + 0x5c], 0
je 0x4046da
test byte [ebp + 0x44], 2
je 0x4046da
cmp dword [ebp + 0x24], esi
jne 0x40469c
mov byte [ebp + 0x28], 1
mov edx, dword [edi + 0x2c]
mov ecx, dword [ebx + 0x5c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x14]
push 0
push 0
push edx
mov edx, dword [edi + 0x28]
push edx
call eax
jmp 0x404c20
mov byte [ebp + 0xc], 1
cmp byte [ebp + 0xe5], 0
je 0x4046bf
mov eax, dword [edi + 0x2c]
mov ecx, dword [ebx + 0x5c]
mov edx, dword [ecx]
mov edx, dword [edx + 0x14]
push 0
push 0
push eax
mov eax, dword [edi + 0x28]
push eax
call edx
mov edx, dword [edi + 0x2c]
mov ecx, dword [ebx + 0x5c]
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
push 0
push 0
push edx
mov edx, dword [edi + 0x28]
push edx
call eax
jmp 0x404c20
mov ecx, dword [edi + 0x2c]
mov esi, dword [edi + 0x28]
mov edi, ebx
mov dword [esp + 0x20], ecx
call fcn.004038e0
mov edx, dword [esp + 0x20]
push eax
mov dword [eax + 0x30], 2
mov dword [eax + 0x28], esi
mov dword [eax + 0x2c], edx
mov eax, dword [esp + 0x98]
mov ecx, dword [ebx + 8]
push eax
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_PostQueuedCompletionStatus]
jmp 0x404c20
test cl, cl
jne 0x404b98
cmp dword [ebp + 0x40], 4
jne 0x40479c
cmp dword [ebx + 0x5c], 0
je 0x404771
test byte [ebp + 0x44], 2
je 0x404771
mov eax, dword [ebx + 0x5c]
mov ecx, dword [eax]
push edx
lea esi, [edi + 0x34]
mov dword [esp + 0x1c], ecx
call fcn.0040a750
mov edx, dword [eax + 4]
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
push edx
mov edx, dword [esp + 0x20]
push eax
mov eax, dword [edx + 0x14]
push ecx
mov ecx, dword [ebx + 0x5c]
call eax
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x28]
push ecx
push edx
push 0
push ebx
mov eax, ebp
call fcn.00404100
jmp 0x404c20
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
push eax
push ecx
lea esi, [edi + 0x34]
call fcn.0040a750
mov edx, eax
mov ecx, dword [edx + 4]
mov eax, dword [esp + 0xa0]
push 1
push ebx
mov edx, ebp
call fcn.00403f10
jmp 0x404c20
mov eax, dword [ebp + 0x40]
sub eax, 1
je 0x404959
sub eax, 1
je 0x4048b6
sub eax, 1
jne 0x404b81
cmp edx, 5
jb 0x404b81
lea esi, [edi + 0x34]
call fcn.0040a750
mov eax, dword [eax + 4]
cmp byte [eax], 5
jne 0x404b81
cmp byte [eax + 1], 0
jne 0x404b81
mov al, byte [eax + 3]
sub al, 1
neg al
mov dword [ebp + 0x40], 4
sbb eax, eax
and eax, 0xc
add eax, 0xa
cmp dword [ebx + 0x5c], 0
mov esi, eax
mov dword [esp + 0x28], esi
je 0x404819
mov ecx, dword [ebx + 0x5c]
mov edx, dword [ecx]
mov edx, dword [edx + 0xc]
lea eax, [ebp + 0x44]
push eax
mov eax, dword [edi + 0x2c]
push eax
mov eax, dword [edi + 0x28]
push eax
call edx
mov eax, dword [esp + 0x98]
cmp eax, esi
jbe 0x40488d
cmp dword [ebx + 0x5c], 0
je 0x404862
test byte [ebp + 0x44], 2
je 0x404862
mov ecx, dword [ebx + 0x5c]
mov edx, dword [ecx]
sub eax, esi
push eax
lea esi, [edi + 0x34]
mov dword [esp + 0x1c], edx
call fcn.0040a750
mov eax, dword [eax + 4]
add eax, dword [esp + 0x2c]
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x28]
push eax
mov eax, dword [esp + 0x20]
push ecx
mov ecx, dword [ebx + 0x5c]
push edx
mov edx, dword [eax + 0x14]
call edx
jmp 0x40488d
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x28]
push ecx
sub eax, esi
push edx
lea esi, [edi + 0x34]
mov dword [esp + 0x20], eax
call fcn.0040a750
mov ecx, dword [eax + 4]
add ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x20]
push 1
push ebx
mov edx, ebp
call fcn.00403f10
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
push eax
push ecx
push 1
push ebx
mov eax, ebp
call fcn.00404100
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
push edx
push eax
push 0
push ebx
mov eax, ebp
call fcn.00404100
jmp 0x404b81
cmp edx, 2
jb 0x404b81
lea esi, [edi + 0x34]
call fcn.0040a750
mov eax, dword [eax + 4]
cmp byte [eax], 1
jne 0x404b81
cmp byte [eax + 1], 0
jne 0x404b81
movzx eax, word [ebp + 0x6b]
cmp eax, 2
jne 0x404922
mov ecx, dword [ebp + 0x6f]
mov eax, dword [edi + 0x2c]
mov dx, word [ebp + 0x6d]
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 0x28]
push eax
push ecx
mov byte [esp + 0x24], 5
mov byte [esp + 0x25], 1
mov byte [esp + 0x26], 0
mov byte [esp + 0x27], 1
mov word [esp + 0x2c], dx
push 0
mov eax, 0xa
lea ecx, [esp + 0x28]
jmp 0x404b6e
mov edx, dword [ebp + 0x73]
mov ecx, dword [ebp + 0x7b]
mov eax, dword [ebp + 0x77]
mov dword [esp + 0x68], edx
mov edx, dword [ebp + 0x7f]
mov dword [esp + 0x70], ecx
mov ecx, dword [edi + 0x2c]
mov dword [esp + 0x74], edx
mov edx, dword [edi + 0x28]
push ecx
mov dword [esp + 0x70], eax
mov ax, word [ebp + 0x6d]
push edx
mov word [esp + 0x80], ax
push 0
jmp 0x404b51
cmp edx, 2
jb 0x404b81
lea esi, [edi + 0x34]
call fcn.0040a750
mov eax, dword [eax + 4]
cmp byte [eax], 5
jne 0x404b81
cmp byte [eax + 1], 2
jne 0x404ae0
xor eax, eax
cmp dword [ebp + 0xc0], eax
je 0x404ae2
mov dword [esp + 0x68], eax
mov dword [esp + 0x6c], eax
mov dword [esp + 0x70], eax
mov byte [esp + 0x8c], 1
lea ebx, [esp + 0x17]
lea esi, [esp + 0x64]
mov byte [esp + 0x17], 1
call fcn.00409ca0
mov eax, dword [ebp + 0xc0]
lea ebx, [esp + 0x17]
mov byte [esp + 0x17], al
call fcn.00409ca0
lea edi, [ebp + 0xac]
lea ebx, [esp + 0x34]
call fcn.00409bb0
lea ebx, [esp + 0x5c]
mov dword [esp + 0x1c], eax
call fcn.00409b60
lea esi, [esp + 0x4c]
lea edi, [esp + 0x64]
mov ebx, eax
call fcn.00409c60
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
push edx
mov edx, dword [ebx + 4]
push ecx
mov ecx, dword [ebx]
push edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push edx
push eax
mov ecx, edi
push ecx
call fcn.0040ed30
mov eax, dword [ebp + 0xdc]
lea ebx, [esp + 0x17]
mov esi, edi
mov byte [esp + 0x17], al
call fcn.00409ca0
cmp dword [ebp + 0xdc], 0
je 0x404a7d
lea edi, [ebp + 0xc8]
lea ebx, [esp + 0x3c]
call fcn.00409bb0
lea ebx, [esp + 0x44]
mov dword [esp + 0x1c], eax
call fcn.00409b60
lea esi, [esp + 0x54]
lea edi, [esp + 0x64]
mov ebx, eax
call fcn.00409c60
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx + 4]
mov ecx, dword [ecx]
push edx
mov edx, dword [ebx + 4]
push ecx
mov ecx, dword [ebx]
push edx
mov edx, dword [eax + 4]
mov eax, dword [eax]
push ecx
push edx
push eax
mov ecx, edi
push ecx
call fcn.0040ed30
mov eax, dword [esp + 0x68]
test eax, eax
jne 0x404a89
xor ebx, ebx
jmp 0x404a8f
mov ebx, dword [esp + 0x6c]
sub ebx, eax
mov eax, dword [esp + 0x28]
mov edx, dword [eax + 0x2c]
mov eax, dword [eax + 0x28]
push edx
push eax
xor edi, edi
lea esi, [esp + 0x6c]
call fcn.00409c80
mov edx, dword [esp + 0x20]
push edi
mov ecx, eax
push edx
mov eax, ebx
mov edx, ebp
call fcn.00403f10
test al, al
je 0x404ac2
mov dword [ebp + 0x40], 2
lea esi, [esp + 0x64]
mov byte [esp + 0x8c], 0
call fcn.00409c30
mov edi, dword [esp + 0x28]
mov ebx, dword [esp + 0x18]
jmp 0x404b81
xor eax, eax
movzx ecx, word [ebp + 0x6b]
cmp ecx, 2
jne 0x404b23
mov ecx, dword [ebp + 0x6f]
mov dx, word [ebp + 0x6d]
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 0x2c]
push ecx
mov word [esp + 0x28], dx
mov edx, dword [edi + 0x28]
push edx
push eax
mov byte [esp + 0x28], 5
mov byte [esp + 0x29], 1
mov byte [esp + 0x2a], 0
mov byte [esp + 0x2b], 1
mov eax, 0xa
lea ecx, [esp + 0x28]
jmp 0x404b6e
mov ecx, dword [ebp + 0x73]
mov edx, dword [ebp + 0x77]
mov dword [esp + 0x68], ecx
mov ecx, dword [ebp + 0x7b]
mov dword [esp + 0x6c], edx
mov edx, dword [ebp + 0x7f]
mov dword [esp + 0x70], ecx
mov cx, word [ebp + 0x6d]
mov dword [esp + 0x74], edx
mov edx, dword [edi + 0x2c]
mov word [esp + 0x78], cx
mov ecx, dword [edi + 0x28]
push edx
push ecx
push eax
lea ecx, [esp + 0x70]
mov eax, 0x16
mov byte [esp + 0x73], 4
mov byte [esp + 0x72], 0
mov byte [esp + 0x71], 1
mov byte [esp + 0x70], 5
push ebx
mov edx, ebp
call fcn.00403f10
test al, al
je 0x404b81
mov dword [ebp + 0x40], 3
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
push edx
push eax
push 0
push ebx
mov eax, ebp
call fcn.00404100
jmp 0x404c20
cmp dword [ebp + 0x40], 4
jne 0x404c10
cmp dword [ebx + 0x5c], 0
je 0x404be8
test byte [ebp + 0x44], 2
je 0x404be8
mov ecx, dword [ebx + 0x5c]
mov eax, dword [ecx]
push edx
lea esi, [edi + 0x34]
mov dword [esp + 0x20], eax
call fcn.0040a750
mov ecx, dword [eax + 4]
mov edx, dword [edi + 0x2c]
mov eax, dword [edi + 0x28]
push ecx
mov ecx, dword [ebx + 0x5c]
push edx
mov edx, dword [esp + 0x28]
push eax
mov eax, dword [edx + 0x18]
call eax
mov ecx, dword [edi + 0x2c]
mov edx, dword [edi + 0x28]
push ecx
push edx
push 1
push ebx
mov eax, ebp
call fcn.00404100
jmp 0x404c20
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
push eax
push ecx
lea esi, [edi + 0x34]
call fcn.0040a750
mov edx, eax
mov ecx, dword [edx + 4]
mov eax, dword [esp + 0xa0]
push 0
push ebx
mov edx, ebp
call fcn.00403f10
jmp 0x404c20
mov eax, dword [edi + 0x2c]
mov ecx, dword [edi + 0x28]
push eax
push ecx
push esi
mov eax, ebx
call fcn.00404220
lea edx, [ebp + 0xec]
push edx
mov dword [esp + 0x90], 0xffffffff
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, ebp
mov edi, ebx
call fcn.00403a80
mov ecx, dword [esp + 0x84]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x68]
xor ecx, esp
call fcn.00419af5
add esp, 0x7c
ret 0xc