Function at 0x40a3f4
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x430
mov eax, dword [0x51f5d0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, 0x103
push esi
lea eax, [ebp - 0x10f]
mov edi, ecx
mov ebx, edx
push 0
push eax
mov dword [ebp - 0x42c], edi
mov dword [ebp - 0x430], ebx
mov byte [ebp - 0x110], 0
call fcn.004c05d0
add esp, 0xc
push esi
lea eax, [ebp - 0x31f]
push 0
push eax
mov byte [ebp - 0x320], 0
call fcn.004c05d0
add esp, 0xc
push esi
lea eax, [ebp - 0x217]
push 0
push eax
mov byte [ebp - 0x218], 0
call fcn.004c05d0
add esp, 0xc
push esi
xor esi, esi
lea eax, [ebp - 0x427]
push esi
push eax
mov byte [ebp - 0x428], 0
call fcn.004c05d0
add esp, 0xc
cmp dword [ebp + 8], esi
jne 0x40a490
mov dword [ebp + 8], 0x27
cmp edi, esi
jne 0x40a4a7
push 0x4e04c4
push esi
call fcn.00486ec0
pop ecx
pop ecx
mov dword [ebp - 0x42c], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov esi, 0x104
push esi
lea eax, [ebp - 0x110]
push eax
push str.ALLUSERSPROFILE
call edi
test eax, eax
je 0x40a595
cmp eax, esi
jae 0x40a595
lea edx, [ebp - 0x110]
call fcn.00485754
test eax, eax
jne 0x40a595
lea eax, [ebp - 0x110]
call fcn.00486263
mov edx, ebx
call fcn.00485754
test eax, eax
jne 0x40a507
mov ecx, ebx
lea ebx, [ebp - 0x110]
call fcn.00485edb
lea eax, [ebp - 0x110]
call fcn.00485e7f
test byte [ebp + 8], 0x10
je 0x40a534
lea eax, [ebp - 0x110]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a534
lea eax, [ebp - 0x110]
call fcn.004856d7
test byte [ebp + 8], 0x20
je 0x40a5a0
lea edx, [ebp - 0x110]
call fcn.00485754
test eax, eax
jne 0x40a5a0
lea eax, [ebp - 0x110]
push eax
mov ecx, esi
lea eax, [ebp - 0x428]
call fcn.00485786
pop ecx
mov ecx, str.__TestFile_PleaseDelete__.txt
mov ebx, eax
call fcn.00485edb
mov eax, ebx
push str.This_file_should_not_exist.__Please_delete.
push eax
call fcn.0041bbfa
test eax, eax
pop ecx
pop ecx
jne 0x40a588
lea eax, [ebp - 0x110]
call fcn.004856d7
lea eax, [ebp - 0x428]
call fcn.0041a0f3
jmp 0x40a5a0
lea eax, [ebp - 0x110]
call fcn.004856d7
push esi
lea eax, [ebp - 0x320]
push eax
push str.PUBLIC
call edi
test eax, eax
je 0x40a68b
cmp eax, esi
jae 0x40a68b
lea edx, [ebp - 0x320]
call fcn.00485754
test eax, eax
jne 0x40a68b
lea eax, [ebp - 0x320]
call fcn.00486263
mov edx, dword [ebp - 0x430]
call fcn.00485754
test eax, eax
jne 0x40a5fd
mov ecx, dword [ebp - 0x430]
lea ebx, [ebp - 0x320]
call fcn.00485edb
lea eax, [ebp - 0x320]
call fcn.00485e7f
test byte [ebp + 8], 0x10
je 0x40a62a
lea eax, [ebp - 0x320]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a62a
lea eax, [ebp - 0x320]
call fcn.004856d7
test byte [ebp + 8], 0x20
je 0x40a696
lea edx, [ebp - 0x320]
call fcn.00485754
test eax, eax
jne 0x40a696
lea eax, [ebp - 0x320]
push eax
mov ecx, esi
lea eax, [ebp - 0x428]
call fcn.00485786
pop ecx
mov ecx, str.__TestFile_PleaseDelete__.txt
mov ebx, eax
call fcn.00485edb
mov eax, ebx
push str.This_file_should_not_exist.__Please_delete.
push eax
call fcn.0041bbfa
test eax, eax
pop ecx
pop ecx
jne 0x40a67e
lea eax, [ebp - 0x320]
call fcn.004856d7
lea eax, [ebp - 0x428]
call fcn.0041a0f3
jmp 0x40a696
lea eax, [ebp - 0x320]
call fcn.004856d7
push esi
lea eax, [ebp - 0x218]
push eax
push str.USERPROFILE
call edi
test eax, eax
je 0x40a781
cmp eax, esi
jae 0x40a781
lea edx, [ebp - 0x218]
call fcn.00485754
test eax, eax
jne 0x40a781
lea eax, [ebp - 0x218]
call fcn.00486263
mov edx, dword [ebp - 0x430]
call fcn.00485754
test eax, eax
jne 0x40a6f3
mov ecx, dword [ebp - 0x430]
lea ebx, [ebp - 0x218]
call fcn.00485edb
lea eax, [ebp - 0x218]
call fcn.00485e7f
test byte [ebp + 8], 0x10
je 0x40a720
lea eax, [ebp - 0x218]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a720
lea eax, [ebp - 0x218]
call fcn.004856d7
test byte [ebp + 8], 0x20
je 0x40a78c
lea edx, [ebp - 0x218]
call fcn.00485754
test eax, eax
jne 0x40a78c
lea eax, [ebp - 0x218]
push eax
mov ecx, esi
lea eax, [ebp - 0x428]
call fcn.00485786
pop ecx
mov ecx, str.__TestFile_PleaseDelete__.txt
mov ebx, eax
call fcn.00485edb
mov eax, ebx
push str.This_file_should_not_exist.__Please_delete.
push eax
call fcn.0041bbfa
test eax, eax
pop ecx
pop ecx
jne 0x40a774
lea eax, [ebp - 0x218]
call fcn.004856d7
lea eax, [ebp - 0x428]
call fcn.0041a0f3
jmp 0x40a78c
lea eax, [ebp - 0x218]
call fcn.004856d7
lea eax, [ebp - 0x320]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
je 0x40a7b2
lea eax, [ebp - 0x320]
push eax
mov ecx, esi
lea eax, [ebp - 0x110]
call fcn.00485786
pop ecx
mov al, byte [ebp + 8]
test al, 1
je 0x40a82f
test al, 2
je 0x40a839
test al, 8
je 0x40a7fc
lea eax, [ebp - 0x218]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
je 0x40a7da
lea eax, [ebp - 0x218]
jmp 0x40a83f
lea eax, [ebp - 0x110]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a839
lea edx, [ebp - 0x218]
call fcn.00485754
test eax, eax
jne 0x40a839
jmp 0x40a7d2
lea eax, [ebp - 0x110]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a839
lea eax, [ebp - 0x218]
push eax
call fcn.0041a61c
test eax, eax
pop ecx
jne 0x40a7d2
lea edx, [ebp - 0x110]
call fcn.00485754
test eax, eax
je 0x40a839
jmp 0x40a7d2
test al, 2
lea eax, [ebp - 0x218]
jne 0x40a83f
lea eax, [ebp - 0x110]
push eax
mov eax, dword [ebp - 0x42c]
mov ecx, esi
call fcn.00485786
pop ecx
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bfeb5
leave
ret