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

Disassembly:
sub esp, 0x630
mov eax, dword [0x435e80]
xor eax, esp
mov dword [esp + 0x62c], eax
mov eax, dword [esp + 0x634]
push ebx
push esi
push edi
xor ebx, ebx
push 0x100
mov esi, ecx
lea ecx, [esp + 0x21]
push ebx
push ecx
mov dword [esp + 0x18], eax
xor edi, edi
mov byte [esp + 0x28], bl
call fcn.00412590
push 0x104
lea edx, [esp + 0x341]
push ebx
push edx
mov dword [esp + 0x28], 0x101
mov byte [esp + 0x348], bl
call fcn.00412590
push 0x104
lea eax, [esp + 0x13d]
push ebx
push eax
mov byte [esp + 0x144], bl
call fcn.00412590
push 0x104
lea ecx, [esp + 0x251]
push ebx
push ecx
mov byte [esp + 0x258], bl
call fcn.00412590
add esp, 0x30
cmp esi, 4
mov dword [esp + 0x18], 0x105
mov dword [esp + 0x14], ebx
je 0x40f82a
cmp esi, 8
jne 0x40f9c1
mov edi, dword [esp + 0xc]
cmp dword [edi + 0x14], 1
jne 0x40f703
cmp dword [edi + 0xc], ebx
jne 0x40f703
push 0x101
lea edx, [esp + 0x20]
push edx
push str.USERNAME
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp eax, ebx
mov dword [esp + 0x10], eax
je 0x40f703
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f6f6
sub eax, edx
jne 0x40f764
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x40f730
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f720
sub eax, edx
cmp eax, 1
jae 0x40f764
push ebx
mov esi, 0xffffffe9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
push 1
push edi
call fcn.004120f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
lea edx, [esp + 0x1c]
push edx
call fcn.0040eeb0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40f7cf
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x43c]
push str._Found_invalid_characters_in_the_username___s__which_will_be_used_for_the_machine_ID.
push ecx
call fcn.00413e72
lea edx, [esp + 0x444]
push edx
push esi
push 1
push 3
push edi
call fcn.004120f0
lea eax, [esp + 0x3c]
push eax
call fcn.0040ef30
add esp, 0x24
cmp eax, ebx
je 0x40f7bc
push str.Unable_to_replace_invalid_characters_in_the_username.
push eax
push 3
jmp 0x40f7c4
push str.Proceeding_with_installation_after_replacing_invalid_characters_in_the_username.
push ebx
push 1
push 3
push edi
call fcn.004120f0
add esp, 0x14
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f7d6
sub eax, edx
xor ecx, ecx
cmp eax, ebx
jle 0x40f7fa
cmp byte [esp + ecx + 0x1c], 0x2e
jne 0x40f7f3
mov byte [esp + ecx + 0x1c], 0x2d
add ecx, 1
cmp ecx, eax
jl 0x40f7e7
push 0x50
lea ecx, [esp + 0x20]
push ecx
add edi, 0x26c
push edi
call fcn.00413710
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
push ebx
push ebx
push ebx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x130]
push eax
call fcn.00408690
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40f88d
mov eax, dword [esp + 0x14]
cmp eax, 3
je 0x40f856
cmp eax, 4
jne 0x40f88d
mov edx, dword [esp + 0xc]
push 0x51
lea ecx, [esp + 0x124]
push ecx
add edx, 0x2c4
push edx
call fcn.00413710
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
mov ax, word [0x42e25c]
mov cl, byte [0x42e25e]
lea edx, [esp + 0x18]
mov word [esp + 0x228], ax
push edx
lea eax, [esp + 0x334]
push eax
mov byte [esp + 0x128], bl
mov dword [esp + 0x20], 0x105
mov byte [esp + 0x232], cl
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
lea eax, [esp + 0x228]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40f8d4
sub eax, edx
mov ecx, 0x104
sub ecx, eax
push ecx
lea edx, [esp + 0x334]
push edx
lea eax, [esp + 0x230]
push eax
call fcn.004152d0
lea ecx, [esp + 0x12c]
push ecx
lea edx, [esp + 0x238]
push edx
push ebx
call fcn.0040f480
mov esi, eax
add esp, 0x18
cmp esi, ebx
je 0x40f94c
mov eax, dword [esp + 0xc]
push str.Error_occurred_in_the_Automatic_Domain_Name_detection.
push esi
push 2
push 1
push eax
call fcn.004120f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
cmp byte [esp + 0x120], bl
jne 0x40f98b
mov ecx, dword [esp + 0xc]
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 ecx
call fcn.004120f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
mov eax, dword [esp + 0xc]
push 0x51
lea edx, [esp + 0x124]
push edx
add eax, 0x2c4
push eax
call fcn.00413710
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret
mov ecx, dword [esp + 0x638]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00412a21
add esp, 0x630
ret