Function at 0x406b78
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x1b
push 0
push 0
dec ecx
jne 0x406b80
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x4073aa
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebx + 0x38]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
mov byte [ebp - 1], 0
lea eax, [ebx + 4]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
lea eax, [ebx + 8]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
lea eax, [ebx + 0xc]
mov edx, 0x4073c4
call sub.Vcl50.bpl__System__LStrAsg_qqrv
lea eax, [ebx + 0x10]
mov edx, 0x4073d0
call sub.Vcl50.bpl__System__LStrAsg_qqrv
lea eax, [ebx + 0x14]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrAsg_qqrv
lea eax, [ebx + 0x18]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrAsg_qqrv
call sub.kernel32.dll_GetACP
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x44]
call sub.Vcl50.bpl__Sysutils_IntToStr_qqrj
mov edx, dword [ebp - 0x44]
lea eax, [ebx + 0x1c]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov eax, dword [ebx + 0x1c]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x406c3e
mov eax, dword [ebx + 0x1c]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x406c3e
lea eax, [ebx + 0x1c]
mov edx, 0x4073f8
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov edx, 0x4073f8
lea eax, [ebx + 0x14]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
lea eax, [ebx + 0x14]
mov edx, dword [ebx + 0x1c]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov byte [ebx + 0x22], 0
lea eax, [ebx + 0x24]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
mov eax, dword [ebx + 0x14]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406c6a
mov byte [ebx + 0x20], 2
jmp 0x406c92
mov eax, dword [ebx + 0x14]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406c8e
mov eax, dword [ebx + 0x1c]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406c8e
mov byte [ebx + 0x20], 4
jmp 0x406c92
mov byte [ebx + 0x20], 0
mov eax, dword [ebx + 0x14]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406cb6
mov eax, dword [ebx + 0x18]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406cb6
mov byte [ebx + 0x21], 2
jmp 0x406cde
mov eax, dword [ebx + 0x14]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406cda
mov eax, dword [ebx + 0x18]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406cda
mov byte [ebx + 0x21], 1
jmp 0x406cde
mov byte [ebx + 0x21], 0
mov dl, 1
mov eax, dword [sym.imp.Vcl50.bpl__Registry_TRegistry_]
call sub.Vcl50.bpl__Registry_TRegistry__bctr_qqrv
mov esi, eax
mov edx, 0x80000002
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_SetRootKey_qqrui
mov edx, 0x407404
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_OpenKeyReadOnly_qqrx17System_AnsiString
test al, al
jne 0x406d28
lea eax, [ebx + 0x38]
mov edx, 0x407424
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_CloseKey_qqrv
mov eax, esi
call sub.Vcl50.bpl__System_TObject_Free_qqrv
jmp 0x407336
lea ecx, [ebp - 0x48]
mov edx, 0x407438
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
mov edx, dword [ebp - 0x48]
lea eax, [ebx + 4]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
lea ecx, [ebp - 0x14]
mov edx, 0x40744c
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_ReadString_qqrx17System_AnsiString
lea eax, [ebx + 0xc]
mov edx, dword [ebp - 0x14]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov eax, esi
call sub.Vcl50.bpl__Registry_TRegistry_CloseKey_qqrv
mov eax, esi
call sub.Vcl50.bpl__System_TObject_Free_qqrv
cmp dword [ebx + 4], 0
je 0x407336
mov eax, dword [ebx + 4]
call sub.Vcl50.bpl__System__LStrLen_qqrv
mov edx, dword [ebx + 4]
cmp byte [edx + eax - 1], 0x5c
je 0x406d93
lea eax, [ebx + 4]
mov edx, 0x407460
call sub.Vcl50.bpl__System__LStrCat_qqrv
cmp dword [ebp - 0x14], 0
je 0x406da8
mov eax, dword [ebp - 0x14]
mov edx, 0x4073c4
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406db5
lea eax, [ebx + 8]
mov edx, dword [ebx + 4]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
jmp 0x406e06
mov dword [ebp - 0x18], 0x20
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x40]
push eax
call sub.advapi32.dll_GetUserNameA
push dword [ebx + 4]
push 0x40746c
lea eax, [ebp - 0x4c]
lea edx, [ebp - 0x40]
mov ecx, 0x20
call sub.Vcl50.bpl__System__LStrFromArray_qqrr17System_AnsiStringpci
push dword [ebp - 0x4c]
push 0x407460
lea eax, [ebx + 8]
mov edx, 4
call sub.Vcl50.bpl__System__LStrCatN_qqrv
lea eax, [ebx + 0x10]
lea edx, [ebp - 0x40]
mov ecx, 0x20
call sub.Vcl50.bpl__System__LStrFromArray_qqrr17System_AnsiStringpci
lea eax, [ebx + 0x24]
mov ecx, 0x407480
mov edx, dword [ebx + 8]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov eax, dword [ebx + 0x24]
call sub.Vcl50.bpl__Sysutils_FileExists_qqrx17System_AnsiString
test al, al
jne 0x406e3d
lea eax, [ebx + 8]
mov edx, dword [ebx + 4]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov ecx, 0x407480
lea eax, [ebx + 0x24]
mov edx, dword [ebx + 8]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov ecx, dword [ebx + 0x24]
mov dl, 1
mov eax, dword [sym.imp.Vcl50.bpl__Inifiles_TIniFile_]
call sub.Vcl50.bpl__Inifiles_TCustomIniFile__bctr_qqrx17System_AnsiString
mov esi, eax
push 0x407498
lea eax, [ebp - 0x50]
push eax
mov ecx, 0x4074a4
mov edx, 0x4074b8
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x50]
lea eax, [ebx + 0x3c]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0
lea eax, [ebp - 0x54]
push eax
mov ecx, 0x4074d4
mov edx, 0x4074e4
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x54]
lea eax, [ebx + 0x44]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x4074fc
lea eax, [ebp - 0x58]
push eax
mov ecx, 0x407508
mov edx, 0x407528
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x58]
lea eax, [ebx + 0x48]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov eax, dword [ebx + 0x1c]
push eax
lea eax, [ebp - 0x5c]
push eax
mov ecx, 0x40753c
mov edx, 0x407550
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x5c]
lea eax, [ebx + 0x14]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x4073e0
lea eax, [ebp - 0x60]
push eax
mov edx, 0x407550
mov ecx, 0x407564
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x60]
lea eax, [ebx + 0x18]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x4073c4
lea eax, [ebp - 0x1c]
push eax
mov ecx, 0x407578
mov edx, 0x407590
mov eax, esi
mov edi, dword [eax]
call dword [edi]
lea edx, [ebp - 0x64]
mov eax, dword [ebp - 0x1c]
call sub.Vcl50.bpl__Sysutils_UpperCase_qqrx17System_AnsiString
mov edx, dword [ebp - 0x64]
lea eax, [ebp - 0x1c]
call sub.Vcl50.bpl__System__LStrLAsg_qqrv
mov eax, dword [ebp - 0x1c]
mov edx, 0x4075ac
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x406f69
mov eax, dword [ebp - 0x1c]
mov edx, 0x4074fc
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x406f69
mov eax, dword [ebp - 0x1c]
mov edx, 0x4075b8
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x406f69
mov eax, dword [ebp - 0x1c]
mov edx, 0x4075c4
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x406f6f
mov byte [ebx + 0x22], 1
jmp 0x406f73
mov byte [ebx + 0x22], 0
push 0x4075d4
lea eax, [ebp - 0x68]
push eax
mov edx, 0x407590
mov ecx, 0x4075e8
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov eax, dword [ebp - 0x68]
lea edx, [ebp - 8]
call sub.Vcl50.bpl__Sysutils_Trim_qqrx17System_AnsiString
push 0xd3
mov edx, 0x407590
mov ecx, 0x407600
mov eax, esi
mov edi, dword [eax]
call dword [edi + 8]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebx + 0x40]
mov edx, 0x407614
mov eax, esi
mov edi, dword [eax]
call dword [edi + 0x40]
push 0x4075ac
lea eax, [ebp - 0x6c]
push eax
mov ecx, 0x407628
mov edx, 0x407640
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x6c]
lea eax, [ebx + 0x4c]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x407664
lea eax, [ebp - 0x70]
push eax
mov edx, 0x407640
mov ecx, 0x407670
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x70]
lea eax, [ebx + 0x50]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x4075ac
lea eax, [ebp - 0x74]
push eax
mov edx, 0x407640
mov ecx, 0x407688
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x74]
lea eax, [ebx + 0x54]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
push 0x4073c4
lea eax, [ebp - 0x78]
push eax
mov edx, 0x407640
mov ecx, 0x40769c
mov eax, esi
mov edi, dword [eax]
call dword [edi]
mov edx, dword [ebp - 0x78]
lea eax, [ebx + 0x58]
call sub.Vcl50.bpl__System__LStrAsg_qqrv
mov eax, esi
call sub.Vcl50.bpl__System_TObject_Free_qqrv
mov eax, dword [ebx + 0x14]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x40706b
mov byte [ebx + 0x20], 2
jmp 0x407093
mov eax, dword [ebx + 0x14]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x40708f
mov eax, dword [ebx + 0x1c]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x40708f
mov byte [ebx + 0x20], 4
jmp 0x407093
mov byte [ebx + 0x20], 0
mov eax, dword [ebx + 0x14]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x4070b7
mov eax, dword [ebx + 0x18]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x4070b7
mov byte [ebx + 0x21], 2
jmp 0x4070df
mov eax, dword [ebx + 0x14]
mov edx, 0x4073e0
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x4070db
mov eax, dword [ebx + 0x18]
mov edx, 0x4073ec
call sub.Vcl50.bpl__System__LStrCmp_qqrv
jne 0x4070db
mov byte [ebx + 0x21], 1
jmp 0x4070df
mov byte [ebx + 0x21], 0
mov eax, dword [ebp - 8]
call sub.Vcl50.bpl__System__LStrLen_qqrv
test eax, eax
jle 0x407114
mov eax, dword [ebp - 8]
call sub.Vcl50.bpl__System__LStrLen_qqrv
mov edx, dword [ebp - 8]
cmp byte [edx + eax - 1], 0x3b
jne 0x407114
mov eax, dword [ebp - 8]
call sub.Vcl50.bpl__System__LStrLen_qqrv
mov edx, eax
lea eax, [ebp - 8]
mov ecx, 1
call sub.Vcl50.bpl__System__LStrDelete_qqrv
xor esi, esi
cmp dword [ebp - 8], 0
je 0x407156
lea eax, [ebx + 0x28]
push eax
xor eax, eax
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], 1
xor eax, eax
mov dword [ebp - 0x80], eax
xor eax, eax
mov dword [ebp - 0x7c], eax
lea eax, [ebp - 0x88]
mov ecx, 0xc
mov edx, 3
call sub.Vcl50.bpl__System_VarArrayCreate_qqrpxixii
jmp 0x407251
lea eax, [ebx + 0x38]
mov edx, 0x4076b0
call sub.Vcl50.bpl__System__LStrAsg_qqrv
jmp 0x407336
mov edx, dword [ebp - 8]
mov eax, 0x4076c4
call sub.Vcl50.bpl__Sysutils_AnsiPos_qqrx17System_AnsiStringt1
mov edi, eax
mov edx, esi
lea eax, [ebx + 0x28]
call sub.Vcl50.bpl__System__VarArrayRedim_qqrr14System_Varianti
test edi, edi
jle 0x4071fc
push esi
push 0
push 2
lea eax, [ebp - 0x9c]
push eax
mov ecx, edi
dec ecx
mov edx, 1
mov eax, dword [ebp - 8]
call sub.Vcl50.bpl__System__LStrCopy_qqrv
mov edx, dword [ebp - 0x9c]
lea eax, [ebp - 0x98]
call sub.Vcl50.bpl__System__VarFromLStr_qqrr14System_Variantx17System_AnsiString
lea eax, [ebp - 0x98]
push eax
lea eax, [ebx + 0x28]
push eax
call sub.Vcl50.bpl__System__VarArrayPut_qr14System_Variantrx14System_Variantii
add esp, 0x14
push esi
push 1
push 2
lea eax, [ebp - 0xac]
mov edx, dword [ebp - 0x10]
call sub.Vcl50.bpl__System__VarFromInt_qqrv
lea eax, [ebp - 0xac]
push eax
lea eax, [ebx + 0x28]
push eax
call sub.Vcl50.bpl__System__VarArrayPut_qr14System_Variantrx14System_Variantii
add esp, 0x14
lea eax, [ebp - 8]
mov ecx, edi
mov edx, 1
call sub.Vcl50.bpl__System__LStrDelete_qqrv
jmp 0x407250
push esi
push 0
push 2
lea eax, [ebp - 0xbc]
mov edx, dword [ebp - 8]
call sub.Vcl50.bpl__System__VarFromLStr_qqrr14System_Variantx17System_AnsiString
lea eax, [ebp - 0xbc]
push eax
lea eax, [ebx + 0x28]
push eax
call sub.Vcl50.bpl__System__VarArrayPut_qr14System_Variantrx14System_Variantii
add esp, 0x14
push esi
push 1
push 2
lea eax, [ebp - 0xcc]
mov edx, dword [ebp - 0x10]
call sub.Vcl50.bpl__System__VarFromInt_qqrv
lea eax, [ebp - 0xcc]
push eax
lea eax, [ebx + 0x28]
push eax
call sub.Vcl50.bpl__System__VarArrayPut_qr14System_Variantrx14System_Variantii
add esp, 0x14
lea eax, [ebp - 8]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
inc esi
cmp dword [ebp - 8], 0
jne 0x407168
mov eax, dword [ebx + 0x40]
mov edx, dword [eax]
call dword [edx + 0x14]
test eax, eax
jne 0x40728d
lea eax, [ebp - 0xd0]
mov ecx, 0x4076d0
mov edx, dword [ebx + 4]
call sub.Vcl50.bpl__System__LStrCat3_qqrv
mov edx, dword [ebp - 0xd0]
mov eax, dword [ebx + 0x40]
mov ecx, dword [eax]
call dword [ecx + 0x34]
jmp 0x407332
mov eax, dword [ebx + 0x40]
mov edx, dword [eax]
call dword [edx + 0x14]
dec eax
test eax, eax
jl 0x407332
inc eax
mov dword [ebp - 0x20], eax
xor esi, esi
lea ecx, [ebp - 8]
mov edx, esi
mov eax, dword [ebx + 0x40]
call sub.Vcl50.bpl__Classes_TStrings_GetName_qqri
lea ecx, [ebp - 0xc]
mov edx, dword [ebp - 8]
mov eax, dword [ebx + 0x40]
call sub.Vcl50.bpl__Classes_TStrings_GetValue_qqrx17System_AnsiString
lea eax, [ebp - 0xd4]
push eax
mov eax, dword [ebp - 0xc]
call sub.Vcl50.bpl__System__LStrLen_qqrv
mov edx, eax
mov ecx, 1
mov eax, dword [ebp - 0xc]
call sub.Vcl50.bpl__System__LStrCopy_qqrv
mov eax, dword [ebp - 0xd4]
mov edx, 0x407460
call sub.Vcl50.bpl__System__LStrCmp_qqrv
je 0x4072fc
lea eax, [ebp - 0xc]
mov edx, 0x407460
call sub.Vcl50.bpl__System__LStrCat_qqrv
lea ecx, [ebp - 0xd8]
mov edx, dword [ebx + 4]
mov eax, dword [ebp - 0xc]
call fcn.00406a18
mov edx, dword [ebp - 0xd8]
lea eax, [ebp - 0xc]
call sub.Vcl50.bpl__System__LStrLAsg_qqrv
mov ecx, dword [ebp - 0xc]
mov edx, esi
mov eax, dword [ebx + 0x40]
mov edi, dword [eax]
call dword [edi + 0x20]
inc esi
dec dword [ebp - 0x20]
jne 0x4072a4
mov byte [ebp - 1], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4073b1
lea eax, [ebp - 0xd8]
mov edx, 3
call sub.Vcl50.bpl__System__LStrArrayClr_qqrv
lea eax, [ebp - 0xcc]
mov edx, dword [sym.imp.Vcl50.bpl___xp_14System_Variant]
mov ecx, 3
call sub.Vcl50.bpl__System__FinalizeArray_qqrv
lea eax, [ebp - 0x9c]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
lea eax, [ebp - 0x98]
call sub.Vcl50.bpl__System__VarClr_qqrv
lea eax, [ebp - 0x78]
mov edx, 0xe
call sub.Vcl50.bpl__System__LStrArrayClr_qqrv
lea eax, [ebp - 0x1c]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
lea eax, [ebp - 0x14]
call sub.Vcl50.bpl__System__LStrClr_qqrr17System_AnsiString
lea eax, [ebp - 0xc]
mov edx, 2
call sub.Vcl50.bpl__System__LStrArrayClr_qqrv
ret