Function at 0x401dd0
Capabilities:
Allocate or change rwx memory
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
mov eax, dword [0x6b7040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x114], eax
push edi
mov edi, dword [ebp + 0xc]
test esi, esi
jne 0x401e0b
pop edi
lea eax, [esi + 2]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [ebp - 0x108]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp byte [esi + 1], 0x3a
je 0x401e42
push 0
lea eax, [ebp - 0x108]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea esi, [ebp - 0x108]
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 0x18]
sub eax, 0
je 0x401e98
sub eax, 1
je 0x401e7b
sub eax, 1
jne 0x401fd7
push ebx
push dword [ebp + 0x14]
push edi
push esi
call fcn.00402300
add esp, 0x10
pop ebx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret
push ebx
push dword [ebp + 0x14]
push edi
push esi
call fcn.00402040
mov ecx, eax
add esp, 0x10
test ecx, ecx
je 0x401fd7
jmp 0x401fe4
test edi, edi
jne 0x401ea4
lea ecx, [edi + 1]
jmp 0x401fe4
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x401eba
mov ecx, 2
jmp 0x401fe4
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push 0x40
push 0x3000
push eax
push 0
push edi
mov dword [ebp - 0x10c], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
test ebx, ebx
jne 0x401ef1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x6b7290], eax
lea ecx, [ebx + 3]
jmp 0x401fe4
push 0
push dword [ebp - 0x10c]
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x401f2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push 0
push ebx
push edi
mov dword [0x6b7290], eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov ecx, 0x80000003
jmp 0x401fe4
mov al, byte [ebp + 0x18]
push 0
and al, 1
mov dword [ebp - 0x110], 0
movzx eax, al
push eax
push dword [ebp + 0x14]
push ebx
push dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push edi
call fcn.00402950
add esp, 0x18
mov dword [ebp - 0x10c], eax
test eax, eax
jne 0x401f71
push 0x8000
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov ecx, 0x80000001
jmp 0x401fe4
cmp byte [ebp + 0x14], 0
jne 0x401fa1
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
lea eax, [ebp - 0x110]
push eax
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401fab
mov dword [ebp - 0x110], 1
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
cmp dword [ebp - 0x110], 0
jne 0x401fd4
mov dword [0x6b7290], 0
mov ecx, 0x80000000
jmp 0x401fe4
mov ebx, dword [ebp + 0x18]
push ebx
push edi
push esi
call fcn.00401780
add esp, 0xc
mov ecx, eax
mov edx, dword [ebp - 0x114]
test edx, edx
je 0x401ff5
mov eax, dword [0x6b7290]
mov dword [edx], eax
mov eax, ecx
mov ecx, dword [ebp - 4]
pop ebx
pop edi
xor ecx, ebp
pop esi
call fcn.00403dbb
mov esp, ebp
pop ebp
ret