Function at 0x4070b0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2078
call fcn.004ced50
mov eax, dword [0x53273c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x1010]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x2060], eax
mov eax, dword [ebp + 0xc]
push ebx
mov dword [ebp - 0x203c], eax
xor ebx, ebx
push esi
lea eax, [ebp - 0x181c]
mov dword [ebp - 0x2044], edx
push edi
mov dword [ebp - 0x101c], eax
xor edi, edi
xor eax, eax
mov dword [ebp - 0x2058], edi
xor esi, esi
mov dword [ebp - 0x2070], eax
mov edi, 0x800
mov dword [ebp - 0x2050], eax
lea eax, [ebp - 0x2028]
mov dword [ebp - 0x1018], 0x800
mov byte [ebp - 0x181c], 0
mov dword [ebp - 0x2074], esi
mov dword [ebp - 0x204c], 1
mov dword [ebp - 0x2030], ecx
mov dword [ebp - 0x810], ecx
mov dword [ebp - 0x80c], edi
mov dword [ebp - 0x1828], eax
mov dword [ebp - 0x1824], edi
mov dword [ebp - 0x1820], esi
mov dword [ebp - 0x2040], esi
mov dword [ebp - 0x205c], ebx
mov dword [ebp - 0x2048], ebx
cmp dword [0x540cdc], ebx
je 0x407232
mov ebx, dword [ebp - 0x203c]
xor ecx, ecx
mov dword [ebp - 0x2040], esi
test edx, edx
jle 0x4071b5
movsx eax, byte [ebx + ecx]
sub eax, 0x2e
je 0x4071a8
sub eax, 1
je 0x4071a4
sub eax, 0x2d
jne 0x4071aa
xor esi, esi
jmp 0x4071aa
mov esi, ecx
inc ecx
cmp ecx, edx
jl 0x407191
mov dword [ebp - 0x2040], esi
mov dword [ebp - 0x2048], 0
test esi, esi
je 0x407232
add ebx, esi
sub edx, esi
mov dword [ebp - 0x205c], ebx
mov dword [ebp - 0x2058], edx
cmp esi, 3
jle 0x407232
cmp byte [ebx - 3], 0x5f
jne 0x407232
mov cl, byte [ebx - 2]
cmp cl, byte [0x51fcc0]
jne 0x407206
mov al, byte [ebx - 1]
cmp al, byte [0x51fcc1]
jne 0x407206
mov dword [ebp - 0x2050], esi
mov dword [ebp - 0x2040], 0
jmp 0x407232
cmp cl, byte [0x51fcc4]
jne 0x407232
mov al, byte [ebx - 1]
cmp al, byte [0x51fcc5]
jne 0x407232
mov dword [ebp - 0x2050], esi
sub esi, 2
mov dword [ebp - 0x2040], esi
mov dword [ebp - 0x2048], 0x51fcc0
mov ebx, dword [ebp + 0x14]
mov eax, ebx
and eax, 2
mov dword [ebp - 0x2078], eax
test bl, 0xe
jne 0x40728e
lea eax, [ebp - 0x202c]
push eax
lea eax, [ebp - 0x2068]
push eax
lea eax, [ebp - 0x2064]
push eax
push dword [0x540c18]
call fcn.00407bf0
mov edi, dword [ebp - 0x80c]
mov edx, eax
add esp, 0x10
mov dword [ebp - 0x202c], eax
mov eax, dword [ebp - 0x810]
mov dword [ebp - 0x2030], eax
test edx, edx
je 0x40728e
mov esi, dword [ebp - 0x2064]
jmp 0x4072ab
mov esi, 0x4fc5ab
mov dword [ebp - 0x2068], 0x4fc5ab
mov edx, esi
mov dword [ebp - 0x2064], esi
mov dword [ebp - 0x202c], edx
mov eax, ebx
and ebx, 1
sar eax, 1
and eax, 4
mov dword [ebp + 0x14], ebx
xor ecx, ecx
mov dword [ebp - 0x206c], eax
mov dword [ebp - 0x2034], eax
mov dword [ebp - 0x2038], ecx
nop dword [eax]
mov ebx, esi
sub ebx, edx
cmp dword [ebp - 0x206c], 0
jne 0x4073e9
test ebx, ebx
je 0x4073e1
mov al, byte [edx]
mov ecx, edx
mov dword [ebp - 0x2034], 0
cmp al, 0x41
jl 0x4072ff
cmp al, 0x5a
jle 0x407309
mov dl, al
cmp al, 0x61
jl 0x407345
cmp al, 0x7a
jg 0x407345
mov dl, al
mov eax, dword [ebp - 0x202c]
cmp byte [eax + 1], 0x3a
jne 0x407345
mov dl, byte [eax + 2]
lea ecx, [eax + 2]
mov dword [ebp - 0x2034], 4
test dl, dl
je 0x40732f
cmp ecx, esi
jne 0x407345
mov edx, dword [ebp - 0x202c]
mov eax, 4
mov ecx, dword [ebp - 0x2038]
jmp 0x4073e3
movsx eax, dl
cmp dl, 0x5c
je 0x4073ca
cmp dl, 0x2f
je 0x4073ca
test esi, esi
je 0x40739e
cmp ecx, esi
je 0x4073b6
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
je 0x4073b6
cmp al, 0x5c
je 0x407387
cmp al, 0x2f
je 0x407387
cmp ecx, esi
jne 0x407360
mov eax, dword [ebp - 0x2034]
mov edx, dword [ebp - 0x202c]
mov ecx, dword [ebp - 0x2038]
jmp 0x4073e3
mov eax, dword [ebp - 0x2034]
mov edx, dword [ebp - 0x202c]
or eax, 2
mov ecx, dword [ebp - 0x2038]
jmp 0x4073e3
test dl, dl
je 0x4073b6
lea ecx, [ecx + 1]
cmp eax, 0x5c
je 0x407387
cmp eax, 0x2f
je 0x407387
movsx eax, byte [ecx]
test eax, eax
jne 0x4073a2
mov eax, dword [ebp - 0x2034]
mov edx, dword [ebp - 0x202c]
mov ecx, dword [ebp - 0x2038]
jmp 0x4073e3
mov eax, dword [ebp - 0x2034]
mov edx, dword [ebp - 0x202c]
or eax, 1
mov ecx, dword [ebp - 0x2038]
jmp 0x4073e3
xor eax, eax
mov dword [ebp - 0x2034], eax
cmp dword [ebp - 0x2078], 0
jne 0x407546
test al, 1
jne 0x407546
test al, 4
je 0x4074f0
cmp dword [ebp - 0x206c], 0
je 0x407419
mov eax, dword [ebp - 0x203c]
mov al, byte [eax]
jmp 0x407427
mov al, byte [edx]
add edx, 2
mov dword [ebp - 0x202c], edx
sub ebx, 2
movsx ecx, al
cmp ecx, 0x61
jl 0x407437
cmp ecx, 0x7a
jg 0x407437
sub ecx, 0x20
mov edx, dword [ebp - 0x101c]
movsx eax, byte [edx]
cmp eax, ecx
je 0x4074d7
push dword [ebp - 0x1018]
mov edi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
lea eax, [ebp - 0x2054]
push edx
push eax
mov byte [ebp - 0x2054], 0x3d
mov byte [ebp - 0x2053], cl
mov word [ebp - 0x2052], 0x3a
call edi
cmp eax, dword [ebp - 0x1018]
jbe 0x4074bf
sub eax, 0xffffff80
push eax
mov dword [ebp - 0x1018], eax
call fcn.004538c0
mov esi, eax
lea ecx, [ebp - 0x181c]
mov eax, dword [ebp - 0x101c]
add esp, 4
cmp eax, ecx
je 0x4074a9
push eax
call fcn.004d2dae
add esp, 4
push dword [ebp - 0x1018]
lea eax, [ebp - 0x2054]
mov dword [ebp - 0x101c], esi
push esi
push eax
call edi
mov edi, dword [ebp - 0x80c]
mov dword [ebp - 0x1014], eax
mov eax, dword [ebp - 0x810]
mov dword [ebp - 0x2030], eax
mov esi, dword [ebp - 0x2044]
lea ecx, [ebp - 0x181c]
add esi, 0x1d
mov dword [ebp - 0x2038], ecx
add esi, ebx
jmp 0x407555
cmp dword [ebp - 0x1820], 0
jne 0x40752d
push dword [ebp - 0x1824]
push dword [ebp - 0x1828]
call fcn.004a6150
add esp, 8
mov dword [ebp - 0x1820], eax
test eax, eax
je 0x4078ec
mov eax, dword [ebp - 0x810]
mov edi, dword [ebp - 0x80c]
mov dword [ebp - 0x2030], eax
mov esi, dword [ebp - 0x2044]
lea ecx, [ebp - 0x2028]
add esi, 0x1d
mov dword [ebp - 0x2038], ecx
add esi, ebx
jmp 0x407555
mov esi, dword [ebp - 0x2044]
add esi, 0x1d
add esi, ebx
test ecx, ecx
je 0x40755b
add esi, dword [ecx + 0x808]
cmp esi, edi
jbe 0x4075ab
mov eax, dword [ebp - 0x2030]
lea ecx, [ebp - 0x1010]
cmp eax, ecx
je 0x407580
push eax
call fcn.004d2dae
mov edi, dword [ebp - 0x80c]
add esp, 4
nop
add edi, edi
cmp edi, esi
jb 0x407580
push edi
mov dword [ebp - 0x80c], edi
call fcn.004538c0
mov ecx, dword [ebp - 0x2038]
mov esi, eax
add esp, 4
mov dword [ebp - 0x2030], esi
mov dword [ebp - 0x810], esi
jmp 0x4075b1
mov esi, dword [ebp - 0x2030]
test ecx, ecx
je 0x4075e0
push dword [ecx + 0x808]
push dword [ecx + 0x800]
push esi
call fcn.004d50e0
mov eax, dword [ebp - 0x2038]
add esp, 0xc
add esi, dword [eax + 0x808]
mov byte [esi], 0x5c
inc esi
mov dword [ebp - 0x2030], esi
test ebx, ebx
je 0x407605
mov eax, dword [ebp - 0x202c]
push ebx
push eax
push esi
call fcn.004d50e0
add esi, ebx
add esp, 0xc
mov ebx, esi
mov dword [ebp - 0x2030], esi
mov byte [ebx], 0x5c
inc ebx
jmp 0x40760b
mov ebx, dword [ebp - 0x2030]
mov eax, dword [ebp - 0x2040]
xor esi, esi
xor edi, edi
mov dword [ebp - 0x2030], esi
mov dword [ebp - 0x202c], ebx
lea esi, [eax + ebx]
cmp dword [ebp - 0x2048], edi
je 0x40766a
push eax
push dword [ebp - 0x203c]
push ebx
call fcn.004d50e0
mov ecx, dword [ebp - 0x2048]
mov ebx, esi
mov esi, dword [ebp - 0x2058]
push esi
push dword [ebp - 0x205c]
movzx eax, byte [ecx]
mov byte [ebx], al
movzx eax, byte [ecx + 1]
mov byte [ebx + 1], al
add ebx, 2
push ebx
call fcn.004d50e0
add esp, 0x18
add ebx, esi
jmp 0x40768f
mov edi, dword [ebp - 0x2044]
push edi
push dword [ebp - 0x203c]
push ebx
call fcn.004d50e0
add ebx, edi
xor eax, eax
add esp, 0xc
mov edi, esi
cmp dword [ebp - 0x2040], eax
cmove edi, eax
mov byte [ebx], 0
mov esi, ebx
mov eax, dword [ebp - 0x810]
sub esi, eax
push eax
call fcn.00407ca0
add esp, 4
sub esi, eax
je 0x4076c3
mov eax, edi
sub eax, esi
test edi, edi
cmove eax, edi
cmp dword [ebp - 0x2050], 0
mov edi, eax
je 0x4076c3
sub dword [ebp - 0x202c], esi
mov esi, dword [ebp - 0x2050]
nop dword [eax]
push dword [ebp - 0x810]
call fcn.00406f10
add esp, 4
sub eax, 0
je 0x4077ae
sub eax, 2
je 0x40773e
sub eax, 1
jne 0x40777e
mov eax, dword [ebp - 0x810]
mov esi, ebx
sub esi, eax
cmp esi, 0x7ff
jb 0x40770f
mov esi, 0x7fe
push esi
jmp 0x407710
push esi
push eax
lea eax, [ebp - 0x804]
push eax
call fcn.004d50e0
add esp, 0xc
mov byte [ebp + esi - 0x804], 0
lea eax, [ebp - 0x804]
mov dword [ebp - 0x2074], eax
test edi, edi
je 0x407890
jmp 0x4077b2
mov ecx, str._amplfunc.dll
mov edx, ebx
sub edx, ecx
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [ecx + edx - 1], al
test al, al
jne 0x407747
push dword [ebp - 0x810]
lea edi, [ebx + 9]
mov dword [ebp - 0x2058], 4
mov dword [ebp - 0x205c], 0x51fcb9
call fcn.00406f10
add esp, 4
cmp eax, 1
jne 0x4077ae
push dword [ebp - 0x810]
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
jne 0x40782b
test edi, edi
je 0x40793a
mov dword [ebp - 0x2070], 1
mov dword [ebp - 0x2030], edi
jmp 0x4077b2
test edi, edi
je 0x4077ef
mov byte [edi], 0x5f
lea esi, [edi + 1]
movzx eax, byte [0x51fcc0]
mov edi, dword [ebp - 0x2058]
mov byte [esi], al
movzx eax, byte [0x51fcc1]
push edi
push dword [ebp - 0x205c]
mov byte [esi + 1], al
add esi, 2
push esi
call fcn.004d50e0
add esp, 0xc
mov byte [esi + edi], 0
xor edi, edi
jmp 0x4076c3
test esi, esi
je 0x407883
mov ecx, dword [ebp - 0x202c]
lea eax, [ecx - 3]
mov cl, byte [ecx + esi]
add eax, esi
mov byte [eax], cl
test cl, cl
je 0x40781c
nop dword [eax + eax]
mov cl, byte [eax + 4]
lea eax, [eax + 1]
mov byte [eax], cl
test cl, cl
jne 0x407810
xor esi, esi
xor edi, edi
mov dword [ebp - 0x2050], esi
jmp 0x4076d0
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x4fc77c
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x4078fb
push str.funcadd
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x4078fb
push dword [ebp - 0x810]
mov eax, dword [ebp - 0x2060]
push str.Could_not_find_funcadd_in__s_n
push dword [eax]
mov eax, dword [eax + 0xc]
call eax
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x204c], 3
jmp 0x407890
cmp dword [ebp - 0x2070], 0
jne 0x40793a
lea eax, [ebp - 0x202c]
push eax
lea eax, [ebp - 0x2068]
push eax
lea eax, [ebp - 0x2064]
push eax
push dword [ebp - 0x2068]
call fcn.00407bf0
mov edx, eax
add esp, 0x10
mov dword [ebp - 0x202c], edx
test edx, edx
je 0x40799f
mov eax, dword [ebp - 0x810]
mov edi, dword [ebp - 0x80c]
mov esi, dword [ebp - 0x2064]
mov ecx, dword [ebp - 0x2038]
mov dword [ebp - 0x2030], eax
mov eax, dword [ebp - 0x2034]
jmp 0x4072d0
mov dword [ebp - 0x204c], 2
jmp 0x407a59
push esi
mov esi, dword [ebp - 0x2060]
xor eax, eax
mov dword [ebp - 0x204c], eax
push 0x406ef0
push esi
mov eax, dword [esi + 0x2c]
call eax
mov ebx, dword [ebp - 0x2044]
push edi
mov edi, dword [ebp - 0x203c]
push ebx
push edi
push dword [ebp - 0x810]
push esi
call fcn.00440a70
add esp, 0x20
xor ecx, ecx
jmp 0x4079b7
cmp dword [ebp + 0x14], 0
je 0x40798c
mov esi, dword [ebp - 0x2030]
test esi, esi
je 0x407964
mov edi, dword [ebp - 0x2058]
push edi
push dword [ebp - 0x205c]
push esi
call fcn.004d50e0
add esp, 0xc
mov byte [esi + edi], 0
push dword [ebp - 0x810]
mov esi, dword [ebp - 0x2060]
push str.Cannot_load_library__s._n
push dword [esi]
mov eax, dword [esi + 0xc]
call eax
mov ecx, 2
add esp, 0xc
mov dword [ebp - 0x204c], ecx
jmp 0x4079ab
mov esi, dword [ebp - 0x2060]
mov ecx, 2
mov dword [ebp - 0x204c], ecx
jmp 0x4079ab
mov esi, dword [ebp - 0x2060]
mov ecx, dword [ebp - 0x204c]
mov edi, dword [ebp - 0x203c]
mov ebx, dword [ebp - 0x2044]
cmp dword [ebp + 0x14], 0
je 0x407a59
cmp ecx, 1
jne 0x407a59
cmp dword [ebp - 0x2048], 0
je 0x407a2f
push ebx
push edi
push dword [ebp - 0x810]
call fcn.004cfba0
mov eax, dword [ebp - 0x810]
mov edx, dword [ebp - 0x2040]
mov byte [ebx + eax], 0
mov eax, dword [ebp - 0x2048]
movzx ecx, byte [eax]
mov eax, dword [ebp - 0x810]
mov byte [edx + eax], cl
mov eax, dword [ebp - 0x2048]
movzx ecx, byte [eax + 1]
mov eax, dword [ebp - 0x810]
mov byte [edx + eax + 1], cl
push dword [ebp - 0x810]
mov eax, dword [esi + 0xc]
push edi
push ebx
push str.Cannot_load_library___.s__nor___s_._n
push dword [esi]
call eax
add esp, 0x20
jmp 0x407a59
mov eax, dword [esi]
mov ecx, dword [esi + 0xc]
mov esi, dword [ebp - 0x2074]
test esi, esi
je 0x407a4c
push esi
push str.Cannot_load_library___s_._n
push eax
call ecx
add esp, 0xc
jmp 0x407a59
push edi
push ebx
push str.Cannot_find_library___.s_._n
push eax
call ecx
add esp, 0x10
mov eax, dword [ebp - 0x810]
lea ecx, [ebp - 0x1010]
pop edi
pop esi
pop ebx
cmp eax, ecx
je 0x407a75
push eax
call fcn.004d2dae
add esp, 4
mov eax, dword [ebp - 0x1828]
lea ecx, [ebp - 0x2028]
cmp eax, ecx
je 0x407a8e
push eax
call fcn.004d2dae
add esp, 4
mov ecx, dword [ebp - 0x101c]
lea eax, [ebp - 0x181c]
cmp ecx, eax
je 0x407aa7
push ecx
call fcn.004d2dae
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x204c]
xor ecx, ebp
call fcn.004ceaf9
mov esp, ebp
pop ebp
ret