Function at 0x401e10
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5aaf11
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x63afd4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
cmp dword [0x643bdc], 0
mov esi, dword [ebp + 8]
jne 0x40236f
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0057fb60
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x62004c
lea ecx, [ebp - 0x22c]
mov dword [ebp - 0x22c], 0
call fcn.004031a0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x228]
push 0x62004c
mov dword [ebp - 0x228], 0
call fcn.004031a0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x224]
push esi
mov dword [ebp - 0x224], 0
call fcn.004031a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x220]
push 0x6212e4
mov dword [ebp - 0x220], 0
call fcn.004031a0
mov byte [ebp - 4], 3
lea eax, [ebp - 0x218]
mov ecx, dword [ebp - 0x22c]
mov edx, dword [ebp - 0x228]
mov esi, dword [ebp - 0x224]
mov edi, dword [ebp - 0x220]
mov dword [ebp - 0x244], ecx
mov dword [ebp - 0x240], edx
mov dword [ebp - 0x23c], esi
mov dword [ebp - 0x238], edi
mov dword [ebp - 0x234], eax
mov dword [ebp - 0x230], 0
mov eax, dword fs:[0x30]
mov dword [ebp - 0x230], eax
lea ebx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401f44
sub ecx, ebx
sar ecx, 1
lea ebx, [ecx*2 + 2]
mov dword [ebp - 0x258], ebx
lea ecx, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401f63
sub edx, ecx
lea ecx, [esi + 2]
sar edx, 1
lea edx, [edx*2 + 2]
mov dword [ebp - 0x254], edx
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x401f82
sub esi, ecx
lea ecx, [edi + 2]
sar esi, 1
lea esi, [esi*2 + 2]
mov dword [ebp - 0x250], esi
mov ax, word [edi]
add edi, 2
test ax, ax
jne 0x401fa1
sub edi, ecx
lea ecx, [ebp - 0x218]
sar edi, 1
lea eax, [ecx + 2]
mov dword [ebp - 0x21c], eax
lea edi, [edi*2 + 2]
mov dword [ebp - 0x24c], edi
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401fd0
sub ecx, dword [ebp - 0x21c]
add edx, 0x709
sar ecx, 1
lea eax, [ecx*2 + 2]
mov dword [ebp - 0x248], eax
add eax, edx
add esi, eax
add esi, ebx
add esi, edi
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push esi
push 0
push eax
mov dword [0x643bdc], eax
call fcn.0057fb60
mov eax, dword [0x643bdc]
add esp, 0xc
mov dword [eax], esi
mov eax, dword [0x643bdc]
mov dword [eax + 4], 0
mov eax, dword [0x643bdc]
mov dword [eax + 8], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [0x643bdc]
mov dword [ecx + 0x10], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [0x643bdc]
mov dword [ecx + 0x14], eax
mov eax, dword [0x643bdc]
mov dword [eax + 0x18], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0x1c], 0
mov ecx, dword [0x643bdc]
mov eax, dword [ebp - 0x230]
mov dword [ecx + 0x28], eax
mov eax, dword [0x643bdc]
mov dword [eax + 0x2c], 0x804
mov eax, dword [0x643bdc]
mov dword [eax + 0x20], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0x24], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0x34c], 0
mov ecx, dword [0x643bdc]
mov ax, word [ebp + 0x10]
mov word [ecx + 0x5e8], ax
mov ecx, dword [0x643bdc]
mov ax, word [ebp + 0x14]
mov word [ecx + 0x5ea], ax
mov ecx, dword [0x643bdc]
mov eax, dword [ebp + 0x18]
mov dword [ecx + 0x5ec], eax
mov eax, dword [0x643bdc]
mov byte [eax + 0x5f0], 1
mov eax, dword [0x643bdc]
mov byte [eax + 0x5f1], 1
mov eax, dword [0x643bdc]
mov dword [eax + 0x5f8], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0x5fc], 0
mov eax, dword [0x643bdc]
mov byte [eax + 0x600], 0
mov eax, dword [0x643bdc]
mov dword [eax + 0x558], 1
mov ebx, dword [0x643bdc]
add ebx, 0x709
xor esi, esi
nop dword [eax]
nop word [eax + eax]
mov edi, dword [ebp + esi - 0x258]
push edi
push dword [ebp + esi - 0x244]
push ebx
call fcn.0057f5e0
mov dword [ebp + esi - 0x244], ebx
add esp, 0xc
add esi, 4
add ebx, edi
cmp esi, 0x14
jb 0x402160
mov edx, dword [0x643bdc]
mov eax, dword [ebp - 0x244]
mov ecx, dword [ebp - 0x240]
sub eax, edx
sub ecx, edx
mov dword [edx + 0x5d4], eax
mov eax, dword [0x643bdc]
mov dword [eax + 0x5d8], ecx
mov eax, dword [0x643bdc]
mov ecx, dword [ebp - 0x23c]
sub ecx, edx
mov dword [eax + 0x5dc], ecx
mov eax, dword [0x643bdc]
mov ecx, dword [ebp - 0x238]
sub ecx, edx
mov dword [eax + 0x5e0], ecx
mov eax, dword [0x643bdc]
mov ecx, dword [ebp - 0x234]
sub ecx, edx
mov dword [eax + 0x5e4], ecx
call fcn.00403020
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov esi, eax
test esi, esi
je 0x402222
push str.AddVectoredExceptionHandler
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x402222
push 0x4030d0
push 0
mov ecx, edi
call dword [0x5b6448]
call edi
push 0x643be8
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
test esi, esi
je 0x402288
push str.GetProcessUserModeExceptionPolicy
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.SetProcessUserModeExceptionPolicy
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test edi, edi
je 0x402288
test esi, esi
je 0x402288
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x21c], 0
push eax
mov ecx, edi
call dword [0x5b6448]
call edi
test eax, eax
je 0x402288
mov eax, dword [ebp - 0x21c]
mov ecx, esi
and eax, 0xfffffffe
push eax
call dword [0x5b6448]
call esi
push str.Common.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x4022b7
push str.__DetourFunctionWrapper
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4022b7
mov eax, dword [0x643bdc]
test eax, eax
je 0x4022b7
mov dword [eax + 4], 0x10
mov byte [ebp - 4], 2
or ebx, 0xffffffff
mov ecx, dword [ebp - 0x220]
mov eax, ebx
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x4022e7
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5b6448]
mov ecx, edi
call esi
mov byte [ebp - 4], 1
mov eax, ebx
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x402314
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5b6448]
mov ecx, edi
call esi
mov byte [ebp - 4], 0
mov eax, ebx
mov ecx, dword [ebp - 0x228]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], eax
dec eax
test eax, eax
jg 0x402341
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5b6448]
mov ecx, edi
call esi
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x40236f
mov edi, dword [ecx]
push ecx
mov eax, dword [edi]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x5b6448]
mov ecx, edi
call esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0057d277
mov esp, ebp
pop ebp
ret