Function at 0x6a303e28
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
mov eax, dword [ebp + 8]
mov edi, dword [eax + 4]
test edi, edi
jle 0x6a3041c8
mov ecx, dword [ebp + 8]
mov ebx, dword [ecx + 8]
test ebx, ebx
je 0x6a303f60
mov edi, dword [ebx + 0x14]
mov dword [ebp - 0x38], edi
mov esi, dword [ebx + 0x30]
test esi, esi
je 0x6a30401c
xor eax, eax
mov ecx, 0xffffffff
mov edi, dword [ebp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [ebp - 0x34], ecx
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call fcn.6a301928
mov ecx, eax
mov edi, dword [ebx + 0x2c]
xor edx, edx
div edi
mov esi, edx
lea eax, [edi - 2]
mov dword [ebp - 0x2c], eax
mov eax, ecx
xor edx, edx
div dword [ebp - 0x2c]
mov ecx, edx
inc ecx
mov dword [ebp - 0x44], ecx
mov ecx, dword [ebx + 0x34]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebx + 0x30]
mov eax, edi
sub eax, dword [ebp - 0x44]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x44]
sub ecx, edi
mov dword [ebp - 0x48], ecx
nop
mov ecx, dword [ebp - 0x30]
test ecx, ecx
je 0x6a303f55
mov edi, dword [edx + esi*4]
rol di, 8
rol edi, 0x10
rol di, 8
test edi, edi
je 0x6a303f60
dec edi
cmp dword [ebp - 0x38], edi
jbe 0x6a303f74
mov eax, dword [ebx + 0xc]
mov dword [ebp - 0x3c], eax
test eax, eax
je 0x6a303f94
mov ecx, dword [ebx + 0x18]
mov dword [ebp - 0x2c], ecx
mov eax, dword [ecx + edi*8]
rol ax, 8
rol eax, 0x10
rol ax, 8
cmp eax, dword [ebp - 0x34]
jb 0x6a303f42
mov eax, dword [ebx]
mov edx, dword [ebp - 0x3c]
test edx, edx
je 0x6a303fa4
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + edi*8 + 4]
rol dx, 8
rol edx, 0x10
rol dx, 8
add eax, edx
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
sete al
test al, al
jne 0x6a303fb0
mov edx, dword [ebx + 0x30]
cmp esi, dword [ebp - 0x40]
jb 0x6a303f8c
add esi, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jne 0x6a303ebf
mov edi, dword [edx + esi*4]
test edi, edi
jne 0x6a303ed5
mov dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x3c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
mov eax, edi
sub eax, dword [ebp - 0x38]
shl eax, 3
add eax, dword [ebx + 0x24]
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [eax]
jae 0x6a303f42
mov eax, dword [eax + 4]
jmp 0x6a303f27
add esi, dword [ebp - 0x44]
jmp 0x6a303eb4
mov eax, dword [ebx + 0x18]
mov dword [ebp - 0x2c], eax
mov eax, dword [eax + edi*8]
jmp 0x6a303f01
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ecx + edi*8 + 4]
jmp 0x6a303f25
mov dword [ebp - 0x30], edi
mov edx, dword [ebp - 0x38]
cmp dword [ebp - 0x30], edx
jae 0x6a304088
mov ecx, dword [ebx]
mov edx, dword [ebx + 0xc]
test edx, edx
je 0x6a304184
mov edi, dword [ebp - 0x30]
lea edx, [edi*8]
add edx, dword [ebx + 0x1c]
mov eax, dword [edx + 4]
rol ax, 8
rol eax, 0x10
rol ax, 8
lea eax, [ecx + eax]
mov dword [ebp - 0x3c], eax
mov eax, dword [edx]
rol ax, 8
rol eax, 0x10
rol ax, 8
inc eax
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
jne 0x6a3040aa
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
mov eax, dword [ebp - 0x3c]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
leave
ret
xor esi, esi
mov dword [ebp - 0x2c], edi
jmp 0x6a30405a
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + edi*8 + 4]
rol ax, 8
rol eax, 0x10
rol ax, 8
add eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
cmp eax, 0
jl 0x6a3041dc
je 0x6a303fb0
lea esi, [edi + 1]
cmp dword [ebp - 0x2c], esi
jbe 0x6a303f60
mov edx, dword [ebx]
mov dword [ebp - 0x34], edx
mov ecx, dword [ebx + 0xc]
mov dword [ebp - 0x30], ecx
mov edi, dword [ebp - 0x2c]
add edi, esi
shr edi, 1
mov ecx, dword [ebp - 0x30]
test ecx, ecx
jne 0x6a304024
mov eax, dword [ebx + 0x18]
mov eax, dword [eax + edi*8 + 4]
jmp 0x6a304036
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x38]
shl eax, 3
add eax, dword [ebx + 0x28]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x3c], ecx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x6a304009
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x6a3041a2
mov eax, dword [ebp + 0xc]
mov edi, dword [eax + 8]
test edi, edi
je 0x6a3041a2
lea edx, [ebx + 0x40]
mov dword [ebp - 0x40], edx
mov dword [esp], edx
call fcn.6a3059f8
test eax, eax
jne 0x6a30428a
mov esi, dword [ebx + 0x3c]
test esi, esi
je 0x6a304384
lea eax, [esi + esi*2]
lea eax, [eax*4 - 0xc]
add eax, dword [ebx + 0x38]
mov dword [ebp - 0x44], ebx
mov ebx, eax
jmp 0x6a304103
sub ebx, 0xc
test esi, esi
je 0x6a304213
dec esi
mov eax, dword [ebx]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x6a3040f8
mov dword [ebp - 0x34], ebx
mov ebx, dword [ebp - 0x44]
mov ecx, dword [ebp - 0x40]
mov dword [esp], ecx
call fcn.6a305c70
test eax, eax
jne 0x6a30428a
mov ecx, dword [ebp - 0x34]
test ecx, ecx
je 0x6a304222
mov ecx, dword [ebp - 0x34]
cmp dword [ecx + 4], 0xffffffff
je 0x6a304009
mov eax, dword [ecx + 8]
test eax, eax
je 0x6a30458a
cmp eax, 0xffffffff
je 0x6a30457e
mov ecx, dword [ebp - 0x30]
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x6a304290
lea edx, [eax + 4]
mov dword [ebp - 0x3c], edx
mov eax, dword [eax]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0x2c]
mov dword [eax], ecx
jmp 0x6a304011
mov edx, dword [ebp - 0x30]
lea eax, [edx*8]
add eax, dword [ebx + 0x1c]
add ecx, dword [eax + 4]
mov dword [ebp - 0x3c], ecx
mov eax, dword [eax]
inc eax
mov dword [ebp - 0x2c], eax
jmp 0x6a30409f
mov esi, dword [0x6a31b060]
test esi, esi
je 0x6a3041ec
mov edi, dword [0x6a31b064]
test edi, edi
jne 0x6a3040c3
call fcn.6a3056fc
mov edi, eax
jmp 0x6a3040c3
mov edx, dword [ebp + 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
call fcn.6a301958
jmp 0x6a303e3f
cmp edi, esi
jbe 0x6a303f60
mov dword [ebp - 0x2c], edi
jmp 0x6a30406e
mov dword [esp], 0x6a31412c
call sub.msvcrt.dll_getenv
mov esi, eax
test eax, eax
je 0x6a304207
cmp byte [eax], 0
jne 0x6a3043e9
mov dword [0x6a31b060], 1
jmp 0x6a3041ac
mov ebx, dword [ebp - 0x44]
mov dword [ebp - 0x34], 0
jmp 0x6a30411c
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call fcn.6a305b38
test eax, eax
jne 0x6a30428a
mov edx, dword [ebx + 0x3c]
mov dword [ebp - 0x44], edx
test edx, edx
je 0x6a30441d
lea eax, [edx + edx*2]
lea esi, [eax*4 - 0xc]
add esi, dword [ebx + 0x38]
mov dword [ebp - 0x48], ebx
mov ebx, edx
jmp 0x6a30425e
sub esi, 0xc
test ebx, ebx
je 0x6a30441a
dec ebx
mov dword [ebp - 0x34], esi
mov eax, dword [esi]
mov dword [esp + 4], edi
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x6a304253
mov ebx, dword [ebp - 0x48]
mov edx, dword [ebp - 0x40]
mov dword [esp], edx
call fcn.6a305c70
test eax, eax
je 0x6a30413a
call sub.msvcrt.dll_abort
nop
mov dword [esp], 0x6a313140
call fcn.6a3058d0
test eax, eax
jne 0x6a30428a
mov edx, dword [0x6a31b05c]
add edx, 4
xor esi, esi
xor ebx, ebx
lea edi, [ebp - 0x28]
jmp 0x6a3042ec
test ebx, ebx
je 0x6a304364
inc ebx
mov edx, ebx
shl edx, 4
mov eax, ebx
shl eax, 0xc
sub eax, edx
mov dword [0x6a31b058], eax
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_realloc
test eax, eax
je 0x6a30452b
mov dword [0x6a31b05c], eax
lea edx, [eax + 4]
mov esi, eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x24], edx
mov eax, dword [0x6a31b058]
cmp eax, 3
jbe 0x6a3042b4
sub eax, 4
mov dword [ebp - 0x28], eax
mov dword [esp + 0x10], edi
lea eax, [ebp - 0x24]
mov dword [esp + 0xc], eax
lea edx, [ebp - 0x20]
mov dword [esp + 8], edx
lea ecx, [ebp - 0x1c]
mov dword [esp + 4], ecx
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 4]
mov dword [esp], eax
call fcn.6a30cdf8
inc eax
jne 0x6a304390
call sub.msvcrt.dll__errno
cmp dword [eax], 7
je 0x6a3042b4
mov dword [esp], 0x6a313140
call fcn.6a305938
mov dword [ebp - 0x3c], 0
test eax, eax
je 0x6a303f67
jmp 0x6a30428a
mov dword [0x6a31b058], 0xff0
mov dword [esp], 0xff0
call sub.msvcrt.dll_malloc
mov ebx, 1
jmp 0x6a3042da
mov dword [ebp - 0x34], 0
jmp 0x6a30411c
mov edx, dword [ebp - 0x24]
mov eax, dword [0x6a31b05c]
mov ecx, edx
sub ecx, eax
sub ecx, 4
mov dword [eax], ecx
mov ebx, dword [ebp - 0x34]
mov ecx, dword [ebx + 8]
mov edi, dword [ebp - 0x30]
mov dword [ecx + edi*4], eax
sub eax, edx
add eax, dword [0x6a31b058]
mov ecx, eax
and ecx, 3
add edx, ecx
mov dword [0x6a31b05c], edx
and eax, 0xfffffffc
mov dword [0x6a31b058], eax
mov dword [esp], 0x6a313140
call fcn.6a305938
test eax, eax
jne 0x6a30428a
mov eax, dword [ebx + 8]
mov eax, dword [eax + edi*4]
jmp 0x6a304169
xor eax, eax
or ecx, 0xffffffff
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
mov dword [esp], ecx
mov dword [ebp - 0x50], ecx
call sub.msvcrt.dll_malloc
mov dword [ebp - 0x34], eax
test eax, eax
mov ecx, dword [ebp - 0x50]
je 0x6a30440d
mov edi, eax
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x34]
mov dword [0x6a31b064], eax
jmp 0x6a304207
mov ebx, dword [ebp - 0x48]
mov edx, dword [ebx + 0x38]
test edx, edx
je 0x6a304515
mov eax, dword [ebp - 0x44]
inc eax
imul eax, eax, 0xc
mov dword [esp + 4], eax
mov dword [esp], edx
call sub.msvcrt.dll_realloc
mov esi, eax
test esi, esi
je 0x6a30455f
mov dword [ebx + 0x38], esi
mov dword [esp], edi
call sub.msvcrt.dll__strdup
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x6a30455f
imul eax, dword [ebp - 0x44], 0xc
lea eax, [esi + eax]
mov dword [ebp - 0x34], eax
mov edi, dword [ebp - 0x4c]
mov dword [eax], edi
mov dword [eax + 4], 0xffffffff
lea eax, [ebp - 0x20]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x6a31413b
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov edx, dword [ebp + 8]
mov dword [esp], edx
call fcn.6a303e28
test eax, eax
je 0x6a304503
mov dword [esp + 4], str.charset
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
je 0x6a304503
lea esi, [eax + 8]
mov dword [esp + 4], 0x6a314145
mov dword [esp], esi
call sub.msvcrt.dll_strcspn
mov dword [ebp - 0x48], eax
add eax, 0x1f
and eax, 0xfffffff0
call fcn.6a30d5c0
lea ecx, [esp + 0x23]
and ecx, 0xfffffff0
mov dword [ebp - 0x44], ecx
mov edi, ecx
mov ecx, dword [ebp - 0x48]
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x48]
mov byte [edx + eax], 0
mov dword [esp + 4], edx
mov ecx, dword [ebp - 0x4c]
mov dword [esp], ecx
call fcn.6a30cd04
mov edi, dword [ebp - 0x34]
mov dword [edi + 4], eax
mov eax, dword [ebp - 0x34]
mov dword [eax + 8], 0
inc dword [ebx + 0x3c]
jmp 0x6a304277
mov eax, dword [ebp - 0x44]
inc eax
imul eax, eax, 0xc
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov esi, eax
jmp 0x6a30443d
mov dword [0x6a31b05c], 0
mov dword [0x6a31b058], 0
mov dword [esp], 0x6a313140
call fcn.6a305938
mov dword [ebp - 0x3c], 0xffffffff
test eax, eax
je 0x6a303f67
jmp 0x6a30428a
mov ecx, dword [ebp - 0x40]
mov dword [esp], ecx
call fcn.6a305c70
mov dword [ebp - 0x3c], 0xffffffff
test eax, eax
je 0x6a303f67
jmp 0x6a30428a
mov dword [ebp - 0x3c], 0xffffffff
jmp 0x6a303f67
mov dword [esp], 0x6a313140
call fcn.6a3058d0
test eax, eax
jne 0x6a30428a
mov edi, dword [ebp - 0x34]
cmp dword [edi + 8], 0
je 0x6a3045c6
mov dword [esp], 0x6a313140
call fcn.6a305938
test eax, eax
jne 0x6a30428a
mov edx, dword [ebp - 0x34]
mov eax, dword [edx + 8]
jmp 0x6a304152
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x38]
add eax, dword [ebx + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov dword [edi + 8], eax
test eax, eax
jne 0x6a3042a0
mov dword [edi + 8], 0xffffffff
jmp 0x6a3045a7