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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47cc8d
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4b4200]
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 0x403864
push 2
call fcn.0046a3df
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 0x403927
cmp ecx, 1
jge 0x403898
xor edi, edi
cmp word [ebx], di
je 0x403898
inc edi
cmp word [ebx + edi*2], 0
jne 0x403890
mov eax, dword [esi]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
lea eax, [edi + 1]
mov dword [ebp - 4], 0
mul edx
mov ecx, 0xffffffff
mov dword [esi + 4], 0
cmovb eax, ecx
push eax
call fcn.0046a3df
mov ecx, dword [esi + 4]
add esp, 4
mov dword [esi], eax
cmp ecx, edi
jge 0x403908
nop dword [eax]
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 0x403908
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 0x4038e0
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 0x403927
push eax
call fcn.00469dd3
add esp, 4
push 0
push 0
push 0x49eb08
push 0x49eaf4
mov ecx, esi
call fcn.00406a40
cmp dword [esi], 0
je 0x40397e
push 0x2000
call fcn.0046a3df
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 0x40396c
push edi
call fcn.00469dd3
jmp 0x40397b
push dword [esi]
call fcn.00469dd3
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 0x49eae8
mov ecx, esi
call fcn.00406350
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 0x4039ef
cmp dword [esi], ebx
jne 0x4039db
push 2
call fcn.0046a3df
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 0x403d1a
push ecx
mov ecx, esi
call fcn.00405740
mov ebx, eax
mov byte [ebp - 0x1c], 0
xor edi, edi
test ebx, ebx
je 0x403a10
cmp word [ebx], di
je 0x403a10
inc edi
cmp word [ebx + edi*2], 0
jne 0x403a08
mov ecx, 2
mov dword [ebp - 0x20], edi
lea eax, [edi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
add esp, 4
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x24], eax
test edi, edi
jle 0x403a4f
mov ecx, eax
sub ebx, eax
mov edx, edi
nop
mov ax, word [ebx + ecx]
mov word [ecx], ax
add ecx, 2
sub edx, 1
jne 0x403a40
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 0x403bad
test edi, edi
jne 0x403d13
cmp word [ebx], ax
je 0x403a7a
inc eax
cmp word [ebx + eax*2], 0
jne 0x403a72
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x403d13
mov edi, dword [esi + 4]
mov byte [esi + 8], al
test edi, edi
jne 0x403aab
mov eax, dword [esi]
test eax, eax
je 0x403aa8
cmp word [eax], di
je 0x403aa8
nop word [eax + eax]
inc edi
cmp word [eax + edi*2], 0
jne 0x403aa0
mov dword [esi + 4], edi
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x403ab0
add edi, eax
mov ecx, 2
lea eax, [edi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov ebx, dword [esi]
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, eax
test ebx, ebx
je 0x403b11
movzx ecx, word [ebx]
mov esi, ecx
mov dword [ebp - 0x2c], esi
mov esi, dword [ebp - 0x44]
test cx, cx
je 0x403b11
sub ebx, eax
mov eax, ecx
movzx ecx, ax
nop dword [eax + eax]
mov word [edx], cx
add edx, 2
movzx eax, word [ebx + edx]
mov ecx, eax
test ax, ax
jne 0x403b00
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 0x403b20
xor eax, eax
mov word [edx], ax
mov eax, dword [esi]
test eax, eax
je 0x403b45
push eax
call fcn.00469dd3
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 0x403d1a
mov eax, dword [esi + 4]
test eax, eax
jne 0x403b7f
mov ecx, dword [esi]
test ecx, ecx
je 0x403b7c
cmp word [ecx], ax
je 0x403b7c
inc eax
cmp word [ecx + eax*2], 0
jne 0x403b74
mov dword [esi + 4], eax
add eax, 0xfffffffe
push eax
push ecx
mov ecx, esi
call fcn.00406d10
cmp dword [esi], 0
jne 0x403d07
push 2
call fcn.0046a3df
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov dword [esi + 4], ecx
jmp 0x403d07
test edi, edi
jne 0x403c97
cmp word [ebx], ax
je 0x403bc7
nop word [eax + eax]
inc edi
cmp word [ebx + edi*2], ax
jne 0x403bc0
mov dword [ebp - 0x20], edi
test edi, edi
jne 0x403c97
mov ebx, dword [esi + 4]
mov byte [esi + 8], al
test ebx, ebx
jne 0x403bf2
mov eax, dword [esi]
test eax, eax
je 0x403bef
cmp word [eax], bx
je 0x403bef
inc ebx
cmp word [eax + ebx*2], 0
jne 0x403be7
mov dword [esi + 4], ebx
xor eax, eax
inc eax
cmp word [eax*2 + str..exe], 0
jne 0x403bf4
add ebx, eax
mov ecx, 2
lea eax, [ebx + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov ecx, dword [esi]
add esp, 4
mov dword [ebp - 0x3c], eax
mov edx, eax
mov dword [ebp - 0x2c], ecx
test ecx, ecx
je 0x403c51
movzx ecx, word [ecx]
test cx, cx
je 0x403c51
mov esi, dword [ebp - 0x2c]
sub esi, eax
nop dword [eax + eax]
mov word [edx], cx
add edx, 2
movzx eax, word [esi + edx]
mov ecx, eax
test ax, ax
jne 0x403c40
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 0x403c60
mov esi, dword [ebp - 0x44]
xor eax, eax
mov word [edx], ax
mov eax, dword [esi]
test eax, eax
je 0x403c88
push eax
call fcn.00469dd3
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
push ecx
mov ecx, esi
call fcn.004015f0
test al, al
jne 0x403d1a
test edi, edi
jne 0x403ce8
xor eax, eax
cmp word [ebx], ax
je 0x403cb8
nop
inc eax
cmp word [ebx + eax*2], 0
jne 0x403cb0
mov dword [ebp - 0x20], eax
test eax, eax
jne 0x403ce8
mov eax, dword [esi + 4]
test eax, eax
jne 0x403cdc
mov ecx, dword [esi]
test ecx, ecx
je 0x403cd9
cmp word [ecx], ax
je 0x403cd9
inc eax
cmp word [ecx + eax*2], 0
jne 0x403cd1
mov dword [esi + 4], eax
add eax, 0xfffffffe
push eax
push ecx
mov ecx, esi
call fcn.00406d10
cmp dword [esi], 0
jne 0x403d01
push 2
call fcn.0046a3df
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 0x403d1a
xor bl, bl
jmp 0x4040f3
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
test eax, eax
je 0x403d2d
cmp word [eax], 0
jne 0x403e19
push 0
push 1
push 0xffffffffffffffff
push 1
push 0x49eae8
mov ecx, esi
call fcn.00406350
mov edi, eax
cmp edi, 2
jle 0x403e19
cmp dword [esi], 0
jne 0x403d65
push 2
call fcn.0046a3df
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 0x403e19
mov eax, dword [ecx]
xorps xmm0, xmm0
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0
mov byte [ebp - 4], 2
lea eax, [edi + 1]
mov dword [ecx + 4], 0
mov ecx, 2
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov edx, dword [ebp - 0x28]
add esp, 4
mov ecx, dword [edx + 4]
mov dword [edx], eax
cmp ecx, edi
jge 0x403dfd
mov esi, edi
nop dword [eax]
lea edx, [ecx + ecx]
movzx eax, word [ebx + edx]
mov edi, eax
test ax, ax
je 0x403df7
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 0x403dd0
jmp 0x403dfa
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 0x403e19
push eax
call fcn.00469dd3
add esp, 4
push 0
push 1
push 1
push 0
push 0x49eaf8
mov ecx, esi
call fcn.00406350
test eax, eax
je 0x403ff4
cmp dword [esi], 0
jne 0x403e4b
push 2
call fcn.0046a3df
add esp, 4
mov dword [esi], eax
xor ecx, ecx
mov word [eax], cx
mov edi, dword [esi]
mov eax, 0x49eaf4
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, 0x49eaf4
mov byte [esi + 8], bl
xor ebx, ebx
mov dword [esi + 4], 0
nop dword [eax]
inc ebx
cmp word [ebx*2 + 0x49eaf4], 0
jne 0x403e80
test edi, edi
jne 0x403ea1
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 0x403eca
xor eax, eax
cmp word [edi], ax
je 0x403ec8
mov dword [ebp - 0x38], edx
mov edx, 0x49eaf4
mov dword [ebp - 0x34], edx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x28], edx
nop dword [eax]
inc eax
cmp word [ecx + eax*2], 0
jne 0x403ec0
add ebx, eax
xor eax, eax
nop dword [eax]
inc eax
cmp word [eax*2 + 0x49eaf4], 0
jne 0x403ed0
add ebx, eax
mov ecx, 2
mov dword [ebp - 0x30], ebx
lea eax, [ebx + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
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 0x403f51
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 0x403f51
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 dword [eax]
mov word [ecx], bx
add ecx, 2
movzx eax, word [esi + ecx]
mov ebx, eax
test ax, ax
jne 0x403f40
mov esi, 0x49eaf4
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 0x403f60
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x44]
mov ebx, dword [ebp - 0x30]
test eax, eax
je 0x403fa5
movzx eax, word [eax]
mov ebx, eax
mov dword [ebp - 0x14], ebx
mov ebx, dword [ebp - 0x30]
test ax, ax
je 0x403fa5
movzx eax, ax
movzx eax, ax
lea edi, [edi + 2]
mov word [ecx], ax
add ecx, 2
movzx eax, word [edi]
test ax, ax
jne 0x403f91
mov eax, 0x22
nop word [eax + eax]
movzx eax, ax
lea edx, [edx + 2]
mov word [ecx], ax
lea ecx, [ecx + 2]
movzx eax, word [edx]
test ax, ax
jne 0x403fb0
xor eax, eax
mov word [ecx], ax
mov eax, dword [esi]
test eax, eax
je 0x403fd8
push eax
call fcn.00469dd3
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 0x403ff4
push eax
call fcn.00469dd3
add esp, 4
push dword [ebp + 0xc]
mov ebx, dword [ebp - 0x4c]
mov ecx, ebx
call fcn.004062d0
cmp dword [esi], 0
jne 0x40401a
push 2
call fcn.0046a3df
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 0x404041
mov eax, dword [ebx]
test eax, eax
je 0x40403e
cmp word [eax], si
je 0x40403e
inc esi
cmp word [eax + esi*2], 0
jne 0x404036
mov dword [ebx + 4], esi
test edi, edi
je 0x40405a
xor eax, eax
cmp word [edi], ax
je 0x404058
nop dword [eax]
inc eax
cmp word [edi + eax*2], 0
jne 0x404050
add esi, eax
mov ecx, 2
lea eax, [esi + 1]
mul ecx
mov ecx, 0xffffffff
cmovb eax, ecx
push eax
call fcn.0046a3df
mov ebx, dword [ebx]
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, eax
test edi, edi
je 0x4040a7
movzx ecx, word [edi]
mov eax, ecx
mov dword [ebp - 0x14], eax
mov eax, edx
test cx, cx
je 0x4040a7
sub edi, eax
mov eax, ecx
movzx ecx, ax
mov word [edx], cx
add edx, 2
movzx eax, word [edi + edx]
mov ecx, eax
test ax, ax
jne 0x404096
mov edi, dword [ebp - 0x4c]
cmp dword [edi], 0
je 0x4040d1
movzx eax, word [ebx]
mov ecx, eax
test ax, ax
je 0x4040d1
sub ebx, edx
nop dword [eax + eax]
mov word [edx], cx
add edx, 2
movzx eax, word [ebx + edx]
mov ecx, eax
test ax, ax
jne 0x4040c0
xor eax, eax
mov word [edx], ax
mov eax, dword [edi]
test eax, eax
je 0x4040e5
push eax
call fcn.00469dd3
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 0x404103
push eax
call fcn.00469dd3
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.00469dc5
mov esp, ebp
pop ebp
ret 8