Function at 0x10030340
Capabilities:
Query environment variable

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
push esi
mov esi, 0x2711
mov dword [esp + 4], 0
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10030358
sub eax, edx
jne 0x1003036f
mov eax, 0x2721
pop esi
add esp, 8
ret
push ebx
mov ebx, dword [esp + 0x28]
push ebp
push edi
mov edi, dword [esp + 0x24]
test edi, 0x1000
je 0x100303c7
push str.R_SHLIB_NAME
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x100303c7
mov ecx, eax
lea ebp, [ecx + 1]
lea ecx, [ecx]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x100303a0
sub ecx, ebp
je 0x100303c7
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
push eax
call ebx
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100306c4
and edi, 0xfff
mov eax, edi
sub eax, 1
je 0x1003050a
sub eax, 1
je 0x100303ea
pop edi
pop ebp
pop ebx
mov eax, 0x271b
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x20]
cmp dword [eax], 0
je 0x1003060b
mov edi, eax
mov dword [esp + 0x14], eax
lea ecx, [ecx]
test esi, esi
je 0x1003060b
mov eax, dword [edi]
push eax
call dword [sym.imp.MSVCR80.dll_getenv]
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
je 0x100304f5
push 0
lea ecx, [esp + 0x14]
push 0x3b
push ecx
call fcn.10023300
add esp, 0xc
test eax, eax
jle 0x100304f5
lea esp, [esp]
mov ecx, dword [esp + 0x1c]
lea esi, [ecx + 1]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x10030447
sub ecx, esi
lea edx, [ecx + eax + 2]
push edx
call fcn.1002fcf0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x100306b0
push ebp
lea eax, [esp + 0x14]
push 0x3b
push eax
call fcn.10023300
mov byte [eax + ebp], 0x5c
mov byte [eax + ebp + 1], 0
mov eax, dword [esp + 0x28]
add esp, 0xc
mov ecx, eax
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10030488
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
lea ebx, [ebx]
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x100304a0
mov edx, dword [esp + 0x28]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x2c]
push ecx
push edx
push ebp
call ebx
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100306b5
push ebp
call fcn.1002fd10
push 0
lea eax, [esp + 0x18]
push 0x3b
push eax
call fcn.10023300
add esp, 0x10
test eax, eax
jg 0x10030440
mov edi, dword [esp + 0x14]
add edi, 4
cmp dword [edi], 0
mov dword [esp + 0x14], edi
jne 0x10030400
jmp 0x1003060b
mov eax, dword [esp + 0x20]
cmp dword [eax], 0
je 0x1003060b
mov ebx, eax
lea esp, [esp]
test esi, esi
je 0x1003060b
mov eax, dword [ebx]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10030530
mov edi, dword [esp + 0x1c]
sub eax, edx
mov esi, eax
mov eax, edi
add esi, 2
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10030550
sub eax, edx
add eax, esi
push eax
call fcn.1002fcf0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x100306b0
mov ecx, dword [ebx]
push esi
push ecx
push ebp
call dword [sym.imp.MSVCR80.dll_strncpy]
mov eax, dword [ebx]
add esp, 0xc
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10030583
sub eax, edx
mov byte [eax + ebp], 0x5c
mov eax, dword [ebx]
lea ecx, [eax + 1]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10030597
sub eax, ecx
mov byte [eax + ebp + 1], dl
mov eax, edi
mov ecx, edi
lea ebx, [ebx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x100305b0
mov edi, ebp
sub eax, ecx
mov esi, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x100305c2
mov edx, dword [esp + 0x2c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [esp + 0x28]
push edx
push eax
and ecx, 3
push ebp
rep movsb byte es:[edi], byte [esi]
call dword [esp + 0x3c]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100306b5
push ebp
call fcn.1002fd10
add ebx, 4
add esp, 4
cmp dword [ebx], 0
jne 0x10030520
cmp esi, 0x271b
je 0x100306c2
mov esi, dword [esp + 0x1c]
mov eax, esi
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x10030620
sub eax, edx
add eax, 3
push eax
call fcn.1002fcf0
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x100306b0
mov eax, esi
mov byte [ebp], 0x2e
mov byte [ebp + 1], 0x5c
mov byte [ebp + 2], 0
mov ecx, eax
lea ecx, [ecx]
mov dl, byte [eax]
add eax, 1
test dl, dl
jne 0x10030650
mov edi, ebp
sub eax, ecx
add edi, 0xffffffff
mov cl, byte [edi + 1]
add edi, 1
test cl, cl
jne 0x10030660
mov ebx, dword [esp + 0x2c]
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x30]
push ebx
push ecx
push ebp
call edi
mov esi, eax
add esp, 0xc
test esi, esi
je 0x100306b5
push ebp
call fcn.1002fd10
mov edx, dword [esp + 0x2c]
mov eax, dword [esp + 0x20]
push ebx
push edx
push eax
call edi
add esp, 0x10
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
mov esi, 0x2715
test ebp, ebp
je 0x100306c2
push ebp
call fcn.1002fd10
add esp, 4
mov eax, esi
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret