Function at 0x61ec4010
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 ecx, dword [eax + 4]
test ecx, ecx
jle 0x61ec4320
mov eax, dword [ebp + 8]
mov esi, dword [eax + 8]
test esi, esi
je 0x61ec42a0
mov edx, dword [esi + 0x30]
mov eax, dword [esi + 0x14]
xor ebx, ebx
test edx, edx
mov dword [ebp - 0x2c], eax
mov ecx, eax
je 0x61ec424d
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strlen
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sym.libintl_8.dll_libintl_hash_string
mov ecx, dword [esi + 0x2c]
xor edx, edx
mov edi, eax
div ecx
lea eax, [ecx - 2]
mov ebx, edx
mov edx, eax
mov eax, edi
mov edi, edx
xor edx, edx
div edi
mov edi, ecx
lea eax, [edx + 1]
mov edx, dword [esi + 0x34]
sub edi, eax
mov dword [ebp - 0x38], eax
sub eax, ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x3c], edi
mov edx, dword [esi + 0x30]
mov dword [ebp - 0x40], eax
jmp 0x61ec40ed
mov eax, dword [esi + 0xc]
test eax, eax
mov eax, dword [esi + 0x18]
je 0x61ec42b0
lea ecx, [eax + edi*8]
mov eax, dword [ecx]
bswap eax
cmp dword [ebp - 0x34], eax
ja 0x61ec40d9
mov eax, dword [ecx + 4]
mov edx, dword [esi]
bswap eax
add edx, eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
je 0x61ec4131
mov edx, dword [esi + 0x30]
mov edi, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x38]
add eax, ebx
add ecx, ebx
cmp ebx, edi
cmovb eax, ecx
mov ebx, eax
mov eax, dword [ebp - 0x30]
mov edi, dword [edx + ebx*4]
test eax, eax
je 0x61ec40f9
bswap edi
test edi, edi
je 0x61ec42a0
sub edi, 1
cmp dword [ebp - 0x2c], edi
ja 0x61ec40a0
mov ecx, edi
sub ecx, dword [ebp - 0x2c]
mov eax, dword [esi + 0x24]
lea eax, [eax + ecx*8]
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [eax]
jae 0x61ec40d9
mov eax, dword [eax + 4]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x61ec40d6
cmp edi, dword [ebp - 0x2c]
jae 0x61ec42d0
mov edx, dword [esi + 0xc]
mov eax, dword [esi]
test edx, edx
mov edx, dword [esi + 0x1c]
je 0x61ec4304
lea ecx, [edx + edi*8]
mov ebx, dword [ebp + 0x14]
mov edx, dword [ecx + 4]
bswap edx
add eax, edx
mov dword [ebp - 0x34], eax
mov eax, dword [ecx]
bswap eax
add eax, 1
test ebx, ebx
mov dword [ebp - 0x38], eax
je 0x61ec42f1
mov ecx, dword [ebp + 0xc]
test ecx, ecx
je 0x61ec4355
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 8]
test eax, eax
mov dword [ebp - 0x30], eax
je 0x61ec4355
lea eax, [esi + 0x40]
mov dword [esp], eax
mov dword [ebp - 0x40], eax
call sym.libintl_8.dll_libintl_rwlock_rdlock_func
test eax, eax
jne 0x61ec4350
mov edx, dword [esi + 0x3c]
test edx, edx
je 0x61ec433d
mov ecx, dword [esi + 0x38]
lea eax, [edx + edx*2]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x44], esi
mov esi, edx
lea ebx, [ecx + eax*4 - 0xc]
mov edi, ebx
jmp 0x61ec41cb
sub edi, 0xc
test esi, esi
je 0x61ec4337
mov eax, dword [ebp - 0x30]
sub esi, 1
mov ebx, edi
mov dword [esp + 4], eax
mov eax, dword [edi]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x61ec41c0
mov esi, dword [ebp - 0x44]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x3c], ebx
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libintl_8.dll_libintl_rwlock_unlock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [ebp - 0x3c]
cmp dword [eax + 4], 0xffffffff
je 0x61ec42f1
mov eax, dword [eax + 8]
test eax, eax
je 0x61ec43d6
cmp eax, 0xffffffff
je 0x61ec43a0
mov eax, dword [eax + edi*4]
test eax, eax
je 0x61ec448e
lea edx, [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], eax
jmp 0x61ec42f1
mov ecx, esi
mov esi, ebx
je 0x61ec4131
lea ebx, [edi + 1]
cmp ebx, ecx
jae 0x61ec42a0
mov eax, dword [esi]
mov dword [ebp - 0x30], ebx
mov ebx, esi
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 0xc]
mov esi, ecx
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x38]
lea edi, [eax + esi]
mov eax, dword [ebx + 0x18]
shr edi, 1
test ecx, ecx
mov eax, dword [eax + edi*8 + 4]
je 0x61ec427b
bswap eax
add eax, dword [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jns 0x61ec4240
cmp dword [ebp - 0x30], edi
mov esi, edi
jb 0x61ec4263
nop
lea esi, [esi]
xor eax, eax
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [eax + edi*8]
mov ecx, dword [ebp - 0x34]
cmp ecx, dword [eax]
ja 0x61ec40d9
mov edx, dword [esi]
mov eax, dword [eax + 4]
jmp 0x61ec40c1
mov edx, edi
sub edx, dword [ebp - 0x2c]
mov eax, dword [esi + 0x28]
lea eax, [eax + edx*8]
mov edx, dword [eax + 4]
mov eax, dword [eax]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x38], eax
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jne 0x61ec416c
mov eax, dword [ebp + 0x18]
mov edx, dword [ebp - 0x38]
mov dword [eax], edx
mov eax, dword [ebp - 0x34]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [edx + edi*8]
add eax, dword [edx + 4]
mov dword [ebp - 0x34], eax
mov eax, dword [edx]
add eax, 1
mov dword [ebp - 0x38], eax
jmp 0x61ec42e6
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.libintl_8.dll__nl_load_domain
jmp 0x61ec4027
mov edi, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x44]
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libintl_8.dll_libintl_rwlock_unlock_func
test eax, eax
je 0x61ec4417
call sub.msvcrt.dll_abort
mov edx, dword [0x61ede028]
mov eax, dword [0x61ede024]
test edx, edx
je 0x61ec43aa
test eax, eax
mov dword [ebp - 0x30], eax
jne 0x61ec4188
call sym.libintl_8.dll_locale_charset
mov dword [ebp - 0x30], eax
jmp 0x61ec4188
mov dword [esp], 0x61ed80c0
mov dword [0x61ede030], 0
mov dword [0x61ede02c], 0
call sym.libintl_8.dll_libintl_lock_unlock_func
test eax, eax
jne 0x61ec4350
mov eax, 0xffffffff
jmp 0x61ec42a2
mov dword [esp], 0x61ed90cc
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x61ec43c5
cmp byte [eax], 0
jne 0x61ec46a0
mov eax, dword [0x61ede024]
mov dword [0x61ede028], 1
jmp 0x61ec4364
mov dword [esp], 0x61ed80c0
call sym.libintl_8.dll_libintl_lock_lock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 8]
test eax, eax
je 0x61ec4700
mov dword [esp], 0x61ed80c0
call sym.libintl_8.dll_libintl_lock_unlock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 8]
jmp 0x61ec4219
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libintl_8.dll_libintl_rwlock_wrlock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [esi + 0x3c]
test eax, eax
mov dword [ebp - 0x44], eax
mov eax, dword [esi + 0x38]
je 0x61ec479a
mov edx, dword [ebp - 0x44]
mov ebx, eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x4c], edi
mov dword [ebp - 0x50], esi
mov edi, dword [ebp - 0x30]
lea eax, [edx + edx*2]
lea ebx, [ebx + eax*4 - 0xc]
mov esi, ebx
mov ebx, edx
jmp 0x61ec446b
sub esi, 0xc
test ebx, ebx
je 0x61ec4586
mov dword [esp + 4], edi
mov eax, dword [esi]
sub ebx, 1
mov dword [ebp - 0x3c], esi
mov dword [esp], eax
call sub.msvcrt.dll_strcmp
test eax, eax
jne 0x61ec4460
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
jmp 0x61ec41ee
mov dword [esp], 0x61ed80c0
call sym.libintl_8.dll_libintl_lock_lock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [0x61ede030]
xor esi, esi
mov dword [ebp - 0x2c], edi
xor ebx, ebx
mov edi, esi
mov esi, dword [ebp - 0x38]
add eax, 4
jmp 0x61ec44ed
test edi, edi
je 0x61ec4564
add edi, 1
mov dword [esp], ebx
imul eax, edi, 0xff0
mov dword [esp + 4], eax
mov dword [0x61ede02c], eax
call sub.msvcrt.dll_realloc
mov ebx, eax
test ebx, ebx
je 0x61ec437c
lea eax, [ebx + 4]
mov dword [0x61ede030], ebx
mov dword [ebp - 0x20], eax
mov eax, dword [0x61ede02c]
mov edx, dword [ebp - 0x34]
mov dword [ebp - 0x24], esi
cmp eax, 3
mov dword [ebp - 0x28], edx
jbe 0x61ec44b8
sub eax, 4
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
mov dword [esp + 0x10], eax
lea eax, [ebp - 0x20]
mov dword [esp + 0xc], eax
lea eax, [ebp - 0x24]
mov dword [esp + 8], eax
lea eax, [ebp - 0x28]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov eax, dword [eax + 4]
mov dword [esp], eax
call sub.iconv.dll_iconv
cmp eax, 0xffffffff
jne 0x61ec4730
call dword [sym.imp.msvcrt.dll__errno]
cmp dword [eax], 7
je 0x61ec44b8
mov dword [esp], 0x61ed80c0
call sym.libintl_8.dll_libintl_lock_unlock_func
test eax, eax
je 0x61ec42a2
jmp 0x61ec4350
mov dword [esp], 0xff0
mov dword [0x61ede02c], 0xff0
mov edi, 1
call sub.msvcrt.dll_malloc
mov ebx, eax
jmp 0x61ec44dc
mov edi, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x50]
mov edx, dword [ebp - 0x48]
mov eax, dword [ebp - 0x44]
test edx, edx
lea eax, [eax + eax*2 + 3]
je 0x61ec4788
shl eax, 2
mov dword [esp], edx
mov dword [esp + 4], eax
call sub.msvcrt.dll_realloc
mov ebx, eax
test ebx, ebx
je 0x61ec46e2
mov eax, dword [ebp - 0x30]
mov dword [esi + 0x38], ebx
mov dword [esp], eax
call sub.msvcrt.dll__strdup
test eax, eax
mov edx, eax
mov dword [ebp - 0x30], eax
je 0x61ec46e2
mov eax, dword [ebp - 0x44]
lea eax, [eax + eax*2]
lea eax, [ebx + eax*4]
mov ebx, eax
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x1c]
mov dword [ebx], edx
mov dword [ebx + 4], 0xffffffff
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x61ed90db
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym.libintl_8.dll__nl_find_msg
cmp eax, 0xffffffff
je 0x61ec42a2
test eax, eax
je 0x61ec468d
mov dword [esp + 4], str.charset
mov dword [esp], eax
call sub.msvcrt.dll_strstr
test eax, eax
je 0x61ec468d
lea ebx, [eax + 8]
mov dword [esp + 4], 0x61ed90e5
mov dword [esp], ebx
call sub.msvcrt.dll_strcspn
mov edx, eax
lea eax, [eax + 0x1f]
shr eax, 4
shl eax, 4
call fcn.61ed0290
sub esp, eax
lea ecx, [esp + 0x23]
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
and ecx, 0xfffffff0
mov dword [esp], ecx
mov dword [ebp - 0x44], ecx
call fcn.61ed0670
mov ecx, dword [ebp - 0x44]
mov byte [eax], 0
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], ecx
mov dword [esp], eax
call sub.iconv.dll_iconv_open
mov edx, dword [ebp - 0x3c]
mov dword [edx + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [eax + 8], 0
add dword [esi + 0x3c], 1
jmp 0x61ec41ee
mov dword [esp], eax
call sub.msvcrt.dll_strlen
lea edx, [eax + 1]
mov dword [esp], edx
mov dword [ebp - 0x30], edx
call sub.msvcrt.dll_malloc
test eax, eax
mov ecx, eax
je 0x61ec46d5
mov edx, dword [ebp - 0x30]
mov dword [esp + 4], ebx
mov dword [esp], eax
mov dword [ebp - 0x30], eax
mov dword [esp + 8], edx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x30]
mov dword [0x61ede024], ecx
mov eax, ecx
jmp 0x61ec43ca
mov eax, dword [ebp - 0x40]
mov dword [esp], eax
call sym.libintl_8.dll_libintl_rwlock_unlock_func
test eax, eax
je 0x61ec43a0
jmp 0x61ec4350
mov dword [esp + 4], 4
mov eax, dword [ebp - 0x2c]
add eax, dword [esi + 0x20]
mov dword [esp], eax
call sub.msvcrt.dll_calloc
mov edx, dword [ebp - 0x3c]
test eax, eax
mov dword [edx + 8], eax
jne 0x61ec44a2
mov dword [edx + 8], 0xffffffff
jmp 0x61ec43f8
mov ecx, dword [ebp - 0x20]
mov eax, dword [0x61ede030]
mov esi, dword [ebp - 0x3c]
mov edi, dword [ebp - 0x2c]
mov edx, ecx
sub edx, eax
lea ebx, [edx - 4]
mov dword [eax], ebx
mov ebx, dword [esi + 8]
mov dword [ebx + edi*4], eax
mov eax, dword [0x61ede02c]
mov dword [esp], 0x61ed80c0
sub eax, edx
mov edx, eax
and eax, 0xfffffffc
and edx, 3
mov dword [0x61ede02c], eax
add edx, ecx
mov dword [0x61ede030], edx
call sym.libintl_8.dll_libintl_lock_unlock_func
test eax, eax
jne 0x61ec4350
mov eax, dword [esi + 8]
mov eax, dword [eax + edi*4]
jmp 0x61ec422d
shl eax, 2
mov dword [esp], eax
call sub.msvcrt.dll_malloc
mov ebx, eax
jmp 0x61ec45af
mov dword [ebp - 0x48], eax
jmp 0x61ec458c