Function at 0x4089f0
Capabilities:
Check for sandbox username or hostname
Check if file exists
Enumerate files on windows
Get common file path
Get file attributes
Get file size
Get hostname
Get memory capacity
Get session user name
Query environment variable
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x188c
call fcn.00409750
push ebx
push esi
push edi
xor eax, eax
mov byte [ebp + eax - 0xc58], 0
inc eax
cmp eax, 0x348
jb 0x408a02
mov edi, dword [sym.imp.USER32.dll_EnumDisplayDevicesW]
lea eax, [ebp - 0xc58]
xor esi, esi
mov dword [ebp - 0xc58], 0x348
push esi
push eax
push esi
push esi
call edi
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
test eax, eax
je 0x408aaa
nop word [eax + eax]
push 0x401f28
lea eax, [ebp - 0xc14]
inc esi
push eax
call ebx
test eax, eax
jne 0x408b45
push 0x401f38
lea eax, [ebp - 0xc14]
push eax
call ebx
test eax, eax
jne 0x408b45
push 0x401f48
lea eax, [ebp - 0xc14]
push eax
call ebx
test eax, eax
jne 0x408b45
push 0x401f7c
lea eax, [ebp - 0xc14]
push eax
call ebx
test eax, eax
jne 0x408b45
push eax
lea eax, [ebp - 0xc58]
push eax
push esi
push 0
call edi
test eax, eax
jne 0x408a40
push 0x401c70
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push 0x401c7c
push edi
call esi
push 0x401c9c
push edi
mov dword [ebp - 0xc], eax
call esi
mov esi, eax
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x408ae6
lea ecx, [ebp - 4]
push ecx
call eax
mov edi, dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x1068]
push 0x104
push eax
push 0x401fb0
call edi
push 0x104
lea eax, [ebp - 0x1270]
push eax
push 0x402000
call edi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x1068]
push eax
call edi
cmp eax, 0xffffffff
je 0x408b4e
test al, 0x10
jne 0x408b4e
lea eax, [ebp - 0x1270]
push eax
call edi
cmp eax, 0xffffffff
je 0x408b4e
test al, 0x10
jne 0x408b4e
test esi, esi
je 0x408b45
push dword [ebp - 4]
call esi
mov al, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x408b57
push dword [ebp - 4]
call esi
mov esi, dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x910]
push eax
push 0
push 0
push 0
push 0
call esi
lea eax, [ebp - 0xe60]
push eax
push 0
push 0
push 5
push 0
call esi
push 0x402048
lea eax, [ebp - 0x910]
push eax
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x2b0]
push eax
call edi
cmp eax, 0xffffffff
je 0x408baa
test al, 0x10
je 0x408b45
xor esi, esi
mov dword [ebp - 0x2c], 0x402060
mov dword [ebp - 0x28], 0x40207c
lea edi, [ebp - 0x2c]
mov dword [ebp - 0x24], 0x402094
mov dword [ebp - 0x20], 0x4020ac
mov dword [ebp - 0x1c], 0x4020c0
lea ebx, [esi + 5]
push dword [edi]
lea eax, [ebp - 0xe60]
push eax
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x408c05
test al, 0x10
jne 0x408c05
mov cl, 1
jmp 0x408c07
xor cl, cl
test cl, cl
lea eax, [esi + 1]
cmove eax, esi
add edi, 4
mov esi, eax
sub ebx, 1
jne 0x408bd5
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
cmp esi, 5
je 0x408b45
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x910]
push 0x4020d8
push eax
lea eax, [ebp - 0x2b0]
push eax
call esi
push 0x4020f4
lea eax, [ebp - 0x910]
push eax
lea eax, [ebp - 0x1478]
push eax
call esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
lea eax, [ebp - 0x2b0]
push eax
call esi
cmp eax, 0xffffffff
je 0x408dee
test al, 0x10
jne 0x408dee
lea eax, [ebp - 0x1478]
push eax
call esi
cmp eax, 0xffffffff
je 0x408dee
test al, 0x10
jne 0x408dee
push 0
push 0x80
push 3
push 0
push 3
push connect
lea eax, [ebp - 0x2b0]
mov dword [ebp - 0x10], 0
push eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x408d0e
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 8
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
test eax, eax
je 0x408d07
push 0
lea ecx, [ebp - 0x40]
push ecx
push dword [ebp - 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x10], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
lea eax, [ebp - 0x2b0]
push edi
push 0x80
push 3
push edi
push 3
push connect
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x408d78
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 8
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x408d6f
push 0
lea eax, [ebp - 0x18]
push eax
push dword [ebp - 0x14]
push edi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 4
mov byte [ebp - 8], 0
jne 0x408db9
cmp dword [ebp - 0xc], 4
jne 0x408db9
push 0x40210c
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
test eax, eax
jne 0x408db9
push 0x40210c
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov ecx, dword [ebp - 8]
test eax, eax
movzx ecx, cl
mov eax, 1
cmove ecx, eax
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 4]
test eax, eax
je 0x408dd0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
test edi, edi
je 0x408de4
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp byte [ebp - 8], 0
jne 0x408b45
push 0x402114
lea eax, [ebp - 0x910]
push eax
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0x2b0]
push eax
call esi
cmp eax, 0xffffffff
je 0x408ed9
test al, 0x10
jne 0x408ed9
xor edi, edi
mov dword [ebp - 0x10], 0
push edi
push 0x80
push 3
push edi
push 3
push connect
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x408e92
push edi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push 8
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x408e89
push 0
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x18]
push edi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x10], eax
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x10], 0x37
mov byte [ebp - 8], 0
jne 0x408ebb
push 0x402130
push edi
call dword [sym.imp.KERNEL32.dll_lstrcmpA]
mov ecx, dword [ebp - 8]
test eax, eax
movzx ecx, cl
mov eax, 1
cmove ecx, eax
mov dword [ebp - 8], ecx
test edi, edi
je 0x408ecf
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
cmp byte [ebp - 8], 0
jne 0x408b45
push 0x104
lea eax, [ebp - 0x2b0]
push eax
push 0x402168
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x2b0]
push eax
call esi
cmp eax, 0xffffffff
je 0x408f06
test al, 0x10
jne 0x408f06
mov al, 1
jmp 0x408f08
xor al, al
test al, al
je 0x408f2d
lea eax, [ebp - 0x3c]
push eax
push 0
lea eax, [ebp - 0x2b0]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
je 0x408f2d
cmp dword [ebp - 0x1c], 0x37
je 0x408b45
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0x10
push eax
lea eax, [ebp - 0x68]
mov dword [ebp - 0x48], 0x101
push eax
call dword [sym.imp.KERNEL32.dll_GetComputerNameW]
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x708]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0
call esi
push 1
mov dword [ebp - 0x18], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
xor esi, esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x34], 0x4021b8
mov dword [ebp - 0x30], 0x4021cc
mov dword [ebp - 0x2c], 0x4021f4
mov dword [ebp - 0x28], 0x40220c
mov dword [ebp - 0x24], 0x40221c
mov dword [ebp - 0x20], 0x402238
mov dword [ebp - 0x1c], 0x402260
nop word [eax + eax]
movzx eax, si
push dword [ebp + eax*4 - 0x34]
lea eax, [ebp - 0x708]
push eax
call edi
test eax, eax
je 0x408b45
inc esi
cmp si, 7
jb 0x408fb0
push 0x40227c
lea eax, [ebp - 0x708]
push eax
call dword [sym.imp.SHLWAPI.dll_StrStrW]
test eax, eax
jne 0x408b45
push 0x40228c
lea eax, [ebp - 0x708]
push eax
call edi
test eax, eax
jne 0x40900e
push 0x402298
lea eax, [ebp - 0x68]
push eax
call edi
test eax, eax
je 0x408b45
mov dword [ebp - 0x24], 0x4022b8
xor esi, esi
mov dword [ebp - 0x20], 0x4022d4
mov dword [ebp - 0x1c], 0x4022e8
movzx eax, si
push dword [ebp + eax*4 - 0x24]
lea eax, [ebp - 0x68]
push eax
call edi
test eax, eax
je 0x408b45
inc esi
cmp si, 3
jb 0x409025
lea eax, [ebp - 0xa8]
mov dword [ebp - 0xa8], 0x40
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov esi, dword [ebp - 0xa0]
mov eax, dword [ebp - 0x9c]
shrd esi, eax, 0x14
cmp esi, 0xbea
jb 0x408b45
push 0x4022fc
lea eax, [ebp - 0x708]
push eax
call edi
test eax, eax
jne 0x4090a1
push 0x402308
lea eax, [ebp - 0x68]
push eax
call edi
test eax, eax
jne 0x4090a1
cmp esi, 0xdac
jb 0x408b45
cmp dword [ebp - 0x18], 0x500
jne 0x4090e5
cmp dword [ebp - 0x14], 0x2d0
jne 0x4090e5
cmp esi, 0x1004
jae 0x4090e5
push 0x402318
lea eax, [ebp - 0x708]
push eax
call edi
test eax, eax
jne 0x4090e5
cmp word [ebp - 0x68], ax
je 0x4090e5
inc eax
cmp word [ebp + eax*2 - 0x68], 0
jne 0x4090d3
cmp eax, 8
je 0x408b45
push 0x402324
lea eax, [ebp - 0xe60]
push eax
lea eax, [ebp - 0x1680]
push eax
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
xor eax, eax
mov byte [ebp + eax - 0x500], 0
inc eax
cmp eax, 0x250
jb 0x409100
lea eax, [ebp - 0x500]
push eax
lea eax, [ebp - 0x1680]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0xc], eax
cmp eax, 0xffffffff
je 0x409222
xor esi, esi
mov ebx, eax
mov dword [ebp - 4], esi
nop word [eax + eax]
push 0x402328
lea eax, [ebp - 0x4d4]
push eax
call edi
test eax, eax
je 0x4091f4
push 0x40232c
lea eax, [ebp - 0x4d4]
push eax
call edi
test eax, eax
je 0x4091f4
movzx esi, word [ebp - 0x4d4]
lea ecx, [ebp - 0x4d4]
xor edx, edx
test si, si
je 0x409197
cmp si, 0x2e
mov eax, ecx
movzx esi, word [ecx + 2]
cmovne eax, edx
add ecx, 2
mov edx, eax
test si, si
jne 0x409180
test edx, edx
lea esi, [edx + 2]
push 0x402334
cmove esi, edx
push esi
call edi
test eax, eax
je 0x4091cf
push 0x40233c
push esi
call edi
test eax, eax
je 0x4091cf
push 0x402348
push esi
call edi
test eax, eax
je 0x4091cf
push 0x402350
push esi
call edi
test eax, eax
jne 0x4091f1
lea eax, [ebp - 0x4d4]
sub esi, eax
and esi, 0xfffffffe
cmp esi, 0x1e
mov esi, dword [ebp - 4]
jne 0x4091f4
cmp dword [ebp - 0x4e0], 0xf
jne 0x4091f4
inc esi
mov dword [ebp - 4], esi
jmp 0x4091f4
mov esi, dword [ebp - 4]
lea eax, [ebp - 0x500]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x409140
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ebx, dword [sym.imp.SHLWAPI.dll_StrStrIW]
cmp esi, 0x14
ja 0x408b45
push 0x104
lea eax, [ebp - 0x1888]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x40235c
lea eax, [ebp - 0x1888]
push eax
call ebx
pop edi
test eax, eax
pop esi
sete al
pop ebx
mov esp, ebp
pop ebp
ret