Function at 0x40bad0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x424c3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x28c
mov dword [ebp - 0x6c], 0
mov dword [ebp - 0x78], 0
mov dword [ebp - 0x74], 0
push 0
push 0
lea ecx, [ebp - 0x88]
call fcn.00406627
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
push eax
call fcn.00418020
add esp, 4
shl eax, 1
push eax
lea ecx, [ebp - 0x88]
call fcn.0040889c
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
test edx, edx
je 0x40c1ea
mov eax, dword [ebp + 0xc]
mov cl, byte [eax]
mov byte [ebp - 0xf], cl
mov edx, dword [ebp + 0xc]
add edx, 1
mov dword [ebp + 0xc], edx
movsx eax, byte [ebp - 0xf]
cmp eax, 0x25
je 0x40bb6f
movzx ecx, byte [ebp - 0xf]
push ecx
push 1
lea ecx, [ebp - 0x88]
call fcn.0040f000
jmp 0x40bb33
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
push 0
push 0
lea ecx, [ebp - 0x30]
call fcn.00406627
mov byte [ebp - 4], 1
mov edx, dword [ebp + 0xc]
mov al, byte [edx]
mov byte [ebp - 0xd], al
movsx ecx, byte [ebp - 0xd]
mov dword [ebp - 0xb8], ecx
mov edx, dword [ebp + 0xc]
add edx, 1
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 0xb8]
mov dword [ebp - 0x68], eax
cmp dword [ebp - 0x68], 0x25
je 0x40bbc1
cmp dword [ebp - 0x68], 0x7b
je 0x40bbbf
jmp 0x40bbe8
jmp 0x40bbf7
movzx ecx, byte [ebp - 0xd]
push ecx
push 1
lea ecx, [ebp - 0x88]
call fcn.0040f000
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.00406627
jmp 0x40bb33
movzx edx, byte [ebp - 0xd]
push edx
push 1
lea ecx, [ebp - 0x30]
call fcn.0040f000
movsx eax, byte [ebp - 0xd]
cmp eax, 0x7b
jne 0x40c0dc
mov byte [ebp - 0xe], 1
mov byte [ebp - 0x10], 0
mov ecx, dword [ebp + 0xc]
movsx edx, byte [ecx]
test edx, edx
je 0x40bc73
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
cmp ecx, 0x7d
je 0x40bc73
movzx edx, byte [ebp - 0x10]
test edx, edx
jne 0x40bc51
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
cmp ecx, 0x3a
jne 0x40bc3a
mov byte [ebp - 0x10], 1
jmp 0x40bc51
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
push eax
call fcn.0041a14b
add esp, 4
test eax, eax
jne 0x40bc51
mov byte [ebp - 0xe], 0
mov ecx, dword [ebp + 0xc]
mov dl, byte [ecx]
mov byte [ebp - 0x11], dl
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
movzx ecx, byte [ebp - 0x11]
push ecx
push 1
lea ecx, [ebp - 0x30]
call fcn.0040f000
jmp 0x40bc0c
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
mov dword [ebp - 0xbc], eax
mov ecx, dword [ebp + 0xc]
add ecx, 1
mov dword [ebp + 0xc], ecx
cmp dword [ebp - 0xbc], 0
je 0x40c0c2
movzx edx, byte [ebp - 0xe]
test edx, edx
je 0x40be73
cmp dword [ebp - 0x1c], 0x10
jb 0x40bcb8
mov eax, dword [ebp - 0xe4]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x60], ecx
jmp 0x40bcbe
lea edx, [ebp - 0x30]
mov dword [ebp - 0x60], edx
push 0x3a
mov eax, dword [ebp - 0x60]
push eax
call fcn.0040afe0
add esp, 8
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x5c], 0
cmp dword [ebp - 0x18], 0
je 0x40bd25
mov ecx, dword [ebp - 0x18]
mov byte [ecx], 0
mov edx, dword [ebp - 0x18]
add edx, 1
mov dword [ebp - 0x18], edx
push str.path
mov eax, dword [ebp - 0x18]
push eax
call fcn.00418631
add esp, 8
test eax, eax
jne 0x40bd09
mov dword [ebp - 0x5c], 1
jmp 0x40bd25
push str.file
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.00418631
add esp, 8
test eax, eax
jne 0x40bd25
mov dword [ebp - 0x5c], 2
cmp dword [ebp - 0x1c], 0x10
jb 0x40bd3c
mov edx, dword [ebp - 0xdc]
mov dword [ebp - 0x4c], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x4c], eax
jmp 0x40bd42
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x4c], ecx
push 0x431700
mov edx, dword [ebp - 0x4c]
push edx
call fcn.0041a2db
add esp, 4
push eax
lea eax, [ebp - 0xd4]
push eax
mov ecx, dword [ebp + 0x10]
call fcn.0040e7b0
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x70], ecx
cmp dword [ebp - 0x70], 1
je 0x40bd7e
cmp dword [ebp - 0x70], 2
je 0x40bde0
jmp 0x40be40
cmp dword [ebp - 0xc0], 0x10
jb 0x40bd9b
mov edx, dword [ebp - 0xe0]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0x40], eax
jmp 0x40bda4
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0x40], ecx
mov edx, dword [ebp - 0x40]
push edx
lea eax, [ebp - 0x11c]
push eax
call fcn.0040dc50
add esp, 8
mov dword [ebp - 0x98], eax
mov ecx, dword [ebp - 0x98]
push ecx
lea ecx, [ebp - 0xd4]
call fcn.00405c2c
push 0
push 1
lea ecx, [ebp - 0x11c]
call fcn.00406627
jmp 0x40be40
cmp dword [ebp - 0xc0], 0x10
jb 0x40bdfd
mov edx, dword [ebp - 0xe8]
mov dword [ebp - 0x64], edx
mov eax, dword [ebp - 0xd4]
mov dword [ebp - 0x64], eax
jmp 0x40be06
lea ecx, [ebp - 0xd4]
mov dword [ebp - 0x64], ecx
mov edx, dword [ebp - 0x64]
push edx
lea eax, [ebp - 0x194]
push eax
call fcn.0040db40
add esp, 8
mov dword [ebp - 0xb4], eax
mov ecx, dword [ebp - 0xb4]
push ecx
lea ecx, [ebp - 0xd4]
call fcn.00405c2c
push 0
push 1
lea ecx, [ebp - 0x194]
call fcn.00406627
mov edx, dword [0x42b5d4]
push edx
push 0
lea eax, [ebp - 0xd4]
push eax
lea ecx, [ebp - 0x88]
call fcn.0040633f
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0xd4]
call fcn.00406627
jmp 0x40c0c0
cmp dword [ebp - 0x1c], 0x10
jb 0x40be8a
mov ecx, dword [ebp - 0xf4]
mov dword [ebp - 0x34], ecx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
jmp 0x40be90
lea eax, [ebp - 0x30]
mov dword [ebp - 0x34], eax
push str.unique
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.00418631
add esp, 8
test eax, eax
je 0x40bedd
cmp dword [ebp - 0x1c], 0x10
jb 0x40bebc
mov edx, dword [ebp - 0xd8]
mov dword [ebp - 0x48], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x48], eax
jmp 0x40bec2
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x48], ecx
push 7
push str.unique:
mov edx, dword [ebp - 0x48]
push edx
call fcn.0041870b
add esp, 0xc
test eax, eax
jne 0x40bf84
cmp dword [ebp - 0x1c], 0x10
jb 0x40bef4
mov eax, dword [ebp - 0xfc]
mov dword [ebp - 0x58], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x58], ecx
jmp 0x40befa
lea edx, [ebp - 0x30]
mov dword [ebp - 0x58], edx
cmp dword [ebp - 0x74], 0x10
jb 0x40bf14
mov eax, dword [ebp - 0xec]
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x88]
mov dword [ebp - 0x54], ecx
jmp 0x40bf1d
lea edx, [ebp - 0x88]
mov dword [ebp - 0x54], edx
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x58]
push ecx
lea edx, [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x54]
push eax
lea ecx, [ebp - 0x164]
push ecx
call fcn.0040b400
add esp, 0x14
mov dword [ebp - 0x94], eax
mov edx, dword [ebp - 0x94]
mov dword [ebp - 0x8c], edx
mov byte [ebp - 4], 3
mov eax, dword [0x42b5d4]
push eax
push 0
mov ecx, dword [ebp - 0x8c]
push ecx
lea ecx, [ebp - 0x88]
call fcn.0040633f
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x164]
call fcn.00406627
jmp 0x40c0c0
cmp dword [ebp - 0x1c], 0x10
jb 0x40bf9b
mov edx, dword [ebp - 0x104]
mov dword [ebp - 0x38], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x38], eax
jmp 0x40bfa1
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x38], ecx
push str.guid
mov edx, dword [ebp - 0x38]
push edx
call fcn.00418631
add esp, 8
test eax, eax
je 0x40bfea
cmp dword [ebp - 0x1c], 0x10
jb 0x40bfcd
mov eax, dword [ebp - 0x100]
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], ecx
jmp 0x40bfd3
lea edx, [ebp - 0x30]
mov dword [ebp - 0x3c], edx
push 5
push str.guid:
mov eax, dword [ebp - 0x3c]
push eax
call fcn.0041870b
add esp, 0xc
test eax, eax
jne 0x40c064
cmp dword [ebp - 0x1c], 0x10
jb 0x40c001
mov ecx, dword [ebp - 0xf8]
mov dword [ebp - 0x44], ecx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x44], edx
jmp 0x40c007
lea eax, [ebp - 0x30]
mov dword [ebp - 0x44], eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x44]
push edx
lea eax, [ebp - 0x134]
push eax
call fcn.0040b840
add esp, 0xc
mov dword [ebp - 0xa0], eax
mov ecx, dword [ebp - 0xa0]
mov dword [ebp - 0xb0], ecx
mov byte [ebp - 4], 4
mov edx, dword [0x42b5d4]
push edx
push 0
mov eax, dword [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x88]
call fcn.0040633f
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x134]
call fcn.00406627
jmp 0x40c0c0
push 0x431700
lea ecx, [ebp - 0x30]
push ecx
lea edx, [ebp - 0x14c]
push edx
mov ecx, dword [ebp + 0x10]
call fcn.0040e860
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0x90], eax
mov byte [ebp - 4], 5
mov ecx, dword [0x42b5d4]
push ecx
push 0
mov edx, dword [ebp - 0x90]
push edx
lea ecx, [ebp - 0x88]
call fcn.0040633f
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x14c]
call fcn.00406627
jmp 0x40c0d7
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.00406627
jmp 0x40c1ea
jmp 0x40c1d5
mov eax, dword [ebp + 0xc]
movsx ecx, byte [eax]
test ecx, ecx
je 0x40c113
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
cmp eax, 0x25
je 0x40c113
mov ecx, dword [ebp + 0xc]
mov dl, byte [ecx]
mov byte [ebp - 0x12], dl
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
movzx ecx, byte [ebp - 0x12]
push ecx
push 1
lea ecx, [ebp - 0x30]
call fcn.0040f000
jmp 0x40c0dc
mov edx, dword [ebp + 0xc]
movsx eax, byte [edx]
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp + 0xc]
add ecx, 1
mov dword [ebp + 0xc], ecx
cmp dword [ebp - 0x9c], 0
je 0x40c1c3
cmp dword [ebp - 0x1c], 0x10
jb 0x40c14c
mov edx, dword [ebp - 0xf0]
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x50], eax
jmp 0x40c152
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x50], ecx
push 0x104
lea edx, [ebp - 0x298]
push edx
mov eax, dword [ebp - 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x40c1c1
lea ecx, [ebp - 0x298]
push ecx
lea ecx, [ebp - 0x17c]
call fcn.00405ba6
mov dword [ebp - 0xa4], eax
mov edx, dword [ebp - 0xa4]
mov dword [ebp - 0xac], edx
mov byte [ebp - 4], 6
mov eax, dword [0x42b5d4]
push eax
push 0
mov ecx, dword [ebp - 0xac]
push ecx
lea ecx, [ebp - 0x88]
call fcn.0040633f
mov byte [ebp - 4], 1
push 0
push 1
lea ecx, [ebp - 0x17c]
call fcn.00406627
jmp 0x40c1d5
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.00406627
jmp 0x40c1ea
mov byte [ebp - 4], 0
push 0
push 1
lea ecx, [ebp - 0x30]
call fcn.00406627
jmp 0x40bb33
mov edx, dword [ebp + 8]
mov dword [edx + 0x10], 0
mov eax, dword [ebp + 8]
mov dword [eax + 0x14], 0
push 0
push 0
mov ecx, dword [ebp + 8]
call fcn.00406627
lea ecx, [ebp - 0x88]
push ecx
mov ecx, dword [ebp + 8]
call fcn.0040629d
mov edx, dword [ebp - 0x6c]
or edx, 1
mov dword [ebp - 0x6c], edx
mov dword [ebp - 4], 0xffffffff
push 0
push 1
lea ecx, [ebp - 0x88]
call fcn.00406627
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret