Function at 0x419f30
Capabilities:
Query environment variable

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x4f4
push ebx
push esi
push edi
push ebp
push eax
call dword [sym.imp.MSVCRT40.dll__strupr]
mov edi, dword [esp + 0x50c]
add esp, 4
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, 0x4fcf30
sub eax, eax
mov dword [esp + 0x10], ecx
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
mov edi, dword [esp + 0x50c]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.CONFIG.TBL
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push str.CAMUSR
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, dword [sym.imp.MSVCRT40.dll_getenv]
call ebx
add esp, 4
test eax, eax
je 0x41a039
mov edi, eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x104]
push ecx
call dword [sym.imp.MSVCRT40.dll__strupr]
lea edi, [esp + 0x108]
add esp, 4
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp ecx, 1
jne 0x41a023
mov byte [esp + 0x6c], 0x30
mov al, byte [esp + 0x104]
mov byte [esp + 0x6d], al
jmp 0x41a039
mov al, byte [esp + 0x104]
mov cl, byte [esp + 0x105]
mov byte [esp + 0x6c], al
mov byte [esp + 0x6d], cl
lea eax, [esp + 0x64]
push 0xa
push str.CONFIG.T00
push eax
call dword [sym.imp.MSVCRT40.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41a078
mov edi, str.CONFIG.TBL
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x64]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x64]
push 0x4fcf0c
push eax
call dword [sym.imp.MSVCRT40.dll_fopen]
add esp, 8
mov ebp, eax
test ebp, ebp
jne 0x41a35f
mov edi, 0x4fcf08
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push str.PATH
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
add esp, 4
test eax, eax
je 0x41a145
mov edi, eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x104]
push ecx
call dword [sym.imp.MSVCRT40.dll__strupr]
lea eax, [esp + 0x108]
add esp, 4
push str.CAMSYS
push eax
call dword [sym.imp.MSVCRT40.dll_strstr]
add esp, 8
test eax, eax
je 0x41a145
lea eax, [esp + 0x104]
push str.CAMSYS
push eax
call dword [sym.imp.MSVCRT40.dll_strstr]
add esp, 8
mov edi, eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
lea edx, [ecx - 1]
cmp edx, 1
jge 0x41a1b0
mov edi, 0x4fcf08
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0x4fcef0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
add esp, 4
mov edi, eax
test edi, edi
je 0x41a220
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.MSVCRT40.dll__strupr]
add esp, 4
jmp 0x41a220
lea edi, [esp + 0x104]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov eax, 1
sub ecx, edx
cmp ecx, eax
lea esi, [ecx - 1]
jl 0x41a1e7
mov edx, 0x3b
cmp byte [esp + esi + 0x104], dl
je 0x41a1e7
dec esi
js 0x41a1e7
inc eax
cmp eax, ecx
jle 0x41a1d6
inc esi
lea edi, [esp + 0x104]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
xor edi, edi
lea eax, [esi + 1]
cmp eax, ecx
jg 0x41a21b
mov dl, byte [esp + esi + 0x104]
cmp dl, 0x3b
je 0x41a21b
mov byte [esp + edi + 0x14], dl
inc edi
inc esi
inc eax
cmp eax, ecx
jle 0x41a204
mov byte [esp + edi + 0x14], 0
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x13], 0x5c
je 0x41a241
mov byte [esp + ecx + 0x14], 0x5c
mov byte [esp + ecx + 0x15], 0
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x64]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x104]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x4fcf0c
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x108]
push eax
call dword [sym.imp.MSVCRT40.dll_fopen]
add esp, 8
mov ebp, eax
test ebp, ebp
jne 0x41a35f
mov edi, 0x4fceec
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x14]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x64]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x104]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x4fcf0c
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x108]
push eax
call dword [sym.imp.MSVCRT40.dll_fopen]
add esp, 8
mov ebp, eax
test ebp, ebp
je 0x41a4a4
xor ebx, ebx
lea eax, [esp + 0xb4]
push ebp
push 0x50
push eax
call dword [sym.imp.MSVCRT40.dll_fgets]
add esp, 0xc
test eax, eax
je 0x41a48f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
mov byte [esp + 0x103], 0
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
lea eax, [esp + 0xb4]
mov byte [esp + ecx + 0xb2], 0
push eax
call dword [sym.imp.MSVCRT40.dll__strupr]
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x50c]
mov byte [esp + 0x108], 0
lea edx, [esp + 0xb8]
add esp, 4
push eax
push ecx
push edx
call dword [sym.imp.MSVCRT40.dll_strncmp]
add esp, 0xc
test eax, eax
jne 0x41a430
lea eax, [esp + 0xb4]
push 0x4fcee8
push eax
call dword [sym.imp.MSVCRT40.dll_strstr]
add esp, 8
test eax, eax
je 0x41a430
lea eax, [esp + 0xb4]
push 0x4fcee8
push eax
call dword [sym.imp.MSVCRT40.dll_strstr]
add esp, 8
mov edi, eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
shr ecx, 2
mov esi, edi
lea edi, [esp + 0x104]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x104]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [ecx - 1]
test esi, esi
jle 0x41a361
lea eax, [esp + 0x104]
xor ebx, ebx
push eax
mov edi, 2
call dword [sym.imp.MSVCRT40.dll__strupr]
add esp, 4
mov edx, 1
cmp esi, edi
jl 0x41a48f
mov al, byte [esp + edx + 0x104]
cmp al, 0x23
je 0x41a48f
cmp al, 0x20
je 0x41a489
mov ecx, dword [esp + 0x50c]
inc ebx
mov byte [ebx + ecx - 1], al
inc edx
inc edi
cmp esi, edi
jge 0x41a46e
mov ecx, dword [esp + 0x50c]
push ebp
mov byte [ebx + ecx], 0
call dword [sym.imp.MSVCRT40.dll_fclose]
add esp, 4
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x4f4
ret