Function at 0x402a70
Capabilities:
Get hostname
Get session user name

Disassembly:
sub esp, 0x204
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov ecx, 0xc
lea ebx, [ebp + 0x108]
xor eax, eax
mov edi, ebx
lea esi, [ebp + 0x119]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x10
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
push esi
call dword [sym.imp.USER32.dll_CharUpperA]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x10]
mov edx, ecx
mov esi, edi
lea edi, [ebp + 0x119]
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [esp + 0x18], 0x10
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
push ebx
call dword [sym.imp.USER32.dll_CharUpperA]
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x402b5c
push ebx
mov edi, str.GUEST
call dword [sym.imp.MSVCRT.dll__strupr]
add esp, 4
mov esi, eax
mov cl, byte [esi]
mov dl, byte [edi]
mov al, cl
cmp cl, dl
jne 0x402b53
test al, al
je 0x402b4f
mov dl, byte [esi + 1]
mov cl, byte [edi + 1]
mov al, dl
cmp dl, cl
jne 0x402b53
add esi, 2
add edi, 2
test al, al
jne 0x402b2b
xor eax, eax
jmp 0x402b58
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x402b7f
lea edi, [ebp + 0x119]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebp
call fcn.00402810
xor ecx, ecx
lea edi, [ebp + 0x119]
mov dword [esp + 0x1c], ecx
xor eax, eax
mov dword [esp + 0x20], ecx
lea edx, [esp + 0x1c]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], ecx
mov byte [esp + 0x2c], cl
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x1c]
push ecx
mov ecx, ebp
call fcn.00402d00
mov al, byte [ebp + 8]
mov byte [esp + 0x14], 0
test al, al
jbe 0x402cae
mov ebx, dword [esp + 0x14]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
mov ecx, 0x69
lea edi, [esp + 0x70]
mov edx, ebx
mov byte [esp + 0x30], 0x33
rep stosd dword es:[edi], eax
and edx, 0xff
lea edi, [esp + 0x1c]
or ecx, 0xffffffff
mov al, byte [edx + ebp + 9]
lea edx, [esp + 0x3a]
mov byte [esp + 0x60], al
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x30]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x74]
mov word [esp + 0x3c], 0x1a4
mov dword [esp + 0x38], ecx
call sub.NETAPI32.dll_Netbios
test al, al
jne 0x402c99
mov si, word [esp + 0xaa]
xor dl, dl
test si, si
mov byte [esp + 0x18], dl
jbe 0x402c99
mov ecx, dword [esp + 0x18]
mov eax, ecx
and eax, 0xff
lea eax, [eax + eax*8]
shl eax, 1
cmp byte [esp + eax + 0xbd], 0x84
jne 0x402c89
cmp byte [esp + eax + 0xbb], 0
je 0x402cbb
inc dl
xor ax, ax
mov al, dl
mov byte [esp + 0x18], dl
cmp ax, si
jb 0x402c65
mov al, byte [esp + 0x14]
mov cl, byte [ebp + 8]
inc al
cmp al, cl
mov byte [esp + 0x14], al
jb 0x402bdf
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x204
ret
and ecx, 0xff
lea edx, [ebp + 0x12a]
push edx
lea eax, [ecx + ecx*8]
lea ecx, [esp + eax*2 + 0xb0]
push ecx
call fcn.00401f70
add esp, 4
push eax
call dword [sym.imp.USER32.dll_OemToCharA]
and ebx, 0xff
pop edi
pop esi
mov eax, 1
mov dl, byte [ebx + ebp + 9]
mov byte [ebp], dl
pop ebp
pop ebx
add esp, 0x204
ret