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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d896
mov eax, dword fs:[0]
push eax
mov eax, 0x2938
call fcn.00402160
mov eax, dword [0x414004]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x114]
xor bl, bl
push 0
push eax
call fcn.00403b70
add esp, 0xc
lea eax, [ebp - 0x114]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecA]
mov dword [ebp - 0x2930], 0xf
mov dword [ebp - 0x2934], 0
mov byte [ebp - 0x2944], bl
cmp byte [ebp - 0x114], bl
jne 0x4011d1
xor ecx, ecx
jmp 0x4011e9
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4011e0
sub ecx, edx
push ecx
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x2944]
call fcn.00401b20
push str.libcef.dll
lea eax, [ebp - 0x2944]
mov dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x292c]
push eax
call section..text
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x401226
mov eax, dword [eax]
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
push eax
call esi
test eax, eax
mov eax, dword [ebp - 0x2918]
sete bh
cmp eax, 0x10
jb 0x401252
inc eax
lea ecx, [ebp - 0x292c]
push eax
push dword [ebp - 0x292c]
call fcn.00401c20
test bh, bh
je 0x4014a6
push 1
push 0x40e17c
lea ecx, [ebp - 0x2944]
call fcn.004018c0
push 0xd
push str.3.3325.1758.0
lea ecx, [ebp - 0x2944]
call fcn.004018c0
push 1
push 0x40e17c
lea ecx, [ebp - 0x2944]
call fcn.004018c0
push str.libcef.dll
lea eax, [ebp - 0x2944]
push eax
lea eax, [ebp - 0x292c]
push eax
call section..text
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x4012b3
mov eax, dword [eax]
push eax
call esi
mov edi, eax
mov eax, dword [ebp - 0x2918]
cmp eax, 0x10
jb 0x4012d6
inc eax
lea ecx, [ebp - 0x292c]
push eax
push dword [ebp - 0x292c]
call fcn.00401c20
test edi, edi
jne 0x4013bd
cmp byte [ebp - 0x114], 0
jne 0x4012eb
xor ecx, ecx
jmp 0x4012fd
lea ecx, [ebp - 0x114]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4012f4
sub ecx, edx
push ecx
lea eax, [ebp - 0x114]
push eax
lea ecx, [ebp - 0x2944]
call fcn.00401b20
push 0xf
push str.....embcore_
lea ecx, [ebp - 0x2944]
call fcn.004018c0
push 0xd
push str.3.3325.1758.0
lea ecx, [ebp - 0x2944]
call fcn.004018c0
push 1
push 0x40e17c
lea ecx, [ebp - 0x2944]
call fcn.004018c0
cmp dword [ebp - 0x2930], 0x10
lea ecx, [ebp - 0x114]
push 0
push ecx
lea eax, [ebp - 0x2944]
cmovae eax, dword [ebp - 0x2944]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
cmp eax, 0x104
jae 0x4014e2
mov byte [ebp + eax - 0x114], 0
lea eax, [ebp - 0x2944]
push str.libcef.dll
push eax
lea eax, [ebp - 0x292c]
push eax
call section..text
add esp, 0xc
cmp dword [eax + 0x14], 0x10
jb 0x4013a5
mov eax, dword [eax]
push eax
call esi
lea ecx, [ebp - 0x292c]
mov esi, eax
call fcn.00401100
test esi, esi
je 0x4014a6
push 0x2800
lea eax, [ebp - 0x2914]
mov bl, 1
push 0
push eax
call fcn.00403b70
add esp, 0xc
lea eax, [ebp - 0x2914]
push 0x2800
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x2914], 0
mov dword [ebp - 0x2918], 0xf
mov dword [ebp - 0x291c], 0
mov byte [ebp - 0x292c], 0
jne 0x401414
xor ecx, ecx
jmp 0x401429
lea ecx, [ebp - 0x2914]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x401420
sub ecx, edx
push ecx
lea eax, [ebp - 0x2914]
push eax
lea ecx, [ebp - 0x292c]
call fcn.00401b20
push 1
push 0x40e1a8
lea ecx, [ebp - 0x292c]
mov byte [ebp - 4], 1
call fcn.004018c0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x2944]
push eax
lea ecx, [ebp - 0x292c]
call fcn.004017c0
cmp dword [ebp - 0x2918], 0x10
lea eax, [ebp - 0x292c]
cmovae eax, dword [ebp - 0x292c]
push eax
push str.PATH
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
mov eax, dword [ebp - 0x2918]
cmp eax, 0x10
jb 0x4014a6
inc eax
lea ecx, [ebp - 0x292c]
push eax
push dword [ebp - 0x292c]
call fcn.00401c20
mov ecx, dword [ebp - 0x2930]
cmp ecx, 0x10
jb 0x4014c4
inc ecx
push ecx
push dword [ebp - 0x2944]
lea ecx, [ebp - 0x2944]
call fcn.00401c20
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040214a
mov esp, ebp
pop ebp
ret
call fcn.0040206e
int3