Function at 0x412240
Capabilities:
Check for peb beingdebugged flag

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ddcb4
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x53d9f8]
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
mov esi, ecx
mov dword [ebp - 0x24c], esi
mov dword [ebp - 0x250], esi
mov dword [ebp - 0x258], esi
xor eax, eax
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
lea ebx, [esi + 0x18]
mov dword [ebp - 4], eax
mov dword [ebx + 0x10], eax
mov dword [ebx + 0x14], 7
mov word [ebx], ax
push str.__UPD_LogFile_Z_MutxName__
push eax
push eax
mov byte [ebp - 4], 1
mov dword [esi + 0x30], 4
mov dword [esi + 0x34], 0x10000001
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x208
mov dword [esi + 0x38], eax
lea eax, [ebp - 0x218]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x218]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
xor eax, eax
mov dword [ebp - 0x238], 0
lea ecx, [ebp - 0x218]
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x412320
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x248]
call fcn.004033b0
mov esi, dword [ebp - 0x238]
or ecx, 0xffffffff
mov edi, dword [ebp - 0x234]
mov byte [ebp - 4], 2
test esi, esi
je 0x4124f8
mov ecx, dword [ebp - 0x248]
lea eax, [ebp - 0x248]
cmp edi, 8
cmovae eax, ecx
cmp word [eax + esi*2 - 2], 0x5c
je 0x4124f5
cmp edi, 8
lea edx, [ebp - 0x248]
lea eax, [esi - 1]
cmovae edx, ecx
or ecx, 0xffffffff
cmp eax, ecx
cmovb ecx, eax
cmp word [edx + ecx*2], 0x5c
lea eax, [edx + ecx*2]
je 0x4123ad
lea esp, [esp]
cmp eax, edx
je 0x4123d1
sub eax, 2
cmp word [eax], 0x5c
jne 0x4123a0
sub eax, edx
sar eax, 1
lea edx, [eax + 1]
mov dword [ebp - 0x21c], 7
xor eax, eax
mov word [ebp - 0x230], ax
cmp esi, edx
jb 0x4126ab
jmp 0x4123d6
or eax, 0xffffffff
jmp 0x4123b1
sub esi, edx
lea eax, [ebp - 0x248]
or ecx, 0xffffffff
cmp esi, 0xffffffff
cmovb ecx, esi
cmp edi, 8
mov dword [ebp - 0x254], ecx
cmovae eax, dword [ebp - 0x248]
lea eax, [eax + edx*2]
mov dword [ebp - 0x250], eax
cmp ecx, 7
ja 0x41242b
lea esi, [ecx + ecx]
mov dword [ebp - 0x220], ecx
push esi
push eax
lea eax, [ebp - 0x230]
push eax
call sub.VCRUNTIME140.dll_memmove
add esp, 0xc
xor eax, eax
mov word [ebp + esi - 0x230], ax
jmp 0x412497
cmp ecx, 0x7ffffffe
ja 0x4126b0
mov esi, ecx
or esi, 7
cmp esi, 0x7ffffffe
jbe 0x41244b
mov esi, 0x7ffffffe
jmp 0x412455
mov eax, 0xa
cmp esi, eax
cmovb esi, eax
lea eax, [esi + 1]
push eax
lea ecx, [ebp - 0x230]
call fcn.004031d0
mov edi, eax
mov dword [ebp - 0x21c], esi
mov eax, dword [ebp - 0x254]
mov dword [ebp - 0x220], eax
lea esi, [eax + eax]
push esi
push dword [ebp - 0x250]
push edi
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov dword [ebp - 0x230], edi
xor eax, eax
mov word [edi + esi], ax
mov ecx, dword [ebp - 0x24c]
lea eax, [ebp - 0x230]
push eax
call fcn.00405210
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x4124e9
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4124df
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412679
push edx
push ecx
call fcn.004bee2d
add esp, 8
mov esi, dword [ebp - 0x238]
mov edi, dword [ebp - 0x234]
or ecx, 0xffffffff
cmp edi, 8
lea edx, [ebp - 0x248]
cmovae edx, dword [ebp - 0x248]
test esi, esi
je 0x412533
lea eax, [esi - 1]
cmp eax, 0xffffffff
cmovb ecx, eax
cmp word [edx + ecx*2], 0x2e
lea ecx, [edx + ecx*2]
je 0x41252d
nop
cmp ecx, edx
je 0x412533
sub ecx, 2
cmp word [ecx], 0x2e
jne 0x412520
sub ecx, edx
sar ecx, 1
jmp 0x412536
or ecx, 0xffffffff
xor eax, eax
mov dword [ebp - 0x220], 0
cmp esi, ecx
mov word [ebp - 0x230], ax
lea eax, [ebp - 0x248]
mov dword [ebp - 0x21c], 7
cmovb ecx, esi
cmp edi, 8
push ecx
cmovae eax, dword [ebp - 0x248]
lea ecx, [ebp - 0x230]
push eax
call fcn.004033b0
lea eax, [ebp - 0x230]
cmp ebx, eax
je 0x4125fd
mov ecx, dword [ebx + 0x14]
cmp ecx, 8
jb 0x4125b8
mov eax, dword [ebx]
lea ecx, [ecx*2 + 2]
cmp ecx, 0x1000
jb 0x4125ae
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412679
mov eax, edx
push ecx
push eax
call fcn.004bee2d
add esp, 8
mov eax, dword [ebp - 0x230]
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], 7
mov dword [ebx], eax
mov eax, dword [ebp - 0x22c]
mov dword [ebx + 4], eax
mov eax, dword [ebp - 0x228]
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x224]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x220]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x21c]
mov dword [ebx + 0x14], eax
jmp 0x412639
mov edx, dword [ebp - 0x21c]
cmp edx, 8
jb 0x412639
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41262f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x412679
push edx
push ecx
call fcn.004bee2d
add esp, 8
push 4
push str..log
mov ecx, ebx
call fcn.00403230
mov edx, dword [ebp - 0x234]
cmp edx, 8
jb 0x412689
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x41267f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x41267f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.004bee2d
add esp, 8
mov eax, dword [ebp - 0x24c]
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.004bee49
mov esp, ebp
pop ebp
ret
call fcn.004067d0
call fcn.004031b0
int3