Function at 0x406920
Capabilities:
Get hostname
Get session user name
Query environment variable

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x62c
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x19]
mov byte [esp + 0x18], 0
rep stosd dword es:[edi], eax
mov byte [esp + 0x330], al
mov ecx, 0x41
lea edi, [esp + 0x331]
rep stosd dword es:[edi], eax
mov byte [esp + 0x228], al
mov ecx, 0x41
lea edi, [esp + 0x229]
rep stosd dword es:[edi], eax
mov byte [esp + 0x120], al
mov ecx, 0x41
lea edi, [esp + 0x121]
rep stosd dword es:[edi], eax
xor esi, esi
cmp edx, 4
mov eax, 0x105
mov dword [esp + 0x10], 0x101
mov dword [esp + 0xc], eax
je 0x406ac1
cmp edx, 8
jne 0x406ba7
cmp dword [ebx + 0x14], 1
jne 0x4069e7
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x4069e7
push 0x101
lea eax, [esp + 0x1c]
push eax
push str.USERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
mov dword [esp + 0x10], eax
je 0x4069e7
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4069d8
sub eax, edx
mov dword [esp + 0x14], eax
jne 0x406a34
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x406a10
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406a02
sub eax, edx
cmp eax, 1
jae 0x406a34
push 0
mov esi, 0xffffffe9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
push 1
push ebx
call fcn.00409040
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x18]
push eax
xor edi, edi
call fcn.00406270
mov esi, eax
add esp, 4
test esi, esi
je 0x406aa2
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x43c]
push str._Found_invalid_characters_in_the_username___s__which_will_be_used_for_the_machine_ID.
push edx
call fcn.00409a14
lea eax, [esp + 0x444]
push eax
push esi
push 1
push 3
push ebx
call fcn.00409040
lea ecx, [esp + 0x38]
push ecx
call fcn.004062d0
add esp, 0x24
test eax, eax
je 0x406a8e
push str.Unable_to_replace_invalid_characters_in_the_username.
push eax
push 3
jmp 0x406a97
push str.Proceeding_with_installation_after_replacing_invalid_characters_in_the_username.
push 0
push 1
push 3
push ebx
call fcn.00409040
add esp, 0x14
push 0x32
lea edx, [esp + 0x1c]
push edx
add ebx, 0x26c
push ebx
call fcn.004098f0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [0x417086]
mov dword [esp + 0xc], eax
mov ax, word [0x417084]
lea edx, [esp + 0xc]
mov word [esp + 0x120], ax
push edx
lea eax, [esp + 0x334]
push eax
mov byte [esp + 0x12a], cl
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
lea eax, [esp + 0x120]
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406b00
sub eax, edx
mov ecx, 0x104
sub ecx, eax
push ecx
lea edx, [esp + 0x334]
push edx
lea eax, [esp + 0x128]
push eax
call fcn.00409c00
lea ecx, [esp + 0x234]
push ecx
lea edx, [esp + 0x130]
push edx
push 0
call fcn.004067b0
mov esi, eax
add esp, 0x18
test esi, esi
je 0x406b62
push str.Error_occurred_in_the_Automatic_Domain_Name_detection.
push esi
push 2
push 1
push ebx
call fcn.00409040
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov al, byte [esp + 0x228]
test al, al
jne 0x406b8e
push str.Domain_name_could_not_be_found._This_machine_may_not_belong_to_a_domain.
mov esi, 0xfffffffe
push esi
push 2
push 3
push ebx
call fcn.00409040
add esp, 0x14
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x33
lea eax, [esp + 0x22c]
push eax
add ebx, 0x2a4
push ebx
call fcn.004098f0
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret