Function at 0x41a7f0
Capabilities:
Check if file exists
Get file attributes
Get session user name
Link many functions at runtime
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1814
call fcn.0047d260
mov eax, dword [0x4d3804]
mov dword [ebp - 0xc], eax
push edi
mov dword [ebp - 0x1814], ecx
mov eax, dword [ebp - 0x1814]
cmp dword [eax], 0
jne 0x41a81e
xor eax, eax
jmp 0x41acea
push 0x1000
lea ecx, [ebp - 0x1410]
push ecx
push 0
call dword [sym.imp.kernel32.dll_GetModuleFileNameA]
test eax, eax
jbe 0x41a91e
push 0x4b2d08
lea edx, [ebp - 0x1410]
push edx
call fcn.0047d170
add esp, 8
lea eax, [ebp - 0x1410]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x41a91e
push 0x1000
lea ecx, [ebp - 0x1410]
push ecx
push 0x4b2cf8
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x41a8bb
push 0x4b2ccc
lea edx, [ebp - 0x1410]
push edx
call fcn.0047d170
add esp, 8
lea eax, [ebp - 0x1410]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41a8bb
lea ecx, [ebp - 0x1410]
push ecx
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 4], 0
jne 0x41a91e
push 0x1000
lea ecx, [ebp - 0x1410]
push ecx
push 0x4b2cf8
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x41a91e
push 0x4b2c9c
lea edx, [ebp - 0x1410]
push edx
call fcn.0047d170
add esp, 8
lea eax, [ebp - 0x1410]
push eax
call dword [sym.imp.kernel32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x41a91e
lea ecx, [ebp - 0x1410]
push ecx
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 4], 0
jne 0x41a93e
push 0x4b2c90
call dword [sym.imp.kernel32.dll_LoadLibraryA]
mov ecx, dword [ebp - 0x1814]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 0x1814]
cmp dword [edx + 4], 0
jne 0x41a951
xor eax, eax
jmp 0x41acea
push 0x4b2c80
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x2c], eax
push 0x4b2c74
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x10], eax
push 0x4b2c68
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x38], eax
push 0x4b2c58
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x24], eax
push 0x4b2c48
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x34], eax
push 0x4b2c2c
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x14], eax
push 0x4b2c14
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x18], eax
push 0x4b2c00
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x1c], eax
push 0x4b2bec
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x20], eax
push 0x4b2bd8
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x28], eax
push 0x4b2bc0
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x3c], eax
push 0x4b2bb0
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x30], eax
push 0x4b2b9c
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.kernel32.dll_GetProcAddress]
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x40], eax
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 0x10], 0
je 0x41ab5b
mov ecx, dword [ebp - 0x1814]
cmp dword [ecx + 0x14], 0
je 0x41ab5b
mov edx, dword [ebp - 0x1814]
cmp dword [edx + 0x1c], 0
je 0x41ab5b
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 0x20], 0
je 0x41ab5b
mov ecx, dword [ebp - 0x1814]
cmp dword [ecx + 0x24], 0
je 0x41ab5b
mov edx, dword [ebp - 0x1814]
cmp dword [edx + 0x28], 0
je 0x41ab5b
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 0x2c], 0
je 0x41ab5b
mov ecx, dword [ebp - 0x1814]
cmp dword [ecx + 0x34], 0
je 0x41ab5b
mov edx, dword [ebp - 0x1814]
cmp dword [edx + 0x38], 0
je 0x41ab5b
mov eax, dword [ebp - 0x1814]
cmp dword [eax + 0x3c], 0
je 0x41ab5b
mov ecx, dword [ebp - 0x1814]
cmp dword [ecx + 0x30], 0
jne 0x41ab8c
mov edx, dword [ebp - 0x1814]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.kernel32.dll_FreeLibrary]
mov ecx, dword [ebp - 0x1814]
mov dword [ecx + 4], 0
mov edx, dword [ebp - 0x1814]
mov dword [edx + 0x10], 0
xor eax, eax
jmp 0x41acea
cmp dword [ebp + 8], 0
je 0x41aba7
mov eax, dword [ebp + 8]
push eax
call fcn.0047d63e
add esp, 4
mov ecx, dword [ebp - 0x1814]
mov dword [ecx + 0xc], eax
push 0
mov edx, dword [ebp - 0x1814]
mov eax, dword [edx + 0xc]
push eax
mov ecx, dword [ebp - 0x1814]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x1814]
call dword [eax + 0x2c]
test eax, eax
jne 0x41abef
push 0
push 0
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push 0x4b2c80
mov ecx, dword [ebp - 0x1814]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax]
mov edx, dword [edx]
call dword [edx + 0x10]
mov eax, dword [ebp - 0x1814]
call dword [eax + 0x24]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
or ecx, 0x10
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
or edx, 0x200
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x1814]
call dword [ecx + 0x34]
mov dword [ebp - 4], eax
mov byte [ebp - 0x410], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x40f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov edx, dword [ebp - 0x1814]
cmp dword [edx + 0x40], 0
je 0x41ac8d
push 0x400
lea eax, [ebp - 0x410]
push eax
mov ecx, dword [ebp - 0x1814]
mov edx, dword [ecx + 8]
push edx
mov eax, dword [ebp - 0x1814]
call dword [eax + pe_nt_image_headers32]
test eax, eax
jne 0x41ac8d
push 0
push 0
call dword [sym.imp.kernel32.dll_GetLastError]
push eax
push 0x4b2b9c
mov ecx, dword [ebp - 0x1814]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x1814]
mov ecx, dword [eax]
mov edx, dword [edx]
call dword [edx + 0x10]
mov byte [ebp - 0x1810], 0
mov ecx, 0xff
xor eax, eax
lea edi, [ebp - 0x180f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 8], 0x400
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x1810]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
lea edx, [ebp - 0x1810]
push edx
mov eax, dword [ebp - 4]
push eax
lea ecx, [ebp - 0x410]
push ecx
mov edx, dword [ebp - 0x1814]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x1814]
mov ecx, dword [ecx]
mov edx, dword [eax]
call dword [edx + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
call fcn.0047bda9
pop edi
mov esp, ebp
pop ebp
ret 4