Function at 0x1001b46
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xec
mov eax, dword [0x1004004]
push ebx
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebx]
push esi
mov dword [ebp - 4], eax
push edi
mov dword [ebp - 0xe8], ebx
mov edx, 0x1004860
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x1001b6c
mov esi, 0x101
push esi
mov edi, 0x10043a0
push edi
mov byte [0x1004980], al
call fcn.01002ccd
push esi
mov byte [0x10043a0], 0
call fcn.01002db7
push eax
push edi
call fcn.01002cf7
and dword [0x1004024], 0
cmp dword [ebp + 8], 1
mov word [0x1004850], 0x2a
mov byte [0x1004500], 0
mov byte [0x1004aa0], 0
mov byte [0x10045a0], 0
jne 0x1001bd2
xor eax, eax
jmp 0x1002093
push dword [ebx + 4]
call fcn.01001495
test eax, eax
je 0x1002029
mov edx, dword [ebx + 4]
mov eax, 0x1004640
mov esi, eax
mov cl, byte [edx]
inc edx
mov byte [esi], cl
inc esi
test cl, cl
jne 0x1001bec
push eax
call dword [sym.imp.msvcrt.dll__mbsupr]
pop ecx
push 0x50
lea eax, [ebp - 0x54]
push eax
push 5
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
cmp dword [ebp + 8], 3
jne 0x1001c51
mov eax, dword [ebx + 8]
cmp byte [eax], 0x2f
jne 0x1001c90
lea edx, [eax + 1]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001c2b
sub eax, esi
mov dword [ebp - 0xe4], eax
je 0x1001c90
lea eax, [ebp - 0x54]
push eax
push edx
call fcn.010014c3
test eax, eax
je 0x1001c90
push 2
jmp 0x1002092
jle 0x1001c86
mov eax, dword [ebx + 8]
cmp byte [eax], 0x2f
jne 0x1001c86
lea edx, [eax + 1]
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001c63
sub eax, esi
mov dword [ebp - 0xe4], eax
je 0x1001c86
lea eax, [ebp - 0x54]
push eax
push edx
call fcn.010014c3
test eax, eax
jne 0x1002090
cmp dword [ebp + 8], 2
jle 0x1001d3d
mov ecx, dword [ebx + 8]
cmp byte [ecx], 0x2f
je 0x1001d3d
mov eax, ecx
lea esi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x1001ca1
sub eax, esi
mov esi, 0x100
cmp eax, esi
ja 0x1002090
mov edx, 0x1004980
mov al, byte [ecx]
inc ecx
mov byte [edx], al
inc edx
test al, al
jne 0x1001cbc
push 3
pop ecx
cmp dword [ebp + 8], ecx
jle 0x1001d35
mov eax, dword [ebx + 0xc]
cmp byte [eax], 0x2f
je 0x1001d35
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001cd9
sub eax, edx
cmp eax, esi
ja 0x1002090
mov esi, 0x101
push esi
push edi
call fcn.01002ccd
mov eax, dword [ebx + 0xc]
mov edx, edi
mov cl, byte [eax]
inc eax
mov byte [edx], cl
inc edx
test cl, cl
jne 0x1001cfb
push esi
call fcn.01002db7
push eax
push edi
call fcn.01002cf7
push dword [ebx + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
mov ecx, dword [ebx + 0xc]
je 0x1001d29
mov byte [ecx], 0
inc ecx
dec eax
jne 0x1001d22
mov dword [ebp - 0xe0], 4
jmp 0x1001d47
mov dword [ebp - 0xe0], ecx
jmp 0x1001d47
mov dword [ebp - 0xe0], 2
mov eax, dword [ebp - 0xe0]
cmp eax, dword [ebp + 8]
jge 0x1002024
mov ebx, 0x1004aa0
mov eax, dword [ebp - 0xe8]
mov ecx, dword [ebp - 0xe0]
lea esi, [eax + ecx*4]
mov eax, dword [esi]
cmp byte [eax], 0x2f
jne 0x1002090
mov edi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x50
lea eax, [ebp - 0x54]
push eax
push 2
push 0
call edi
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [esi]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1001dd9
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1002090
push 0xf
inc eax
push eax
mov esi, 0x1004850
push esi
call dword [sym.imp.msvcrt.dll_strncpy]
push esi
mov byte [0x100485f], 0
call dword [sym.imp.msvcrt.dll__strupr]
add esp, 0x10
jmp 0x100200f
push 0x50
lea eax, [ebp - 0x54]
push eax
push 3
push 0
call edi
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [esi]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1001e5b
cmp byte [0x1004500], 0
jne 0x1002090
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1002090
lea esi, [eax + 1]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001e26
sub eax, edx
mov dword [ebp - 0xe4], eax
je 0x1002090
push 0x80
push esi
push 0x1004500
call dword [sym.imp.msvcrt.dll_strncpy]
add esp, 0xc
mov byte [0x1004580], 0
jmp 0x100200f
push 0x50
lea eax, [ebp - 0x54]
push eax
push 0x1f
push 0
call edi
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [esi]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1001f6b
cmp byte [0x1004aa0], 0
jne 0x1002090
push 0x104
push ebx
push 0x100118c
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1002090
lea edx, [eax + 1]
mov eax, edx
mov dword [ebp - 0xe4], edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001ec3
sub eax, esi
mov dword [ebp - 0xec], eax
je 0x1002090
mov eax, edx
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001edd
sub eax, esi
mov ecx, ebx
mov edi, eax
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001eed
sub ecx, esi
add ecx, edi
cmp ecx, 0x103
jbe 0x1001f1c
push 0x104
push edx
push ebx
call dword [sym.imp.msvcrt.dll_strncpy]
add esp, 0xc
mov byte [0x1004ba4], 0
jmp 0x100200f
mov eax, edx
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001f1e
mov edi, ebx
sub eax, edx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x1001f2a
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x4000
lea eax, [ebp - 0xdc]
push eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_OpenFile]
cmp eax, 0xffffffff
jne 0x100200f
push 0x104
push dword [ebp - 0xe4]
jmp 0x1001f06
push 0x50
lea eax, [ebp - 0x54]
push eax
push 4
push 0
call edi
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [esi]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1001fdd
push 0x3a
push dword [esi]
call dword [sym.imp.msvcrt.dll_strchr]
test eax, eax
pop ecx
pop ecx
je 0x1002090
lea esi, [eax + 1]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x1001fab
sub eax, edx
mov dword [ebp - 0xec], eax
je 0x1002090
push 0x80
push esi
push 0x10045a0
call dword [sym.imp.msvcrt.dll_strncpy]
add esp, 0xc
mov byte [0x1004620], 0
jmp 0x100200f
push 0x50
lea eax, [ebp - 0x54]
push eax
push 0x21
push 0
call edi
push eax
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [esi]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1002090
mov dword [0x1004024], 1
inc dword [ebp - 0xe0]
mov eax, dword [ebp - 0xe0]
cmp eax, dword [ebp + 8]
jl 0x1001d5b
xor eax, eax
inc eax
jmp 0x1002093
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x50
lea eax, [ebp - 0x54]
push eax
push 1
push 0
call esi
mov edi, dword [sym.imp.USER32.dll_LoadStringA]
push eax
call edi
mov ebx, dword [ebp - 0xe8]
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebx + 4]
inc eax
push eax
call fcn.010014c3
test eax, eax
jne 0x1002090
push 0x50
lea eax, [ebp - 0x54]
push eax
push 5
push 0
call esi
push eax
call edi
lea eax, [ebp - 0x54]
push eax
mov eax, dword [ebx + 4]
inc eax
push eax
call fcn.010014c3
test eax, eax
je 0x1002090
xor eax, eax
cmp dword [ebp + 8], 2
mov byte [0x1004640], 0
setne al
inc eax
jmp 0x1002026
push 3
pop eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.010028cc
leave
ret 8