Function at 0x10004010
Capabilities:
Check if file exists
Query environment variable

Disassembly:
sub esp, 0x260
mov eax, dword [0x1001d240]
xor eax, esp
mov dword [esp + 0x25c], eax
mov eax, dword [esp + 0x26c]
push ebx
mov ebx, dword [esp + 0x26c]
push ebp
mov ebp, dword [esp + 0x26c]
push esi
push edi
push 0x400
push 0
push 0x1001e5a8
mov dword [esp + 0x1c], eax
call fcn.10009d80
add esp, 0xc
push 0x400
push 0x1001e5a8
push str.SystemRoot
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov eax, 0x1001e5a8
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x10004070
mov ecx, dword [str.winsxs_]
mov edx, dword [0x10018290]
mov dword [eax], ecx
mov cl, byte [0x10018294]
mov dword [eax + 4], edx
mov byte [eax + 8], cl
mov eax, ebp
mov ecx, ebp
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x10004096
mov edi, 0x1001e5a8
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100040a7
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x1001e5a8
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x100040c3
mov dx, word [0x10018288]
mov eax, ebx
mov word [edi], dx
mov ecx, eax
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x100040e0
mov edi, 0x1001e5a8
sub eax, ecx
mov esi, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x100040f1
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push 0x1001e5a8
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1000426e
push 0x64
lea eax, [esp + 0x1a8]
push 0
push eax
call fcn.10009d80
push 0x64
lea ecx, [esp + 0xec]
push 0
push ecx
call fcn.10009d80
push 0x64
lea edx, [esp + 0x30]
push 0
push edx
call fcn.10009d80
push 0x64
lea eax, [esp + 0x168]
push 0
push eax
call fcn.10009d80
push 0x64
lea ecx, [esp + 0xac]
push 0
push ecx
call fcn.10009d80
push 0x64
lea edx, [esp + 0x248]
push 0
push edx
call fcn.10009d80
add esp, 0x48
lea eax, [esp + 0x208]
push eax
lea ecx, [esp + 0x7c]
push ecx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x14c]
push eax
lea ecx, [esp + 0xec]
push ecx
lea edx, [esp + 0x1b8]
push edx
push ebp
call fcn.10003d80
add esp, 0x1c
test al, al
je 0x1000426e
mov ebp, dword [esp + 0x280]
xor ebx, ebx
test ebp, ebp
jle 0x1000426e
mov esi, dword [esp + 0x10]
add esi, 0x190
jmp 0x100041e0
lea eax, [esi - 0x190]
push eax
lea ecx, [esp + 0x1a8]
push ecx
call fcn.1000ac1f
add esp, 8
test eax, eax
jne 0x1000425f
lea edi, [esi - 0xc8]
lea edx, [edi - 0x64]
push edx
lea eax, [esp + 0xe0]
push eax
call fcn.1000ac1f
add esp, 8
test eax, eax
jne 0x1000425f
lea ecx, [esp + 0x14]
push edi
push ecx
call fcn.1000ac1f
add esp, 8
test eax, eax
jne 0x1000425f
mov al, byte [esi]
test al, al
je 0x10004247
cmp al, 0x2a
je 0x10004247
lea edx, [esp + 0x78]
push esi
push edx
call fcn.1000ac1f
add esp, 8
test eax, eax
jne 0x1000425f
lea eax, [esi - 0x64]
push eax
lea ecx, [esp + 0x144]
push ecx
call fcn.1000ac1f
add esp, 8
test eax, eax
jge 0x10004289
inc ebx
add esi, 0x258
cmp ebx, ebp
jl 0x100041e0
xor eax, eax
mov ecx, dword [esp + 0x26c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.10009d36
add esp, 0x260
ret
mov eax, 0x1001e5a8
jmp 0x10004270