Function at 0x403fd4
Capabilities:
Enumerate files on windows
Query environment variable
Set current directory

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff590
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0xa6c], ebx
mov dword [ebp - 0xa70], ebx
mov dword [ebp - 0xa60], ebx
mov dword [ebp - 0xa64], ebx
mov dword [ebp - 0xa68], ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
mov eax, dword [ebp - 4]
call sub.rtl170.bpl__System__UStrAddRef_qqrpv
mov eax, dword [ebp + 0x10]
call sub.rtl170.bpl__System__UStrAddRef_qqrpv
mov eax, dword [ebp + 8]
call sub.rtl170.bpl__System__UStrAddRef_qqrpv
xor eax, eax
push ebp
push 0x4041a9
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x800
lea eax, [ebp - 0x80c]
push eax
mov eax, dword [ebp + 0x10]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_ExpandEnvironmentStringsW
lea edx, [ebp - 8]
lea eax, [ebp - 0x80c]
call sub.rtl170.bpl__System_Sysutils_StrPas_qqrpxb
mov eax, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_SetCurrentDirectoryW
lea eax, [ebp - 0xc]
mov ecx, 0x4041c8
mov edx, dword [ebp - 8]
call sub.rtl170.bpl__System__UStrCat3_qqrr20System_UnicodeStringx20System_UnicodeStringt2
lea eax, [ebp - 0xa5c]
push eax
mov eax, dword [ebp - 0xc]
call sub.rtl170.bpl__System__UStrToPWChar_qqrx20System_UnicodeString
push eax
call sub.kernel32.dll_FindFirstFileW
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404168
lea eax, [ebp - 0xa60]
push eax
lea eax, [ebp - 0xa68]
lea edx, [ebp - 0xa30]
mov ecx, 0x104
call sub.rtl170.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov eax, dword [ebp - 0xa68]
lea edx, [ebp - 0xa64]
call sub.rtl170.bpl__System_Sysutils_ExtractFileName_qqrx20System_UnicodeString
mov eax, dword [ebp - 0xa64]
mov ecx, 1
xor edx, edx
call sub.rtl170.bpl__System__UStrCopy_qqrx20System_UnicodeStringii
mov eax, dword [ebp - 0xa60]
mov edx, 0x4041e0
call sub.rtl170.bpl__System__UStrEqual_qqrv
je 0x40414d
push dword [ebp - 8]
push 0x4041f0
lea eax, [ebp - 0xa70]
lea edx, [ebp - 0xa30]
mov ecx, 0x104
call sub.rtl170.bpl__System__UStrFromWArray_qqrr20System_UnicodeStringpbi
mov eax, dword [ebp - 0xa70]
lea edx, [ebp - 0xa6c]
call sub.rtl170.bpl__System_Sysutils_ExtractFileName_qqrx20System_UnicodeString
push dword [ebp - 0xa6c]
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl170.bpl__System__UStrCatN_qqrv
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 8]
push eax
push 1
push 0
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [ebp - 4]
mov edx, edi
mov eax, esi
call fcn.00403b40
lea eax, [ebp - 0xa5c]
push eax
push ebx
call sub.kernel32.dll_FindNextFileW
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x404099
push ebx
call sub.kernel32.dll_FindClose
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4041b0
lea eax, [ebp - 0xa70]
mov edx, 5
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp - 0xc]
mov edx, 3
call sub.rtl170.bpl__System__UStrArrayClr_qqrpvi
lea eax, [ebp + 8]
call sub.rtl170.bpl__System__UStrClr_qqrpv
lea eax, [ebp + 0x10]
call sub.rtl170.bpl__System__UStrClr_qqrpv
ret