Function at 0x1057caf0
Capabilities:
Get session user name

Disassembly:
sub esp, 0x98c
push ebx
push ebp
push esi
mov esi, dword [esp + 0x99c]
test esi, esi
push edi
jne 0x1057cb16
pop edi
pop esi
pop ebp
mov ax, 0x10
pop ebx
add esp, 0x98c
ret 4
mov ecx, dword [0x1056faa8]
mov eax, dword [esi + 0x54]
push ecx
push eax
call fcn.1057ba10
mov ebp, eax
add esp, 8
test ebp, ebp
jne 0x1057cb40
pop edi
pop esi
pop ebp
mov ax, 2
pop ebx
add esp, 0x98c
ret 4
cmp word [ebp + 0x44], 0
jne 0x1057cb58
pop edi
pop esi
pop ebp
mov ax, 0x47
pop ebx
add esp, 0x98c
ret 4
cmp dword [ebp + 0x1b0], 0x18
jne 0x1057cb72
pop edi
pop esi
pop ebp
mov ax, 0x48
pop ebx
add esp, 0x98c
ret 4
mov ecx, 0x64
xor eax, eax
lea edi, [esp + 0x1cc]
mov byte [esp + 0x24], 0
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x4ec]
rep stosd dword es:[edi], eax
mov ecx, 0x64
lea edi, [esp + 0x35c]
mov byte [esp + 0x18], 0
mov byte [esp + 0x5c], 0
mov byte [esp + 0x68], 0
mov byte [esp + 0xec], 0
mov byte [esp + 0x14c], 0
mov byte [esp + 0x94], 0
mov byte [esp + 0x18c], 0
mov byte [esp + 0x10c], 0
mov byte [esp + 0x30], 0
mov byte [esp + 0x74], 0
mov byte [esp + 0x50], 0
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
rep stosd dword es:[edi], eax
movsx edx, word [ebp + 0x5a]
lea ecx, [esp + 0x24]
mov ax, word [ebp + edx*2 + 0x46]
push eax
push 0x1056c4d8
push ecx
call ebx
xor edx, edx
lea eax, [esp + 0x68]
mov dx, word [ebp + 0x42]
push edx
push 0x1056c4d8
push eax
call ebx
xor ecx, ecx
lea edx, [esp + 0x30]
mov cx, word [ebp + 0x44]
push ecx
push 0x1056c4d8
push edx
call ebx
mov eax, dword [0x1056dba8]
lea ecx, [esp + 0x11c]
push eax
push 0x1056c4d4
push ecx
call ebx
mov edx, dword [ebp + 0x1a8]
lea eax, [esp + 0xb0]
push edx
push 0x1056c4d4
push eax
call ebx
push 0x284
lea ecx, [esp + 0x114]
push 0x1056c4d8
push ecx
call ebx
add esp, 0x48
xor edi, edi
lea edx, [esp + 0x74]
push edi
push 0x1056c4d8
push edx
call ebx
push edi
lea eax, [esp + 0x60]
push 0x1056c4d8
push eax
call ebx
add esp, 0x18
cmp word [ebp + 0x1ac], di
jne 0x1057ccb8
push edi
lea ecx, [esp + 0xfc]
push 0x1056c4d4
push ecx
call ebx
push edi
lea edx, [esp + 0x90]
push 0x1056c4d4
push edx
call ebx
add esp, 0x18
cmp word [ebp + 0x1ac], 1
jne 0x1057ccde
cmp word [ebp + 0x1ae], di
jne 0x1057ccde
push edi
lea eax, [esp + 0x84]
push 0x1056c4d4
push eax
call ebx
add esp, 0xc
lea ecx, [esp + 0x14c]
push 0x40
push ecx
push esi
mov dword [ebp + 0x5c], edi
mov word [ebp + 0x44], di
call fcn.1057a390
cmp ax, di
jne 0x1057d14f
lea edx, [esp + 0x10c]
push 0x40
push edx
call fcn.10580780
add esp, 8
test eax, eax
jne 0x1057cd35
lea eax, [esp + 0x30]
push edi
lea ecx, [esp + 0x110]
push eax
push ecx
call fcn.105835f0
add esp, 0xc
test eax, eax
je 0x1057cd35
mov byte [esp + 0x30], 0
jmp 0x1057cd3d
mov al, byte [esp + 0x30]
test al, al
jne 0x1057cd6f
lea edx, [esp + 0x30]
push 0x40
push edx
call fcn.10583a80
add esp, 8
test eax, eax
je 0x1057cd6f
mov eax, dword [0x1056c4dc]
mov cx, word [0x1056c4e0]
mov dl, byte [0x1056c4e2]
mov dword [esp + 0x30], eax
mov word [esp + 0x34], cx
mov byte [esp + 0x36], dl
lea eax, [esp + 0x14c]
push 0x1056b6c0
push eax
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
jne 0x1057cdcb
mov ecx, dword [0x1056b6c0]
mov edx, dword [0x1056b6c4]
mov eax, dword [0x1056b6c8]
mov dword [esp + 0x10c], ecx
mov cx, word [0x1056b6cc]
mov dword [esp + 0x110], edx
mov dl, byte [0x1056b6ce]
mov dword [esp + 0x114], eax
mov word [esp + 0x118], cx
mov byte [esp + 0x11a], dl
lea eax, [esp + 0x14]
lea ecx, [esp + 0x94]
push eax
push ecx
mov dword [esp + 0x1c], 0x40
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
cmp eax, 1
jne 0x1057ce37
lea edx, [esp + 0x18c]
push 0x40
lea eax, [esp + 0x98]
push edx
push eax
call fcn.10584560
add esp, 0xc
cmp eax, 0xffffffff
je 0x1057ce37
lea edi, [esp + 0x18c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x94]
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]
jmp 0x1057ce5f
mov ecx, dword [0x1056c4dc]
mov dx, word [0x1056c4e0]
mov al, byte [0x1056c4e2]
mov dword [esp + 0x94], ecx
mov word [esp + 0x98], dx
mov byte [esp + 0x9a], al
mov ecx, dword [ebp + 0x6c]
lea edx, [esp + 0x68]
push ecx
push 0x1056c4d4
push edx
call ebx
lea eax, [esp + 0xe0]
lea ecx, [esp + 0x5c]
push eax
lea edx, [esp + 0x84]
push ecx
lea eax, [esp + 0x94]
push edx
lea ecx, [esp + 0x110]
push eax
lea edx, [esp + 0x4c]
push ecx
lea eax, [esp + 0x12c]
push edx
lea ecx, [esp + 0xb8]
push eax
lea edx, [esp + 0x90]
push ecx
lea eax, [esp + 0x88]
push edx
lea ecx, [esp + 0x48]
push eax
lea edx, [esp + 0x58]
push ecx
push edx
push 0xc
push 0x1056c4d0
call fcn.10584350
mov edx, eax
add esp, 0x44
test edx, edx
jne 0x1057cee0
push ebp
push 0x4a
jmp 0x1057d147
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x4ec]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push edx
mov eax, ecx
mov esi, edi
mov edi, ebx
mov ebx, dword [sym.imp.MSVCRT.dll_free]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0xf0]
lea edx, [esp + 0x4f0]
push ecx
push edx
push 0x1056c57c
push 3
push 0x1056c3cc
call fcn.10584350
mov edx, eax
add esp, 0x18
test edx, edx
jne 0x1057cf41
push ebp
push 0x4a
jmp 0x1057d147
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x35c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
push edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0x360]
push ecx
call fcn.10584430
mov edx, eax
add esp, 8
test edx, edx
jne 0x1057cf8e
push ebp
push 0x4a
jmp 0x1057d147
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x35c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov dword [esp + 0x10], esi
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x10]
push edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call ebx
lea ecx, [esp + 0x1d0]
lea edx, [esp + 0x360]
push ecx
push ebp
push edx
call fcn.10581700
add esp, 0x10
test ax, ax
je 0x1057cff2
push ebp
push eax
call fcn.1057a940
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98c
ret 4
lea eax, [esp + 0x1cc]
push eax
call fcn.10584120
mov esi, eax
add esp, 4
test esi, esi
jne 0x1057d010
push ebp
push 0x42
jmp 0x1057d147
lea ecx, [esp + 0x1cc]
lea edx, [esp + 0x80c]
push ecx
lea eax, [esp + 0x680]
push edx
push eax
push esi
push 3
push 0x1056c3cc
call fcn.10583f80
push esi
mov edi, eax
call ebx
add esp, 0x1c
test di, di
je 0x1057d04a
push ebp
push 0x42
jmp 0x1057d147
mov esi, 0x1056c4c8
lea eax, [esp + 0x67c]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x1057d07e
test cl, cl
je 0x1057d07a
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x1057d07e
add eax, 2
add esi, 2
test cl, cl
jne 0x1057d056
xor eax, eax
jmp 0x1057d083
sbb eax, eax
sbb eax, 0xffffffff
mov ebx, dword [sym.imp.MSVCRT.dll_atoi]
test eax, eax
jne 0x1057d0ac
lea eax, [esp + 0x80c]
push eax
call ebx
mov edi, eax
add esp, 4
cmp di, 0x46
je 0x1057d0ac
cmp di, 0x50
jne 0x1057d145
lea ecx, [esp + 0xe0]
lea edx, [esp + 0x24]
push ecx
lea eax, [esp + 0x1c]
push edx
lea ecx, [esp + 0x1d4]
push eax
push ecx
push 3
push 0x1056c4d0
call fcn.10583f80
add esp, 0x18
test eax, eax
je 0x1057d0de
push ebp
push 0x42
jmp 0x1057d147
movsx esi, word [ebp + 0x5a]
cmp esi, 9
jge 0x1057d0ea
inc esi
jmp 0x1057d0ec
xor esi, esi
lea edx, [esp + 0x18]
mov word [ebp + 0x5a], si
push edx
call ebx
mov word [ebp + 0x44], ax
lea eax, [esp + 0x28]
push eax
call ebx
lea ecx, [esp + 0xe8]
mov word [ebp + esi*2 + 0x46], ax
push ecx
call ebx
add esp, 0xc
mov word [ebp + 0x1a4], ax
test di, di
jne 0x1057d15c
lea edx, [ebp + 0x64]
push edx
call dword [sym.imp.MSVCRT.dll_time]
mov eax, dword [ebp + 0x60]
mov ecx, dword [esp + 0x9a4]
add esp, 4
mov dword [ebp + 0x68], 0x78
push eax
push ecx
call fcn.1057f890
push ebp
push edi
call fcn.1057aa10
add esp, 8
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x98c
ret 4
cmp di, 0x50
jne 0x1057d145
pop edi
pop esi
pop ebp
mov ax, 0x46
pop ebx
add esp, 0x98c
ret 4