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

Disassembly:
sub esp, 0x630
mov eax, dword [0x42cb90]
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.0040eb90
push 0x104
lea edx, [esp + 0x341]
push ebx
push edx
mov dword [esp + 0x28], 0x101
mov byte [esp + 0x348], bl
call fcn.0040eb90
push 0x104
lea eax, [esp + 0x13d]
push ebx
push eax
mov byte [esp + 0x144], bl
call fcn.0040eb90
push 0x104
lea ecx, [esp + 0x251]
push ebx
push ecx
mov byte [esp + 0x258], bl
call fcn.0040eb90
add esp, 0x30
cmp esi, 4
mov dword [esp + 0x18], 0x105
mov dword [esp + 0x14], ebx
je 0x40be2a
cmp esi, 8
jne 0x40bfc1
mov edi, dword [esp + 0xc]
cmp dword [edi + 0x14], 1
jne 0x40bd03
cmp dword [edi + 0xc], ebx
jne 0x40bd03
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 0x40bd03
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40bcf6
sub eax, edx
jne 0x40bd64
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
je 0x40bd30
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40bd20
sub eax, edx
cmp eax, 1
jae 0x40bd64
push ebx
mov esi, 0xffffffe9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 2
push 1
push edi
call fcn.0040e6f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
lea edx, [esp + 0x1c]
push edx
call fcn.0040b4b0
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x40bdcf
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.0041025a
lea edx, [esp + 0x444]
push edx
push esi
push 1
push 3
push edi
call fcn.0040e6f0
lea eax, [esp + 0x3c]
push eax
call fcn.0040b530
add esp, 0x24
cmp eax, ebx
je 0x40bdbc
push str.Unable_to_replace_invalid_characters_in_the_username.
push eax
push 3
jmp 0x40bdc4
push str.Proceeding_with_installation_after_replacing_invalid_characters_in_the_username.
push ebx
push 1
push 3
push edi
call fcn.0040e6f0
add esp, 0x14
lea eax, [esp + 0x1c]
lea edx, [eax + 1]
mov cl, byte [eax]
add eax, 1
cmp cl, bl
jne 0x40bdd6
sub eax, edx
xor ecx, ecx
cmp eax, ebx
jle 0x40bdfa
cmp byte [esp + ecx + 0x1c], 0x2e
jne 0x40bdf3
mov byte [esp + ecx + 0x1c], 0x2d
add ecx, 1
cmp ecx, eax
jl 0x40bde7
push 0x50
lea ecx, [esp + 0x20]
push ecx
add edi, 0x26c
push edi
call fcn.0040f940
add esp, 0xc
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
push ebx
push ebx
push ebx
lea edx, [esp + 0x20]
push edx
lea eax, [esp + 0x130]
push eax
call fcn.00405040
mov esi, eax
add esp, 0x14
cmp esi, ebx
jne 0x40be8d
mov eax, dword [esp + 0x14]
cmp eax, 3
je 0x40be56
cmp eax, 4
jne 0x40be8d
mov edx, dword [esp + 0xc]
push 0x51
lea ecx, [esp + 0x124]
push ecx
add edx, 0x2c4
push edx
call fcn.0040f940
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
mov ax, word [0x42714c]
mov cl, byte [0x42714e]
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 0x40bed4
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.00410dc0
lea ecx, [esp + 0x12c]
push ecx
lea edx, [esp + 0x238]
push edx
push ebx
call fcn.0040ba80
mov esi, eax
add esp, 0x18
cmp esi, ebx
je 0x40bf4c
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.0040e6f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
cmp byte [esp + 0x120], bl
jne 0x40bf8b
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.0040e6f0
add esp, 0x14
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
mov eax, dword [esp + 0xc]
push 0x51
lea edx, [esp + 0x124]
push edx
add eax, 0x2c4
push eax
call fcn.0040f940
add esp, 0xc
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [esp + 0x62c]
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret
mov ecx, dword [esp + 0x638]
mov eax, edi
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0040f6db
add esp, 0x630
ret