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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x70
mov esi, esp
mov dword [esi + 0x58], ebp
mov dword [esi + 0x5c], esp
mov dword [esi + 0x68], 0xffffffff
mov dword [esi + 0x64], 0x577a20
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
xorps xmm0, xmm0
mov dword [esi + 4], ecx
mov edi, dword fs:[0]
mov dword [esi + 0x60], edi
lea edi, [esi + 0x60]
mov dword fs:[0], edi
mov dword [esi + 0x2c], ebx
mov dword [esi + 0x28], edx
mov dword [esi + 0x30], eax
movaps xmmword [esi + 0x40], xmm0
mov dword [esi + 0x50], 0
mov ebx, dword [ecx]
mov eax, dword [ecx + 4]
xor edi, edi
mov dword [esi + 8], 1
mov dword [esi + 0x18], 0
mov dword [esi], eax
jmp 0x408ded
call dword [sym.imp.kernel32.dll_SwitchToThread]
mov edx, dword [esi + 4]
mov ebx, dword [edx]
mov eax, dword [edx + 4]
mov ecx, dword [esi + 8]
inc edi
add dword [esi + 0x18], ecx
add ecx, 2
mov dword [esi], eax
mov dword [esi + 8], ecx
cmp edi, 6
mov ecx, 6
mov eax, ebx
cmovb ecx, edi
shr eax, 1
mov edx, eax
and edx, 0x1f
cmp edx, 0x1f
jne 0x408e30
cmp edi, 6
ja 0x408dd0
mov edx, dword [esi + 4]
test edi, edi
je 0x408dd9
mov eax, dword [esi + 0x18]
nop word cs:[eax + eax]
nop
pause
dec eax
jne 0x408e20
jmp 0x408dd9
mov dword [esi + 0x3c], edi
mov edi, ebx
mov dword [esi + 0x38], eax
add ebx, 2
mov dword [esi + 0x14], edx
mov eax, edi
mov dword [esi + 0x10], ebx
test al, 1
jne 0x408e6e
mfence
mov eax, dword [esi + 4]
mov edx, dword [eax + 0x40]
mov ebx, edx
shr ebx, 1
cmp dword [esi + 0x38], ebx
je 0x408ee0
xor edx, edi
mov eax, edi
mov edi, edx
xor edx, edx
cmp edi, 0x40
setae dl
or dword [esi + 0x10], edx
cmp dword [esi], 0
mov edx, dword [esi + 4]
mov edi, dword [esi + 0x3c]
je 0x408eaa
mov ebx, dword [esi + 0x10]
lock cmpxchg dword [edx], ebx
je 0x409040
cmp edi, 6
mov eax, 6
cmovb eax, edi
test eax, eax
je 0x408dd9
imul ecx, ecx
nop dword [eax]
pause
dec ecx
jne 0x408ea0
jmp 0x408dd9
cmp edi, 6
ja 0x408dd0
mov edx, dword [esi + 4]
test edi, edi
je 0x408dd9
mov eax, dword [esi + 0x18]
nop word cs:[eax + eax]
nop dword [eax + eax]
pause
dec eax
jne 0x408ed0
jmp 0x408dd9
test dl, 1
jne 0x4096a7
mov eax, dword [esi + 0x30]
mov dword [esi + 0x68], 0xffffffff
cmp eax, 0x3b9aca00
je 0x408f33
mov ebx, dword [esi + 0x28]
mov edi, dword [esi + 0x2c]
mov dword [esi], eax
call fcn.0055e0f0
mov dword [esi + 0x18], ebx
cmp eax, ebx
mov ebx, edx
mov dword [esi + 8], edi
mov dword [esi + 0x10], ecx
sbb ebx, edi
mov edi, dword [esi]
jb 0x408f33
xor eax, dword [esi + 0x18]
xor edx, dword [esi + 8]
xor ecx, ecx
or edx, eax
jne 0x409645
cmp dword [esi + 0x10], edi
jae 0x409645
call fcn.0056dbb0
test eax, eax
je 0x408fb6
mov ecx, dword [eax]
mov dword [eax], 0
test ecx, ecx
je 0x408ffb
mov dword [esi + 8], eax
mov dword [esi + 0xc], ecx
mov dword [ecx + 0xc], 0
mov dword [esi], ecx
mov dword [ecx + 0x10], 0
lea ecx, [esi + 0x40]
mov dword [esi + 0x68], 1
mov edx, dword [esi + 4]
mov dword [esi + 0x1c], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x1c]
lea edx, [esi + 0xc]
call fcn.00409710
mov ecx, dword [esi + 8]
mov edx, dword [esi]
mov eax, dword [ecx]
mov dword [esi + 0x1c], eax
mov dword [ecx], edx
mov ecx, dword [esi + 4]
test eax, eax
je 0x408db6
lock dec dword [eax]
jne 0x408db6
lea ecx, [esi + 0x1c]
call fcn.00417e90
mov ecx, dword [esi + 4]
jmp 0x408db6
call fcn.00587da0
mov edx, dword [esi + 4]
lea ecx, [esi + 0x40]
mov dword [esi], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x68], 2
mov dword [esi + 0x1c], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x1c]
lea edx, [esi + 0xc]
call fcn.00409710
mov eax, dword [esi]
lock dec dword [eax]
jne 0x408ff3
lea ecx, [esi + 0xc]
call fcn.00417e90
mov ecx, dword [esi + 4]
jmp 0x408db6
call fcn.00587da0
mov edx, dword [esi + 4]
lea ecx, [esi + 0x40]
mov dword [esi], eax
mov dword [esi + 0xc], eax
mov dword [esi + 0x68], 0
mov dword [esi + 0x1c], ecx
lea ecx, [esi + 0x28]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], ecx
lea ecx, [esi + 0x1c]
lea edx, [esi + 0xc]
call fcn.00409710
mov eax, dword [esi]
lock dec dword [eax]
jne 0x409038
lea ecx, [esi + 0xc]
call fcn.00417e90
mov ecx, dword [esi + 4]
jmp 0x408db6
mov eax, dword [esi + 0x14]
cmp eax, 0x1e
jne 0x409074
mov eax, dword [esi]
mov eax, dword [eax]
mov ecx, dword [esi + 0x10]
test eax, eax
je 0x409658
and ecx, 0xfffffffe
xor edx, edx
mov edi, ecx
mov ecx, dword [eax]
test ecx, ecx
setne dl
lea ecx, [edi + edx + 2]
mov edi, dword [esi + 4]
mov dword [edi + 4], eax
mov dword [edi], ecx
mov eax, dword [esi + 0x14]
mov ecx, dword [esi]
mov dword [esi + 0x48], ecx
mov dword [esi + 0x4c], eax
mov eax, dword [ecx + eax*4 + 4]
test al, 1
jne 0x4090c7
mov ebx, 1
xor edx, edx
xor edi, edi
jmp 0x4090af
mov dword [esi + 8], edx
call dword [sym.imp.kernel32.dll_SwitchToThread]
mov edx, dword [esi + 8]
mov eax, dword [esi + 0x14]
mov ecx, dword [esi]
add edx, ebx
inc edi
add ebx, 2
mov eax, dword [ecx + eax*4 + 4]
test al, 1
jne 0x4090c7
cmp edi, 7
jae 0x409090
test edi, edi
je 0x40909c
mov eax, edx
nop word [eax + eax]
pause
dec eax
jne 0x4090c0
jmp 0x40909c
mov edi, dword [esi + 0x14]
lea edx, [edi + 1]
cmp edx, 0x1f
jne 0x4095ce
mov eax, dword [esi]
mov eax, dword [eax + 4]
test al, 2
jne 0x409106
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 4]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 4], ecx
jne 0x4090f0
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 8]
test al, 2
jne 0x409136
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 8]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 8], ecx
jne 0x409120
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0xc]
test al, 2
jne 0x409166
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0xc]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0xc], ecx
jne 0x409150
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x10]
test al, 2
jne 0x409196
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x10]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x10], ecx
jne 0x409180
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x14]
test al, 2
jne 0x4091c6
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x14]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x14], ecx
jne 0x4091b0
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x18]
test al, 2
jne 0x4091f6
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x18]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x18], ecx
jne 0x4091e0
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x1c]
test al, 2
jne 0x409226
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x1c]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x1c], ecx
jne 0x409210
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x20]
test al, 2
jne 0x409256
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x20]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x20], ecx
jne 0x409240
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x24]
test al, 2
jne 0x409286
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x24]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x24], ecx
jne 0x409270
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
test al, 2
jne 0x4092b6
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x28]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x28], ecx
jne 0x4092a0
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x2c]
test al, 2
jne 0x4092e6
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x2c]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x2c], ecx
jne 0x4092d0
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x30]
test al, 2
jne 0x409316
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x30]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x30], ecx
jne 0x409300
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x34]
test al, 2
jne 0x409346
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x34]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x34], ecx
jne 0x409330
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x38]
test al, 2
jne 0x40936c
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x38]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x38], ecx
jne 0x409356
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x3c]
test al, 2
jne 0x409392
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x3c]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x3c], ecx
jne 0x40937c
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x40]
test al, 2
jne 0x4093b8
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x40]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x40], ecx
jne 0x4093a2
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x44]
test al, 2
jne 0x4093de
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x44]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x44], ecx
jne 0x4093c8
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x48]
test al, 2
jne 0x409404
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x48]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x48], ecx
jne 0x4093ee
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x4c]
test al, 2
jne 0x40942a
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x4c]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x4c], ecx
jne 0x409414
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x50]
test al, 2
jne 0x409450
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x50]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x50], ecx
jne 0x40943a
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x54]
test al, 2
jne 0x409476
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x54]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x54], ecx
jne 0x409460
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x58]
test al, 2
jne 0x40949c
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x58]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x58], ecx
jne 0x409486
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x5c]
test al, 2
jne 0x4094c2
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x5c]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x5c], ecx
jne 0x4094ac
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x60]
test al, 2
jne 0x4094e8
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x60]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x60], ecx
jne 0x4094d2
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x64]
test al, 2
jne 0x40950e
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x64]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x64], ecx
jne 0x4094f8
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x68]
test al, 2
jne 0x409534
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x68]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x68], ecx
jne 0x40951e
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x6c]
test al, 2
jne 0x40955a
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x6c]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x6c], ecx
jne 0x409544
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x70]
test al, 2
jne 0x409580
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x70]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x70], ecx
jne 0x40956a
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x74]
test al, 2
jne 0x4095a6
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x74]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x74], ecx
jne 0x409590
mov cl, 2
test al, 2
je 0x409645
mov eax, dword [esi]
mov eax, dword [eax + 0x78]
test al, 2
jne 0x409633
mov eax, dword [esi]
mov edx, dword [esi]
mov eax, dword [eax + 0x78]
mov ecx, eax
or ecx, 4
lock cmpxchg dword [edx + 0x78], ecx
jne 0x4095ba
mov cl, 2
test al, 2
jne 0x409633
jmp 0x409645
mov eax, dword [esi]
mov ebx, dword [esi]
mov eax, dword [eax + edi*4 + 4]
nop word cs:[eax + eax]
mov ecx, eax
or ecx, 2
lock cmpxchg dword [ebx + edi*4 + 4], ecx
jne 0x4095e0
mov cl, 2
test al, 4
je 0x409645
cmp dword [esi + 0x14], 0x1c
ja 0x409633
mov ebx, dword [esi]
jmp 0x409606
inc edx
cmp edx, 0x1e
je 0x409633
mov eax, dword [esi]
mov eax, dword [eax + edx*4 + 4]
test al, 2
jne 0x409600
mov eax, dword [esi]
mov eax, dword [eax + edx*4 + 4]
nop word cs:[eax + eax]
mov edi, eax
or edi, 4
lock cmpxchg dword [ebx + edx*4 + 4], edi
jne 0x409620
test al, 2
jne 0x409600
jmp 0x409645
push dword [esi]
push 0
push dword [0x5fd290]
call dword [sym.imp.kernel32.dll_HeapFree]
mov cl, 2
mov eax, dword [esi + 0x60]
mov dword fs:[0], eax
mov eax, ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, 1
xor edx, edx
xor edi, edi
jmp 0x409691
mov dword [esi + 8], edx
call dword [sym.imp.kernel32.dll_SwitchToThread]
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0x10]
mov eax, dword [esi]
add edx, ebx
inc edi
add ebx, 2
mov eax, dword [eax]
test eax, eax
jne 0x409057
cmp edi, 7
jae 0x409670
test edi, edi
je 0x40967f
mov eax, edx
nop dword [eax]
pause
dec eax
jne 0x4096a0
jmp 0x40967f
mov cl, 1
jmp 0x409645