Function at 0x304088
Capabilities:
Query environment variable

Disassembly:
push edi
push esi
push ebp
push ebx
sub esp, 0x14
mov esi, dword [esp + 0x28]
mov ebp, dword [esp + 0x34]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
lea edx, [esi + ebp - 1]
test ebp, ebp
jle 0x3040bd
movsx ecx, byte [edx]
cmp ecx, 0x20
je 0x3040b3
test ecx, ecx
jne 0x3040c3
add edx, 0xffffffff
add ebp, 0xffffffff
test ebp, ebp
jg 0x3040a7
je 0x30432f
movsx edx, byte [esi]
cmp edx, 0x20
jne 0x3040d9
add esi, 1
movsx edx, byte [esi]
add ebp, 0xffffffff
cmp edx, 0x20
je 0x3040cb
mov edx, 0x2000
cmp ebp, 0x2000
jle 0x3040e8
mov ebp, edx
push ebp
push esi
push 0x318c80
call fcn.003120a8
add esp, 0xc
test eax, eax
je 0x30411b
mov dword [0x31ad80], 0
push ebp
push esi
push 0x318c80
call fcn.00312070
add esp, 0xc
mov byte [ebp + 0x318c80], 0
mov ecx, dword [0x31ad80]
mov dword [esp + 8], ecx
xor esi, esi
xor edx, edx
mov edi, ebx
mov dword [esp + 0xc], edx
test ecx, ecx
je 0x3041db
mov edx, ecx
lea eax, [edx - 1]
test eax, eax
jle 0x304186
mov dword [esp], ebp
mov ebp, dword [esp + 0xc]
mov dword [esp + 4], ebx
mov ebx, eax
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x304163
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x304157
lea edi, [edi + eax + 1]
movsx edx, byte [edi]
test edx, edx
je 0x304359
add ebp, 1
cmp ebp, ebx
jl 0x30414d
mov dword [esp + 0xc], ebp
mov ebp, dword [esp]
mov eax, ebx
mov ebx, dword [esp + 4]
mov edx, dword [esp + 0xc]
cmp edx, eax
je 0x30419c
mov dword [0x31ad80], 0
mov edi, ebx
jmp 0x3041db
push ebp
push edi
push 0x318c80
call fcn.003120a8
add esp, 0xc
test eax, eax
je 0x3041b9
xor edx, edx
mov dword [esp + 0xc], edx
mov edi, ebx
jmp 0x3041db
mov eax, dword [esp + 8]
mov dword [esp + 0xc], eax
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x3041d7
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x3041cb
lea edi, [edi + eax + 1]
movsx eax, byte [edi]
test eax, eax
je 0x30427b
mov dword [esp + 0x10], esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x304206
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x3041fa
test eax, eax
jbe 0x304230
movsx eax, byte [edi + ebx]
cmp eax, 0x3d
je 0x304230
add ebx, 1
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x30422c
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x304220
cmp ebx, eax
jb 0x30420a
cmp ebx, ebp
jl 0x30424b
push ebp
push edi
push 0x318c80
call fcn.003120a8
add esp, 0xc
test eax, eax
je 0x30436b
add esi, 1
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x304264
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x304258
lea edi, [edi + eax + 1]
movsx edx, byte [edi]
test edx, edx
jne 0x3041ee
mov dword [esp + 0xc], esi
mov esi, dword [esp + 0x10]
test esi, esi
je 0x304376
mov ebp, dword [esp + 0xc]
add ebp, 1
mov dword [0x31ad80], ebp
mov ebp, dword [esp + 0x38]
cmp ebp, ebx
jl 0x30429a
mov ebp, ebx
push ebp
push esi
mov eax, dword [esp + 0x34]
push eax
call fcn.00312070
add esp, 0xc
mov eax, dword [esp + 0x38]
cmp ebp, eax
jge 0x3042ca
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x38]
lea ecx, [eax + ebx]
sub edx, ebp
push edx
push 0x20
push ecx
call fcn.00311ff4
add esp, 0xc
mov edi, esi
xor eax, eax
mov dh, byte [edi]
mov ecx, edi
test dh, dh
je 0x3042e2
add ecx, 1
add eax, 1
mov dl, byte [ecx]
test dl, dl
jne 0x3042d6
mov edx, dword [esp + 0x3c]
mov ebp, eax
sub ebp, ebx
add ebp, 0xffffffff
cmp edx, ebp
jge 0x3042f3
mov ebp, edx
lea ecx, [esi + ebx + 1]
push ebp
push ecx
mov ebx, dword [esp + 0x38]
push ebx
call fcn.00312070
add esp, 0xc
mov edx, dword [esp + 0x3c]
cmp ebp, edx
jge 0x304327
mov edx, dword [esp + 0x30]
mov ecx, dword [esp + 0x3c]
lea ebx, [edx + ebp]
sub ecx, ebp
push ecx
push 0x20
push ebx
call fcn.00311ff4
add esp, 0xc
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret
mov eax, dword [esp + 0x38]
push eax
push 0x20
mov edx, dword [esp + 0x34]
push edx
call fcn.00311ff4
mov eax, dword [esp + 0x48]
push eax
push 0x20
mov edx, dword [esp + 0x44]
push edx
call fcn.00311ff4
add esp, 0x2c
pop ebx
pop ebp
pop esi
pop edi
ret
mov dword [esp + 0xc], ebp
mov ebp, dword [esp]
mov eax, ebx
mov ebx, dword [esp + 4]
jmp 0x304186
mov dword [esp + 0xc], esi
mov esi, edi
jmp 0x30427b
mov eax, dword [esp + 0x38]
push eax
push 0x20
mov edx, dword [esp + 0x34]
push edx
call fcn.00311ff4
mov eax, dword [esp + 0x48]
push eax
push 0x20
mov edx, dword [esp + 0x44]
push edx
call fcn.00311ff4
add esp, 0x18
add esp, 0x14
pop ebx
pop ebp
pop esi
pop edi
ret