Function at 0x4061d0
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 0x406371
cmp edx, 8
jne 0x406457
cmp dword [ebx + 0x14], 1
jne 0x406297
mov eax, dword [ebx + 0xc]
test eax, eax
jne 0x406297
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 0x406297
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x406288
sub eax, edx
mov dword [esp + 0x14], eax
jne 0x4062e4
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 0x1c]
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x4062c0
lea eax, [esp + 0x18]
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4062b2
sub eax, edx
cmp eax, 1
jae 0x4062e4
push 0
mov esi, 0xffffffe9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
push 1
push ebx
call fcn.00408840
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.00405b20
mov esi, eax
add esp, 4
test esi, esi
je 0x406352
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.00409214
lea eax, [esp + 0x444]
push eax
push esi
push 1
push 3
push ebx
call fcn.00408840
lea ecx, [esp + 0x38]
push ecx
call fcn.00405b80
add esp, 0x24
test eax, eax
je 0x40633e
push str.Unable_to_replace_invalid_characters_in_the_username.
push eax
push 3
jmp 0x406347
push str.Proceeding_with_installation_after_replacing_invalid_characters_in_the_username.
push 0
push 1
push 3
push ebx
call fcn.00408840
add esp, 0x14
push 0x32
lea edx, [esp + 0x1c]
push edx
add ebx, 0x268
push ebx
call fcn.004090f0
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov cl, byte [0x417126]
mov dword [esp + 0xc], eax
mov ax, word [0x417124]
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 0x4063b0
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.00409430
lea ecx, [esp + 0x234]
push ecx
lea edx, [esp + 0x130]
push edx
push 0
call fcn.00406060
mov esi, eax
add esp, 0x18
test esi, esi
je 0x406412
push str.Error_occurred_in_the_Automatic_Domain_Name_detection.
push esi
push 2
push 1
push ebx
call fcn.00408840
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 0x40643e
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.00408840
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, 0x2a0
push ebx
call fcn.004090f0
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret