Function at 0x418430
Capabilities:
Get process image filename
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x81c
mov eax, dword [0x448458]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x817]
push edi
mov edi, dword [ebp + 0xc]
push 0x7ff
push 0
push eax
mov byte [ebp - 0x818], 0
call fcn.0042d5f0
add esp, 0xc
mov dword [edi + 4], esi
push esi
push 0
push 0x410
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4186f4
test ebx, ebx
je 0x4186f4
cmp dword [0x46f1e8], 0
push edi
push ebx
je 0x41849f
call fcn.00418220
jmp 0x4184a4
call fcn.00418120
test byte [edi], 0x1e
je 0x418530
cmp dword [edi + 0x78], 0
jne 0x4184f4
push 0x800
lea eax, [ebp - 0x818]
mov byte [ebp - 0x818], 0
push eax
push ebx
call dword [sym.imp.PSAPI.DLL_GetProcessImageFileNameA]
test eax, eax
je 0x4184dc
lea ecx, [ebp - 0x818]
call fcn.004171e0
cmp byte [ebp - 0x818], 0
je 0x4184f4
lea eax, [ebp - 0x818]
push eax
lea ecx, [edi + 0x68]
call fcn.00401720
cmp dword [edi + 4], 4
jne 0x418530
push 0x800
lea eax, [ebp - 0x818]
mov byte [ebp - 0x818], 0
push eax
push str._SystemRoot_System32_ntoskrnl.exe
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
cmp byte [ebp - 0x818], 0
je 0x418530
lea eax, [ebp - 0x818]
push eax
lea ecx, [edi + 0x68]
call fcn.00401720
cmp dword [edi + 0x78], 0
je 0x418654
cmp dword [edi + 0x7c], 0x10
lea esi, [edi + 0x68]
jb 0x418547
mov eax, dword [esi]
jmp 0x418549
mov eax, esi
push 0x800
lea ecx, [ebp - 0x818]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetLongPathNameA]
test eax, eax
je 0x41856e
lea eax, [ebp - 0x818]
mov ecx, esi
push eax
call fcn.00401720
test byte [edi], 0x10
je 0x418587
cmp dword [esi + 0x14], 0x10
jb 0x41857d
mov ecx, dword [esi]
jmp 0x41857f
mov ecx, esi
call fcn.00417410
mov dword [edi + 0x28], eax
test byte [edi], 2
je 0x4185b1
cmp dword [esi + 0x14], 0x10
jb 0x418596
mov eax, dword [esi]
jmp 0x418598
mov eax, esi
push 0x5c
push eax
call fcn.00425db0
add esp, 8
test eax, eax
je 0x4185b1
inc eax
lea ecx, [edi + 0x50]
push eax
call fcn.00401720
test byte [edi], 8
je 0x418654
cmp dword [esi + 0x14], 0x10
xorps xmm0, xmm0
mov byte [ebp - 0x14], 0
movq qword [ebp - 0x13], xmm0
mov dword [ebp - 0xb], 0
mov word [ebp - 7], 0
mov byte [ebp - 5], 0
jb 0x4185df
mov esi, dword [esi]
push ecx
lea edx, [ebp - 0x14]
mov ecx, esi
call fcn.00419a80
add esp, 4
test eax, eax
je 0x418654
movzx eax, byte [ebp - 5]
push eax
movzx eax, byte [ebp - 6]
push eax
movzx eax, byte [ebp - 7]
push eax
movzx eax, byte [ebp - 8]
push eax
movzx eax, byte [ebp - 9]
push eax
movzx eax, byte [ebp - 0xa]
push eax
movzx eax, byte [ebp - 0xb]
push eax
movzx eax, byte [ebp - 0xc]
push eax
movzx eax, byte [ebp - 0xd]
push eax
movzx eax, byte [ebp - 0xe]
push eax
movzx eax, byte [ebp - 0xf]
push eax
movzx eax, byte [ebp - 0x10]
push eax
movzx eax, byte [ebp - 0x11]
push eax
movzx eax, byte [ebp - 0x12]
push eax
movzx eax, byte [ebp - 0x13]
push eax
movzx eax, byte [ebp - 0x14]
push eax
push str._02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x_02x
lea eax, [edi + 0x2c]
push 0x24
push eax
call fcn.00425624
add esp, 0x4c
cmp dword [edi + 0x60], 0
je 0x418666
mov eax, dword [edi + 8]
test eax, eax
je 0x418666
cmp eax, 0xffffffff
jne 0x4186d5
test byte [edi], 2
lea eax, [edi + 8]
mov ecx, dword [edi + 4]
push eax
je 0x4186c9
push 0x800
lea edx, [ebp - 0x818]
mov byte [ebp - 0x818], 0
call fcn.00417110
add esp, 8
cmp byte [ebp - 0x818], 0
je 0x4186d5
cmp dword [edi + 0x60], 0
jne 0x4186d5
lea eax, [ebp - 0x818]
push eax
lea ecx, [edi + 0x50]
call fcn.00401720
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422f38
mov esp, ebp
pop ebp
ret 8
push 0
xor edx, edx
call fcn.00417110
add esp, 8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00422f38
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00422f38
mov esp, ebp
pop ebp
ret 8