Function at 0x417ca1
Capabilities:
Check for peb beingdebugged flag

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
xor eax, eax
mov ebx, edx
push esi
push edi
mov dword [ebp - 0x10], eax
mov edi, eax
mov dword [ebp - 8], eax
mov esi, eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x417cc8
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
jmp 0x417cda
lea edx, [ebp - 0x14]
call fcn.00418284
mov esi, eax
test esi, esi
js 0x417f5f
cmp word [ebx], 0x5b
jne 0x417f5a
lea eax, [ebx + 2]
push 0x5d
push eax
call dword [sym.imp.msvcrt.dll_wcschr]
mov dword [ebp - 0x1c], eax
pop ecx
pop ecx
test eax, eax
je 0x417f5a
sub eax, ebx
sar eax, 1
dec eax
add eax, eax
mov dword [ebp - 0xc], eax
add eax, 2
push eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x417d2e
mov esi, 0xc000009a
jmp 0x417f5f
push dword [ebp - 0xc]
lea eax, [ebx + 2]
mov ebx, dword [ebp - 0x20]
push eax
push ebx
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0xc]
xor ecx, ecx
push 0x4053cc
push ebx
mov word [eax + ebx], cx
mov eax, dword [ebp - 0x1c]
add eax, 2
mov dword [ebp - 4], eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 0x14
test eax, eax
jne 0x417d71
push 0x36
mov dword [ebp - 0xc], 1
xor ebx, ebx
pop edx
jmp 0x417ddf
push 0x4055a8
push ebx
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
jne 0x417dab
mov edi, dword [ebp - 4]
xor ebx, ebx
mov ecx, edi
push 8
pop eax
mov dword [ebp - 0xc], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x417d93
sub ecx, edx
sar ecx, 1
lea edx, [ecx*2 + 0x44]
jmp 0x417de2
lea edx, [ebp - 8]
mov ecx, ebx
call fcn.0041cce7
mov esi, eax
test esi, esi
js 0x417e24
mov ecx, dword [ebp - 8]
xor ebx, ebx
push 2
pop eax
mov dword [ebp - 0xc], eax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x417dc9
sub ecx, edx
sar ecx, 1
lea edx, [ecx*2 + 0x38]
mov edi, dword [ebp - 4]
mov ecx, edi
lea edi, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, bx
jne 0x417de7
sub ecx, edi
sar ecx, 1
lea ebx, [ecx*2 + 0x2e]
lea eax, [edx + ebx]
mov dword [ebp - 0x18], ebx
push eax
mov dword [ebp - 0x1c], eax
xor eax, eax
push eax
mov eax, dword fs:[0x30]
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov edi, eax
test edi, edi
jne 0x417e47
mov esi, 0xc000009a
mov ebx, dword [ebp - 8]
test ebx, ebx
je 0x417f29
mov eax, dword fs:[0x30]
push ebx
xor ebx, ebx
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x417f2b
push dword [ebp - 0x1c]
xor eax, eax
push eax
push edi
call sub.msvcrt.dll_memset
mov edx, dword [ebp - 4]
add esp, 0xc
xor eax, eax
mov dword [edi], 8
mov dword [edi + 0x14], eax
mov ecx, edx
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x1c], eax
mov dword [edi + 0x18], 0x22
lea eax, [ecx + 2]
mov dword [edi + 0x36], ebx
mov dword [edi + 0x22], 3
mov dword [ebp - 0x14], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x417e83
sub ecx, dword [ebp - 0x14]
sar ecx, 1
push edx
lea eax, [ecx + 1]
push eax
lea eax, [edi + 0x3a]
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
mov eax, dword [ebp - 0xc]
add esp, 0xc
mov dword [edi + ebx + 0x22], eax
mov ebx, dword [ebp - 8]
cmp eax, 2
jne 0x417ed7
mov ecx, ebx
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x417eba
sub ecx, edx
sar ecx, 1
push ebx
lea eax, [ecx + 1]
push eax
mov eax, dword [ebp - 0x18]
add eax, 0x36
jmp 0x417f0b
cmp eax, 8
jne 0x417f17
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x18]
lea eax, [ecx + 2]
mov dword [edi + edx + 0x36], 1
mov dword [ebp - 0x18], eax
mov ax, word [ecx]
add ecx, 2
cmp ax, word [ebp - 0x10]
jne 0x417ef0
sub ecx, dword [ebp - 0x18]
push dword [ebp - 4]
sar ecx, 1
lea eax, [ecx + 1]
push eax
lea eax, [edx + 0x42]
add eax, edi
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0xc
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x1c]
mov dword [eax], edi
mov eax, dword [ebp + 0x10]
mov dword [eax], ecx
jmp 0x417e27
xor ebx, ebx
mov eax, dword [ebp - 0x20]
push eax
mov eax, dword fs:[0x30]
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
test esi, esi
jns 0x417f5f
test edi, edi
je 0x417f5f
mov eax, dword fs:[0x30]
push edi
push ebx
push dword [eax + 0x18]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x417f5f
mov esi, 0xc000000d
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret 0xc