Function at 0x47f170
Capabilities:
Get session user name
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x8f8
mov eax, dword [esp + 0x8fc]
push ebx
push ebp
push eax
call dword [sym.imp.USER32.dll_GetMenuItemCount]
xor ebx, ebx
xor ebp, ebp
cmp eax, ebx
mov dword [esp + 0x30], eax
jle 0x47f902
push esi
push edi
mov ecx, dword [0x546560]
xor eax, eax
mov dword [esp + 0x10], ecx
mov ecx, 0xb
lea edi, [esp + 0x3c]
lea edx, [esp + 0x68]
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x90c]
lea eax, [esp + 0x3c]
push eax
push 1
push ebp
push ecx
mov word [esp + 0x78], bx
mov dword [esp + 0x4c], 0x2c
mov dword [esp + 0x50], 0x17
mov dword [esp + 0x54], ebx
mov dword [esp + 0x70], edx
mov dword [esp + 0x74], 0x50
call dword [sym.imp.USER32.dll_GetMenuItemInfoW]
lea edx, [esp + 0x68]
test edx, edx
jne 0x47f1fa
xor eax, eax
jmp 0x47f205
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x68]
push ecx
push eax
lea ecx, [esp + 0x18]
call fcn.00405870
mov eax, dword [esp + 0x50]
cmp eax, ebx
je 0x47f3b6
mov esi, dword [esp + 0x914]
push esi
push ebx
push eax
call fcn.0047f170
add esp, 0xc
cmp esi, ebx
je 0x47f3b6
mov edx, dword [esp + 0x10]
push 0x54bbf8
push edx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f259
mov eax, dword [esp + 0x50]
mov dword [0x55ab34], eax
mov ecx, dword [esp + 0x10]
push 0x54bbec
push ecx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f279
mov edx, dword [esp + 0x50]
mov dword [0x55ab30], edx
mov eax, dword [esp + 0x10]
push 0x54bbe0
push eax
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f299
mov ecx, dword [esp + 0x50]
mov dword [0x55ab18], ecx
mov edx, dword [esp + 0x10]
push 0x54bbd4
push edx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f2b8
mov eax, dword [esp + 0x50]
mov dword [0x55ab1c], eax
mov ecx, dword [esp + 0x10]
push 0x54bbc4
push ecx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f31b
mov edx, dword [esp + 0x50]
mov eax, 0x54bbc0
test eax, eax
mov dword [0x55ab20], edx
je 0x47f2ec
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
jmp 0x47f2ee
xor esi, esi
push esi
lea ecx, [esp + 0x14]
call fcn.00405660
test eax, eax
je 0x47f31b
mov ecx, dword [esp + 0x10]
inc esi
push esi
push 0x54bbc0
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.00405bb0
mov edx, dword [esp + 0x10]
push 0x54bbb4
push edx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f374
mov eax, str.________
test eax, eax
je 0x47f345
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
jmp 0x47f347
xor esi, esi
push esi
lea ecx, [esp + 0x14]
call fcn.00405660
test eax, eax
je 0x47f374
mov ecx, dword [esp + 0x10]
inc esi
push esi
push str.________
push ecx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x10]
push 0xffffffffffffffff
call fcn.00405bb0
mov edx, dword [esp + 0x10]
push 0x54bb9c
push edx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f3b6
mov eax, dword [0x54a30c]
mov edx, dword [esp + 0x90c]
lea ecx, [esp + 0x3c]
add eax, 0xab7c
push ecx
push 1
push ebp
push edx
mov dword [esp + 0x50], 2
mov dword [esp + 0x5c], eax
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebx
je 0x47f8dc
push eax
call fcn.0053183e
add esp, 4
mov esi, eax
mov eax, dword [0x546560]
lea ecx, [esp + 0x20]
push esi
push 0x547b34
push ecx
mov dword [esp + 0x2c], eax
call fcn.00405cb0
mov edx, dword [0x546560]
add esp, 0xc
lea eax, [esp + 0x24]
mov dword [esp + 0x24], edx
push esi
push str._05d
push eax
call fcn.00405cb0
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
push ecx
push edx
call fcn.00531809
add esp, 0x14
test eax, eax
je 0x47f434
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
push eax
push ecx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f7e0
lea edx, [esp + 0x34]
push esi
push edx
call fcn.004ba880
mov ecx, dword [esp + 0x18]
mov esi, eax
add esp, 8
mov eax, dword [esi]
cmp ecx, eax
je 0x47f48e
cmp dword [ecx - 0xc], ebx
jge 0x47f460
mov edx, dword [0x546564]
add ecx, 0xfffffff4
cmp ecx, edx
jne 0x47f465
cmp dword [eax - 0xc], ebx
jge 0x47f475
push eax
mov eax, dword [eax - 8]
push eax
lea ecx, [esp + 0x18]
call fcn.00405870
jmp 0x47f48e
lea ecx, [esp + 0x10]
call fcn.00412670
mov esi, dword [esi]
mov dword [esp + 0x10], esi
add esi, 0xfffffff4
push esi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, dword [esp + 0x34]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f4c1
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f4c7
mov edx, dword [esp + 0x34]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
jmp 0x47f4c7
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x20]
push 0x54bb84
push eax
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f578
mov ecx, dword [0x546560]
mov edx, str._t_F9_
test edx, edx
mov dword [esp + 0x14], ecx
je 0x47f52e
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, ebx
je 0x47f52e
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x47f52e
mov eax, dword [esp + 0x14]
inc esi
push esi
push str._t_F9_
push eax
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [esp + 0x14]
push eax
mov ecx, dword [eax - 8]
push ecx
lea ecx, [esp + 0x18]
call fcn.00405a90
mov eax, dword [esp + 0x14]
mov ecx, dword [0x546564]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x47f7e6
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f7e6
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.00531732
add esp, 4
jmp 0x47f7e6
mov ecx, dword [esp + 0x24]
push 0x54bb70
push ecx
call fcn.00531809
add esp, 8
test eax, eax
jne 0x47f7e6
cmp dword [esp + 0x50], ebx
jne 0x47f7e6
mov edx, dword [0x55a51c]
cmp dword [edx - 8], ebx
jne 0x47f610
mov eax, dword [0x553d9c]
mov ecx, 0x1ff
mov dword [esp + 0x108], eax
xor eax, eax
lea edi, [esp + 0x10c]
lea edx, [esp + 0x108]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x1c]
mov dword [esp + 0x1c], 0x400
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
lea eax, [esp + 0x108]
test eax, eax
je 0x47f5f7
lea ecx, [esp + 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edx, [esp + 0x108]
mov ecx, 0x55a51c
push edx
push eax
call fcn.00405870
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [0x546560]
mov ecx, 0x547fa4
test ecx, ecx
mov dword [esp + 0x14], eax
je 0x47f65c
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, ebx
je 0x47f65c
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x47f65c
mov edx, dword [esp + 0x14]
inc esi
push esi
push 0x547fa4
push edx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x14]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [0x546560]
mov ecx, 0x54bb6c
test ecx, ecx
mov dword [esp + 0x18], eax
je 0x47f6a8
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
cmp esi, ebx
je 0x47f6a8
push esi
lea ecx, [esp + 0x1c]
call fcn.00405530
test eax, eax
je 0x47f6a8
mov edx, dword [esp + 0x18]
inc esi
push esi
push 0x54bb6c
push edx
call fcn.00405400
add esp, 0xc
lea ecx, [esp + 0x18]
push 0xffffffffffffffff
call fcn.00405bb0
mov eax, dword [0x546560]
mov dword [esp + 0x2c], eax
mov eax, dword [0x55a51c]
push eax
mov ecx, dword [eax - 8]
mov eax, dword [esp + 0x1c]
push ecx
push eax
mov edx, dword [eax - 8]
lea ecx, [esp + 0x38]
push edx
call fcn.004059f0
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x28]
push eax
call fcn.00405440
lea ecx, [esp + 0x2c]
call fcn.00405700
mov ecx, dword [0x546560]
mov eax, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
push eax
mov edx, dword [eax - 8]
mov eax, dword [esp + 0x2c]
push edx
push eax
mov eax, dword [eax - 8]
lea ecx, [esp + 0x28]
push eax
call fcn.004059f0
lea ecx, [esp + 0x1c]
push ecx
lea ecx, [esp + 0x34]
call fcn.00405440
lea ecx, [esp + 0x1c]
call fcn.00405700
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0x10]
push eax
mov edx, dword [eax - 8]
push edx
call fcn.00405a90
mov eax, dword [esp + 0x30]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f75d
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f75d
mov edx, dword [esp + 0x30]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x28]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f788
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f788
mov edx, dword [esp + 0x28]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x18]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f7b3
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f7b3
mov edx, dword [esp + 0x18]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
mov eax, dword [esp + 0x14]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f7e6
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f7e6
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
jmp 0x47f7e6
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [esp + 0x10]
cmp dword [eax - 8], ebx
jne 0x47f89a
mov ecx, dword [0x546560]
lea edx, [esp + 0x68]
test edx, edx
mov dword [esp + 0x14], ecx
je 0x47f861
lea eax, [esp + 0x68]
shr eax, 0x10
jne 0x47f823
xor ecx, ecx
lea edx, [esp + 0x68]
mov cx, dx
push ecx
lea ecx, [esp + 0x18]
call fcn.00413c90
jmp 0x47f861
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov esi, eax
cmp esi, ebx
je 0x47f861
push esi
lea ecx, [esp + 0x18]
call fcn.00405530
test eax, eax
je 0x47f861
mov edi, dword [esp + 0x14]
lea ecx, [esi + esi]
mov edx, ecx
lea esi, [esp + 0x68]
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, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
call fcn.004129b0
mov eax, dword [esp + 0x14]
mov edx, dword [0x546564]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x47f89a
add eax, 0xfffffff4
push eax
call edi
test eax, eax
jg 0x47f89a
mov edx, dword [esp + 0x14]
add edx, 0xfffffff4
push edx
call fcn.00531732
add esp, 4
push ebx
lea ecx, [esp + 0x14]
mov dword [esp + 0x44], 0x10
mov dword [esp + 0x48], ebx
call fcn.00413620
mov ecx, dword [esp + 0x90c]
mov dword [esp + 0x60], eax
lea eax, [esp + 0x3c]
push eax
push 1
push ebp
push ecx
call dword [sym.imp.USER32.dll_SetMenuItemInfoW]
lea ecx, [esp + 0x24]
call fcn.00405700
lea ecx, [esp + 0x20]
call fcn.00405700
lea ecx, [esp + 0x10]
call fcn.00405700
mov eax, dword [esp + 0x38]
inc ebp
cmp ebp, eax
jl 0x47f198
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x8f8
ret
pop ebp
mov eax, 1
pop ebx
add esp, 0x8f8
ret