Function at 0x401a50
Capabilities:
Check for peb beingdebugged flag
Enumerate files on windows
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x27c
mov esi, dword [eax + 0x40]
mov dword [ebp - 0x26c], eax
add eax, 0x40
mov dword [ebp - 0x274], eax
mov edi, esi
cmp eax, esi
je 0x401c64
lea esi, [esi]
nop
mov ebx, dword [edi + 8]
mov dword [esp + 4], 0x4054f0
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_wcsstr]
test eax, eax
je 0x401c90
mov eax, dword [ebp - 0x26c]
mov edx, dword [eax + 4]
cmp word [edx], 0
je 0x401d00
mov eax, edx
lea esi, [esi]
add eax, 2
cmp word [eax], 0
jne 0x401ab8
sub eax, edx
sar eax, 1
add eax, 1
cmp word [ebx], 0
je 0x401adf
mov edx, ebx
add edx, 2
cmp word [edx], 0
jne 0x401ad0
sub edx, ebx
sar edx, 1
add eax, edx
lea eax, [eax + eax + 2]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
mov edx, eax
test eax, eax
je 0x401cf4
mov eax, dword [ebp - 0x26c]
mov esi, dword [eax + 4]
xor eax, eax
lea esi, [esi]
movzx ecx, word [esi + eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x401b20
mov dword [esp], edx
mov dword [ebp - 0x270], edx
call sub.shlwapi.dll_PathAddBackslashW
mov edx, dword [ebp - 0x270]
sub esp, 4
cmp word [edx], 0
mov ecx, edx
je 0x401b59
nop
add ecx, 2
cmp word [ecx], 0
jne 0x401b50
xor eax, eax
lea esi, [esi]
nop
movzx esi, word [ebx + eax]
mov word [ecx + eax], si
add eax, 2
test si, si
jne 0x401b60
lea esi, [ebp - 0x268]
mov dword [esp], edx
mov dword [esp + 4], esi
mov dword [ebp - 0x270], edx
call dword [sym.imp.kernel32.dll_FindFirstFileW]
mov edx, dword [ebp - 0x270]
sub esp, 8
mov ebx, eax
mov dword [esp + 4], 0
mov eax, dword fs:[0x18]
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
cmp ebx, 0xffffffff
je 0x401cf4
mov dword [ebp - 0x270], edi
mov eax, dword [ebp - 0x23c]
cmp eax, 0x2e
je 0x401c30
cmp eax, 0x2e002e
je 0x401c78
test byte [ebp - 0x268], 0x10
jne 0x401c30
lea edi, [ebp - 0x23c]
mov dword [esp], edi
call sub.shlwapi.dll_PathFindExtensionW
sub esp, 4
test eax, eax
je 0x401c30
mov dword [esp + 4], 0x4054f4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
jne 0x401c30
mov eax, dword [ebp - 0x26c]
mov ecx, edi
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
call fcn.004019c0
test eax, eax
je 0x401d0a
nop
mov dword [esp + 4], esi
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindNextFileW]
sub esp, 8
test eax, eax
jne 0x401bc7
mov edi, dword [ebp - 0x270]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
mov edi, dword [edi]
cmp dword [ebp - 0x274], edi
jne 0x401a80
lea esp, [ebp - 0xc]
mov eax, 1
pop ebx
pop esi
pop edi
pop ebp
ret
cmp word [ebp - 0x238], 0
jne 0x401bdd
jmp 0x401c30
mov dword [esp], ebx
call sub.shlwapi.dll_PathFindExtensionW
sub esp, 4
test eax, eax
je 0x401cb7
mov dword [esp + 4], 0x4054f4
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_lstrcmpW]
sub esp, 8
test eax, eax
je 0x401cd9
mov dword [esp + 0xc], ebx
lea ebx, [ebp - 0x268]
mov dword [esp + 8], str._.8s.idt
mov dword [esp + 4], 0x104
mov dword [esp], ebx
call fcn.00401180
mov eax, dword [ebp - 0x26c]
mov ecx, ebx
mov edx, dword [eax + 8]
mov eax, dword [eax + 4]
call fcn.004019c0
test eax, eax
jne 0x401c56
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 1
jmp 0x401ac8
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_FindClose]
sub esp, 4
jmp 0x401cf4