Function at 0x4124a7
Capabilities:
Get comspec environment variable
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov edi, dword [ebp + 0x1c]
push str.SERVER_NAME
and dword [edi + 0x2108], 0
and dword [edi + 0x2104], 0
mov dword [edi], ebx
call dword [sym.imp.MSVCRT.dll_getenv]
test eax, eax
pop ecx
je 0x4124e7
push eax
push str.SERVER_NAME_s
push edi
call fcn.00412811
add esp, 0xc
jmp 0x412509
push 3
lea eax, [ebp - 0x64]
push 0x64
push eax
push dword [ebx + 0x10]
call fcn.0040e3be
lea eax, [ebp - 0x64]
push eax
push str.SERVER_NAME_s
push edi
call fcn.00412811
add esp, 0x1c
mov esi, dword [ebp + 0x18]
push dword [esi]
push str.SERVER_ROOT_s
push edi
call fcn.00412811
push dword [esi]
push str.DOCUMENT_ROOT_s
push edi
call fcn.00412811
push 0x41c56c
push 0x41c560
push str.SERVER_SOFTWARE_s__s
push edi
call fcn.00412811
mov esi, 0x41b7d8
push str.GATEWAY_INTERFACECGI_1.1
push esi
push edi
call fcn.00412811
push str.SERVER_PROTOCOLHTTP_1.1
push esi
push edi
call fcn.00412811
add esp, 0x40
push str.REDIRECT_STATUS200
push esi
push edi
call fcn.00412811
mov esi, dword [ebp + 0x14]
push dword [esi + 0x10]
push dword [esi + 0x14]
push str.REQUEST_METHOD_.s
push edi
call fcn.00412811
mov eax, dword [esi + 0x38]
add esp, 0x1c
test eax, eax
mov ecx, 0x41e0d8
je 0x41258f
mov ecx, 0x41b598
push dword [esi + 0x34]
push eax
push ecx
push dword [esi + 0x18]
push dword [esi + 0x1c]
push str.REQUEST_URI_.s_s_.s
push edi
call fcn.00412811
push 5
lea eax, [ebp - 0x64]
push 0x64
push eax
push ebx
call fcn.0041394a
lea eax, [ebp - 0x64]
push eax
push str.REMOTE_ADDR_s
push edi
call fcn.00412811
push 2
lea eax, [ebp - 0x64]
push 0x64
push eax
push ebx
call fcn.0041394a
add esp, 0x48
lea eax, [ebp - 0x64]
push eax
push str.SERVER_PORT_s
push edi
call fcn.00412811
mov edx, dword [ebp + 0x10]
mov ecx, dword [esi + 0x1c]
mov eax, dword [esi + 0x18]
add esp, 0xc
sub ecx, dword [edx + 4]
cmp byte [ecx + eax - 1], 0x2f
lea ebx, [ecx + eax - 1]
jne 0x41262b
push 0x5c
push dword [ebp + 0xc]
call dword [sym.imp.MSVCRT.dll_strrchr]
pop ecx
pop ecx
test eax, eax
lea ecx, [eax + 1]
jne 0x412613
mov ecx, dword [ebp + 0xc]
mov eax, dword [esi + 0x18]
push ecx
sub ebx, eax
push eax
push ebx
push str.SCRIPT_NAME_.s__s
push edi
call fcn.00412811
add esp, 0x14
jmp 0x41263e
sub ebx, eax
push eax
inc ebx
push ebx
push str.SCRIPT_NAME_.s
push edi
call fcn.00412811
add esp, 0x10
push dword [ebp + 0xc]
push str.SCRIPT_FILENAME_s
push edi
call fcn.00412811
mov ebx, dword [ebp + 0x10]
add esp, 0xc
test ebx, ebx
je 0x41267e
mov eax, dword [ebx + 4]
test eax, eax
jbe 0x41267e
push dword [ebx]
push eax
push str.PATH_INFO_.s
push edi
call fcn.00412811
push dword [ebx]
push dword [ebx + 4]
push str.PATH_TRANSLATED_.s
push edi
call fcn.00412811
add esp, 0x20
mov eax, dword [ebp + 8]
test byte [eax + 0x78], 0x10
mov eax, 0x41c448
jne 0x412691
mov eax, 0x41c444
push eax
push str.HTTPS_s
push edi
call fcn.00412811
push str.Content_Type
push esi
call fcn.0040f1d7
add esp, 0x14
test eax, eax
je 0x4126c2
push dword [eax]
push dword [eax + 4]
push str.CONTENT_TYPE_.s
push edi
call fcn.00412811
add esp, 0x10
mov eax, dword [esi + 0x38]
test eax, eax
jbe 0x4126db
push dword [esi + 0x34]
push eax
push str.QUERY_STRING_.s
push edi
call fcn.00412811
add esp, 0x10
push str.Content_Length
push esi
call fcn.0040f1d7
pop ecx
test eax, eax
pop ecx
je 0x4126ff
push dword [eax]
push dword [eax + 4]
push str.CONTENT_LENGTH_.s
push edi
call fcn.00412811
add esp, 0x10
push str.PATH
push edi
call fcn.00412873
push 0x41c3f0
push edi
call fcn.00412873
push str.TEMP
push edi
call fcn.00412873
push str.TMPDIR
push edi
call fcn.00412873
push str.PERLLIB
push edi
call fcn.00412873
push str.MONGOOSE_CGI
push edi
call fcn.00412873
push str.COMSPEC
push edi
call fcn.00412873
push str.SYSTEMROOT
push edi
call fcn.00412873
add esp, 0x40
push str.SystemDrive
push edi
call fcn.00412873
push str.ProgramFiles
push edi
call fcn.00412873
push str.ProgramFiles_x86_
push edi
call fcn.00412873
push str.CommonProgramFiles_x86_
push edi
call fcn.00412873
lea eax, [esi + 0x40]
add esp, 0x20
cmp dword [eax], 0
jbe 0x4127e7
add esi, 0x180
push dword [esi - 4]
push dword [esi]
push dword [esi - 0x144]
push dword [eax]
push str.HTTP__.s_.s
push edi
call fcn.00412811
add esp, 0x18
mov ebx, eax
mov al, byte [ebx]
cmp al, 0x3d
je 0x4127d5
test al, al
je 0x4127d5
cmp al, 0x2d
jne 0x4127c5
mov byte [ebx], 0x5f
movzx eax, byte [ebx]
push eax
call dword [sym.imp.MSVCRT.dll_toupper]
mov byte [ebx], al
pop ecx
inc ebx
jmp 0x4127b4
add esi, 8
cmp dword [esi - 0x140], 0
lea eax, [esi - 0x140]
ja 0x412797
mov eax, dword [edi + 0x2108]
and dword [edi + eax*4 + 0x2004], 0
mov eax, dword [edi + 0x2104]
inc dword [edi + 0x2108]
and byte [eax + edi + 4], 0
inc dword [edi + 0x2104]
pop edi
pop esi
pop ebx
leave
ret