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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47dfad
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4b5200]
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
mov esi, edx
mov dword [ebp - 0x44], esi
mov ebx, ecx
mov dword [ebp - 0x4c], ebx
cmp dword [ebx], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x28], eax
jne 0x40a904
push 2
call fcn.0046b90c
add esp, 4
mov dword [ebx], eax
xor ecx, ecx
mov word [eax], cx
mov dword [ebx + 4], ecx
mov ecx, dword [ebp + 0xc]
mov edx, 2
mov byte [ebx + 8], 1
mov edi, ecx
mov ebx, dword [ebx]
test ebx, ebx
setne al
mov byte [esi + 8], al
test ebx, ebx
je 0x40a9bd
cmp ecx, 1
jge 0x40a938
xor edi, edi
cmp word [ebx], di
je 0x40a938
inc edi
cmp word [ebx + edi*2], 0
jne 0x40a930
mov eax, dword [esi]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], eax
xor ecx, ecx
mov dword [ebp - 4], 0
lea eax, [edi + 1]
mov dword [esi + 4], 0
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov ecx, dword [esi + 4]
add esp, 4
mov dword [esi], eax
cmp ecx, edi
jge 0x40a99e
lea edx, [ecx + ecx]
movzx eax, word [edx + ebx]
mov esi, eax
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x44]
test ax, ax
je 0x40a99e
mov eax, dword [esi]
mov ecx, dword [ebp - 0x2c]
mov word [edx + eax], cx
mov ecx, dword [esi + 4]
inc ecx
mov dword [esi + 4], ecx
cmp ecx, edi
jl 0x40a976
mov eax, dword [esi]
xor edx, edx
mov dword [ebp - 4], 0xffffffff
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40a9bd
push eax
call fcn.0046b303
add esp, 4
push 0
push 0
push 0x49fab0
push 0x49ffb8
mov ecx, esi
call fcn.00402a70
cmp dword [esi], 0
je 0x40aa14
push 0x2000
call fcn.0046b90c
add esp, 4
mov edi, eax
push 0x1000
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, eax
test ebx, ebx
jne 0x40aa02
push edi
call fcn.0046b303
jmp 0x40aa11
push dword [esi]
call fcn.0046b303
lea eax, [ebx - 1]
mov dword [esi], edi
mov dword [esi + 4], eax
add esp, 4
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x49faa8
mov ecx, esi
call fcn.00402380
xorps xmm0, xmm0
mov dword [ebp - 0x1c], 0
xor ebx, ebx
movq qword [ebp - 0x24], xmm0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x24], ebx
mov byte [ebp - 0x1c], 1
mov dword [ebp - 4], 1
cmp eax, 2
jle 0x40aa85
cmp dword [esi], ebx
jne 0x40aa71
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
push dword [esi]
mov byte [esi + 8], 1
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40adba
push ecx
mov ecx, esi
call fcn.00401770
mov ebx, eax
mov byte [ebp - 0x1c], 0
xor edi, edi
test ebx, ebx
je 0x40aaa8
cmp word [ebx], di
je 0x40aaa8
nop
inc edi
cmp word [ebx + edi*2], 0
jne 0x40aaa0
xor ecx, ecx
mov dword [ebp - 0x20], edi
lea eax, [edi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
add esp, 4
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], eax
test edi, edi
jle 0x40aaf0
mov ecx, eax
sub ebx, eax
mov edx, edi
nop word [eax + eax]
mov ax, word [ebx + ecx]
lea ecx, [ecx + 2]
mov word [ecx - 2], ax
sub edx, 1
jne 0x40aae0
mov ebx, dword [ebp - 0x48]
xor eax, eax
mov byte [ebp - 0x1c], 1
mov word [ebx + edi*2], ax
cmp dword [ebp - 0x2c], eax
je 0x40ac4d
test edi, edi
jne 0x40adb3
cmp word [ebx], ax
je 0x40ab1b
inc eax
cmp word [ebx + eax*2], 0
jne 0x40ab13
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x40adb3
mov edi, dword [esi + 4]
mov byte [esi + 8], al
test edi, edi
jne 0x40ab4b
mov eax, dword [esi]
test eax, eax
je 0x40ab48
cmp word [eax], di
je 0x40ab48
nop dword [eax + eax]
inc edi
cmp word [eax + edi*2], 0
jne 0x40ab40
mov dword [esi + 4], edi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x40ab50
add edi, eax
xor ecx, ecx
mov edx, 2
lea eax, [edi + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov ebx, dword [esi]
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, eax
test ebx, ebx
je 0x40abb1
movzx ecx, word [ebx]
mov esi, ecx
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x44]
test cx, cx
je 0x40abb1
sub ebx, eax
mov eax, ecx
movzx ecx, ax
nop dword [eax]
mov word [edx], cx
add edx, 2
movzx eax, word [ebx + edx]
mov ecx, eax
test ax, ax
jne 0x40aba0
mov ebx, str..exe
mov ecx, 0x2e
sub ebx, edx
nop dword [eax]
mov word [edx], cx
lea edx, [edx + 2]
movzx eax, word [ebx + edx]
mov ecx, eax
test ax, ax
jne 0x40abc0
xor eax, eax
mov word [edx], ax
mov eax, dword [esi]
test eax, eax
je 0x40abe5
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x30]
mov dword [esi + 4], edi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push eax
mov dword [esi], eax
mov byte [esi + 8], 1
call edi
test eax, eax
jne 0x40adba
mov eax, dword [esi + 4]
test eax, eax
jne 0x40ac1f
mov ecx, dword [esi]
test ecx, ecx
je 0x40ac1c
cmp word [ecx], ax
je 0x40ac1c
inc eax
cmp word [ecx + eax*2], 0
jne 0x40ac14
mov dword [esi + 4], eax
add eax, 0xfffffffe
push eax
push ecx
mov ecx, esi
call fcn.00402d50
cmp dword [esi], 0
jne 0x40ada7
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
jmp 0x40ada7
test edi, edi
jne 0x40ad37
cmp word [ebx], ax
je 0x40ac67
nop word [eax + eax]
inc edi
cmp word [ebx + edi*2], ax
jne 0x40ac60
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x40ad37
mov ebx, dword [esi + 4]
mov byte [esi + 8], al
test ebx, ebx
jne 0x40ac92
mov eax, dword [esi]
test eax, eax
je 0x40ac8f
cmp word [eax], bx
je 0x40ac8f
inc ebx
cmp word [eax + ebx*2], 0
jne 0x40ac87
mov dword [esi + 4], ebx
xor eax, eax
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x40ac94
add ebx, eax
xor ecx, ecx
mov edx, 2
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov ecx, dword [esi]
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x40acf1
movzx ecx, word [ecx]
test cx, cx
je 0x40acf1
mov esi, dword [ebp - 0x2c]
sub esi, eax
nop dword [eax]
mov word [edx], cx
add edx, 2
movzx eax, word [edx + esi]
mov ecx, eax
test ax, ax
jne 0x40ace0
mov esi, str..exe
mov ecx, 0x2e
sub esi, edx
nop dword [eax]
mov word [edx], cx
lea edx, [edx + 2]
movzx eax, word [esi + edx]
mov ecx, eax
test ax, ax
jne 0x40ad00
mov esi, dword [ebp - 0x44]
xor eax, eax
mov word [edx], ax
mov eax, dword [esi]
test eax, eax
je 0x40ad28
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x3c]
mov dword [esi + 4], ebx
mov ebx, dword [ebp - 0x48]
mov dword [esi], eax
mov byte [esi + 8], 1
mov ecx, esi
call fcn.004085e0
test al, al
jne 0x40adba
test edi, edi
jne 0x40ad88
xor eax, eax
cmp word [ebx], ax
je 0x40ad58
nop dword [eax]
inc eax
cmp word [ebx + eax*2], 0
jne 0x40ad50
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x40ad88
mov eax, dword [esi + 4]
test eax, eax
jne 0x40ad7c
mov ecx, dword [esi]
test ecx, ecx
je 0x40ad79
cmp word [ecx], ax
je 0x40ad79
inc eax
cmp word [ecx + eax*2], 0
jne 0x40ad71
mov dword [esi + 4], eax
add eax, 0xfffffffe
push eax
push ecx
mov ecx, esi
call fcn.00402d50
cmp dword [esi], 0
jne 0x40ada1
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push dword [esi]
mov byte [esi + 8], 1
call edi
test eax, eax
jne 0x40adba
xor bl, bl
jmp 0x40b178
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
test eax, eax
je 0x40adcd
cmp word [eax], 0
jne 0x40aeb0
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x49faa8
mov ecx, esi
call fcn.00402380
mov edi, eax
cmp edi, 2
jle 0x40aeb0
cmp dword [esi], 0
jne 0x40ae05
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
mov ebx, dword [esi]
dec edi
mov ecx, dword [ebp - 0x28]
test ebx, ebx
mov byte [esi + 8], 1
setne al
mov dword [ebp - 0x2c], edi
mov byte [ecx + 8], al
test ebx, ebx
je 0x40aeb0
mov eax, dword [ecx]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], eax
mov byte [ebp - 4], 2
lea eax, [edi + 1]
mov dword [ecx + 4], 0
mov edx, 2
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, dword [ebp - 0x28]
add esp, 4
mov ecx, dword [edx + 4]
mov dword [edx], eax
cmp ecx, edi
jge 0x40ae94
mov esi, edi
lea edx, [ecx + ecx]
movzx eax, word [edx + ebx]
mov edi, eax
test ax, ax
je 0x40ae8e
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
mov word [edx + eax], di
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + 4]
inc ecx
mov dword [edx + 4], ecx
cmp ecx, esi
jl 0x40ae67
jmp 0x40ae91
mov edx, dword [ebp - 0x28]
mov esi, dword [ebp - 0x44]
mov eax, dword [edx]
xor edx, edx
mov byte [ebp - 4], 1
mov word [eax + ecx*2], dx
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40aeb0
push eax
call fcn.0046b303
add esp, 4
push 0
push 1
push 1
push 0
push 0x49ff88
mov ecx, esi
call fcn.00402380
test eax, eax
je 0x40b078
cmp dword [esi], 0
jne 0x40aee2
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov edi, dword [esi]
mov eax, 0x49ffb8
mov dword [ebp - 0x34], eax
xor bl, bl
mov eax, esi
mov dword [ebp - 0x38], edi
mov edx, edi
mov dword [ebp - 0x28], edi
mov ecx, edi
mov dword [ebp - 0x40], edi
mov dword [eax], 0
mov eax, 0x49ffb8
mov byte [esi + 8], bl
xor ebx, ebx
mov dword [esi + 4], 0
inc ebx
cmp word [ebx*2 + 0x49ffb8], 0
jne 0x40af14
test edi, edi
jne 0x40af35
mov dword [ebp - 0x38], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x28], edx
jmp 0x40af5a
xor eax, eax
cmp word [edi], ax
je 0x40af58
mov dword [ebp - 0x38], edx
mov edx, 0x49ffb8
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x28], edx
inc eax
cmp word [ecx + eax*2], 0
jne 0x40af50
add ebx, eax
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + 0x49ffb8], 0
jne 0x40af60
add ebx, eax
xor ecx, ecx
mov edx, 2
mov dword [ebp - 0x30], ebx
lea eax, [ebx + 1]
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov edx, dword [ebp - 0x34]
mov ecx, eax
mov eax, dword [esi]
add esp, 4
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x50], eax
test eax, eax
je 0x40afe1
movzx eax, word [eax]
mov edi, dword [ebp - 0x40]
mov edx, eax
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x3c], edi
mov edi, dword [ebp - 0x28]
test ax, ax
je 0x40afe1
mov edi, dword [ebp - 0x40]
mov esi, dword [ebp - 0x50]
mov dword [ebp - 0x3c], edi
sub esi, ecx
mov edi, dword [ebp - 0x28]
movzx ebx, ax
nop
mov word [ecx], bx
add ecx, 2
movzx eax, word [esi + ecx]
mov ebx, eax
test ax, ax
jne 0x40afd0
mov esi, 0x49ffb8
mov ebx, 0x22
sub esi, ecx
nop dword [eax]
mov word [ecx], bx
add ecx, 2
movzx eax, word [esi + ecx]
mov ebx, eax
test ax, ax
jne 0x40aff0
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x30]
test eax, eax
je 0x40b032
movzx eax, word [eax]
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x30]
test ax, ax
je 0x40b032
movzx eax, ax
mov word [ecx], ax
lea edi, [edi + 2]
movzx eax, word [edi]
add ecx, 2
test ax, ax
jne 0x40b021
mov eax, 0x22
mov word [ecx], ax
lea edx, [edx + 2]
movzx eax, word [edx]
lea ecx, [ecx + 2]
test ax, ax
jne 0x40b037
xor eax, eax
mov word [ecx], ax
mov eax, dword [esi]
test eax, eax
je 0x40b05c
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x2c]
mov dword [esi], eax
mov eax, dword [ebp - 0x38]
mov dword [esi + 4], ebx
mov byte [esi + 8], 1
test eax, eax
je 0x40b078
push eax
call fcn.0046b303
add esp, 4
push dword [ebp + 0xc]
mov ebx, dword [ebp - 0x4c]
mov ecx, ebx
call fcn.00402300
cmp dword [esi], 0
jne 0x40b09e
push 2
call fcn.0046b90c
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
mov edi, dword [esi]
mov byte [esi + 8], 1
mov esi, dword [ebx + 4]
mov byte [ebx + 8], 0
test esi, esi
jne 0x40b0cb
mov eax, dword [ebx]
test eax, eax
je 0x40b0c8
cmp word [eax], si
je 0x40b0c8
nop word [eax + eax]
inc esi
cmp word [eax + esi*2], 0
jne 0x40b0c0
mov dword [ebx + 4], esi
test edi, edi
je 0x40b0e0
xor eax, eax
cmp word [edi], ax
je 0x40b0de
inc eax
cmp word [edi + eax*2], 0
jne 0x40b0d6
add esi, eax
xor ecx, ecx
lea eax, [esi + 1]
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0046b90c
mov ebx, dword [ebx]
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, eax
test edi, edi
je 0x40b131
movzx ecx, word [edi]
mov eax, ecx
mov dword [ebp - 0x14], eax
mov eax, edx
test cx, cx
je 0x40b131
movzx ecx, cx
sub edi, eax
nop dword [eax + eax]
mov word [edx], cx
add edx, 2
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x40b120
mov edi, dword [ebp - 0x4c]
cmp dword [edi], 0
je 0x40b156
movzx eax, word [ebx]
mov ecx, eax
test ax, ax
je 0x40b156
sub ebx, edx
mov word [edx], cx
add edx, 2
movzx eax, word [ebx + edx]
mov ecx, eax
test ax, ax
jne 0x40b145
xor eax, eax
mov word [edx], ax
mov eax, dword [edi]
test eax, eax
je 0x40b16a
push eax
call fcn.0046b303
add esp, 4
mov eax, dword [ebp - 0x2c]
mov bl, 1
mov dword [edi], eax
mov dword [edi + 4], esi
mov byte [edi + 8], 1
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x40b188
push eax
call fcn.0046b303
add esp, 4
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.0046b2f5
mov esp, ebp
pop ebp
ret 8