Function at 0x406540
Capabilities:
Get session user name
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44359b
mov eax, dword fs:[0]
push eax
sub esp, 0x568
mov eax, dword [0x45600c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x32
lea eax, [ebp - 0x198]
push 0
push eax
call fcn.00429e30
add esp, 0xc
mov dword [ebp - 0x408], 0x32
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x1fc]
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
xorps xmm0, xmm0
movups xmmword [ebp - 0x9c], xmm0
movups xmmword [ebp - 0x8c], xmm0
movq qword [ebp - 0x7c], xmm0
call fcn.0041e5b0
lea edx, [ebp - 0x9c]
sub edx, eax
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x4065c1
push 0x1f4
lea eax, [ebp - 0x3f0]
push 0
push eax
call fcn.00429e30
push 0x64
lea eax, [ebp - 0x74]
push 0
push eax
call fcn.00429e30
mov si, word [ebp - 0x9c]
add esp, 0x18
mov di, word [ebp - 0x9a]
cmp si, 0x58
jne 0x406626
cmp di, 0x50
jne 0x406626
xor ecx, ecx
movzx eax, word [ecx + str.Application_Data_time.e]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x76], ax
test ax, ax
jne 0x406610
jmp 0x406644
xor ecx, ecx
nop dword [eax + eax]
movzx eax, word [ecx + str.AppDataLocal_time.e]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x76], ax
test ax, ax
jne 0x406630
push 0x44da7c
call fcn.0042e7b6
lea edx, [ebp - 0x3f0]
add esp, 4
sub edx, eax
nop dword [eax]
movzx ecx, word [eax]
lea eax, [eax + 2]
mov word [edx + eax - 2], cx
test cx, cx
jne 0x406660
cmp si, 0x58
jne 0x406699
cmp di, 0x50
jne 0x406699
xor ecx, ecx
nop
movzx eax, word [ecx + 0x44da94]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x3f2], ax
test ax, ax
jne 0x406680
jmp 0x4066cd
lea ecx, [ebp - 0x3f0]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4066a2
mov eax, dword [0x44dac8]
mov dword [ecx], eax
mov eax, dword [0x44dacc]
mov dword [ecx + 4], eax
mov eax, dword [0x44dad0]
mov dword [ecx + 8], eax
mov eax, dword [0x44dad4]
mov dword [ecx + 0xc], eax
lea edx, [ebp - 0x1fc]
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4066d5
lea edi, [ebp - 0x3f0]
sub edx, esi
add edi, 0xfffffffe
nop dword [eax + eax]
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4066f0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea edx, [ebp - 0x74]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, edx
nop
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406710
lea edi, [ebp - 0x3f0]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406726
mov ecx, edx
lea eax, [ebp - 0x400]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
sub esp, 8
lea eax, [ebp - 0x3f0]
lea ecx, [ebp - 0x4c4]
push 1
push eax
call fcn.0041f6c0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x4c4]
mov eax, dword [ecx + 4]
cmp dword [ebp + eax - 0x4b8], 0
je 0x406d35
push 0xc8
lea eax, [ebp - 0x164]
push 0
push eax
call fcn.00429e30
add esp, 0xc
xor ecx, ecx
nop word [eax + eax]
movzx eax, word [ecx + 0x44d564]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x166], ax
test ax, ax
jne 0x4067a0
movzx ecx, word [ebp - 0x3fa]
push 0xa
lea eax, [ecx + 3]
cmp eax, 0x1f
lea eax, [ebp - 0x74]
push eax
lea eax, [ecx + 3]
jle 0x4067d2
lea eax, [ecx - 0x1b]
push eax
call fcn.0042e8b9
lea eax, [ebp - 0x74]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4067e1
sub eax, edx
sar eax, 1
cmp eax, 1
jne 0x406813
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406800
mov eax, dword [str.0__:]
mov dword [edi], eax
lea edx, [ebp - 0x74]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406820
lea edi, [ebp - 0x164]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406836
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406860
mov eax, dword [0x44dadc]
mov dword [edi], eax
lea eax, [ebp - 0x74]
push 0xa
push eax
movzx eax, word [ebp - 0x3fe]
push eax
call fcn.0042e8b9
lea ecx, [ebp - 0x74]
add esp, 0xc
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406890
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jne 0x4068c3
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4068b0
mov eax, dword [str.0__:]
mov dword [edi], eax
lea edx, [ebp - 0x74]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x4068d0
lea edi, [ebp - 0x164]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x4068e6
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406910
mov eax, dword [0x44dadc]
mov dword [edi], eax
lea eax, [ebp - 0x74]
push 0xa
push eax
movzx eax, word [ebp - 0x400]
push eax
call fcn.0042e8b9
lea ecx, [ebp - 0x74]
add esp, 0xc
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406940
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jne 0x406973
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406960
mov eax, dword [str.0__:]
mov dword [edi], eax
lea edx, [ebp - 0x74]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406980
lea edi, [ebp - 0x164]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406996
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4069c0
mov eax, dword [0x44dae0]
mov dword [edi], eax
lea eax, [ebp - 0x74]
push 0xa
push eax
movzx eax, word [ebp - 0x3f8]
push eax
call fcn.0042e8b9
lea ecx, [ebp - 0x74]
add esp, 0xc
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4069f0
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jne 0x406a23
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406a10
mov eax, dword [str.0__:]
mov dword [edi], eax
lea edx, [ebp - 0x74]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406a30
lea edi, [ebp - 0x164]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406a46
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406a70
mov eax, dword [0x44dae4]
mov dword [edi], eax
lea eax, [ebp - 0x74]
push 0xa
push eax
movzx eax, word [ebp - 0x3f6]
push eax
call fcn.0042e8b9
lea ecx, [ebp - 0x74]
add esp, 0xc
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406aa0
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jne 0x406ad3
lea edi, [ebp - 0x164]
add edi, 0xfffffffe
nop dword [eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x406ac0
mov eax, dword [str.0__:]
mov dword [edi], eax
lea edx, [ebp - 0x74]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406ae0
lea edi, [ebp - 0x164]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406af6
mov ecx, edx
lea eax, [ebp - 0x3f0]
shr ecx, 2
sub esp, 0xc
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
lea ecx, [ebp - 0x574]
call fcn.0041f1f0
mov byte [ebp - 4], 1
lea edx, [ebp - 0x164]
lea ecx, [ebp - 0x574]
call fcn.00424c10
cmp dword [ebp - 0x524], 0
lea esi, [ebp - 0x570]
jne 0x406b4d
xor esi, esi
jmp 0x406b74
lea ecx, [ebp - 0x570]
call fcn.00422ed0
push dword [ebp - 0x524]
xor ecx, ecx
test al, al
cmove esi, ecx
call fcn.004302c4
xor ecx, ecx
add esp, 4
test eax, eax
cmovne esi, ecx
push 2
push 0
lea ecx, [ebp - 0x570]
call fcn.00423060
test esi, esi
jne 0x406bae
mov eax, dword [ebp - 0x574]
lea ecx, [ebp - 0x574]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x406ba6
or eax, 4
push 0
push eax
call fcn.00403670
push 2
lea eax, [ebp - 0x3f0]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov byte [ebp - 4], 0
lea eax, [ebp - 0x50c]
mov dword [ebp - 0x404], eax
mov eax, dword [ebp - 0x574]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ofstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x574]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x578], eax
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x570]
call fcn.004201b0
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x574]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ostream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x574]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ebp + ecx - 0x578], eax
lea eax, [ebp - 0x50c]
mov dword [ebp - 0x404], eax
mov dword [ebp - method.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov byte [ebp - 4], 0
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004281ff
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x454]
mov dword [ebp - 0x404], eax
mov eax, dword [ebp - 0x4c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x4c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x4c8], eax
mov dword [ebp - 4], 5
lea ecx, [ebp - 0x4b4]
call fcn.004201b0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x4c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x4c8], eax
lea eax, [ebp - 0x454]
mov dword [ebp - 0x404], eax
mov dword [ebp - method.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [ebp - 4], 0xffffffff
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004281ff
push ecx
push 1
lea eax, [ebp - 0x3f0]
push eax
lea ecx, [ebp - 0x4c4]
call fcn.0041f6c0
mov dword [ebp - 4], 0
mov ecx, dword [ebp - 0x4c4]
mov eax, dword [ecx + 4]
cmp dword [ebp + eax - 0x4b8], 0
jne 0x406782
mov eax, dword [ecx + 4]
test byte [ebp + eax - 0x4b8], 1
jne 0x406d78
nop dword [eax]
nop word [eax + eax]
sub esp, 8
lea eax, [ebp - 0x198]
lea ecx, [ebp - 0x4c4]
push eax
call fcn.00420790
mov eax, dword [ebp - 0x4c4]
mov eax, dword [eax + 4]
test byte [ebp + eax - 0x4b8], 1
je 0x406d50
cmp dword [ebp - 0x468], 0
lea esi, [ebp - 0x4b4]
jne 0x406d8b
xor esi, esi
jmp 0x406db2
lea ecx, [ebp - 0x4b4]
call fcn.00422ed0
push dword [ebp - 0x468]
xor ecx, ecx
test al, al
cmove esi, ecx
call fcn.004302c4
xor ecx, ecx
add esp, 4
test eax, eax
cmovne esi, ecx
push 2
push 0
lea ecx, [ebp - 0x4b4]
call fcn.00423060
test esi, esi
jne 0x406dec
mov eax, dword [ebp - 0x4c4]
lea ecx, [ebp - 0x4c4]
mov eax, dword [eax + 4]
add ecx, eax
mov eax, dword [ecx + 0xc]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x406de4
or eax, 4
push 0
push eax
call fcn.00403670
push 0x12c
call fcn.00426b9d
mov edi, eax
mov edx, 0x44dae8
mov esi, edi
mov dword [ebp - 0x404], edi
add esp, 4
sub esi, edx
nop word [eax + eax]
movzx ecx, word [edx]
lea edx, [edx + 2]
mov word [esi + edx - 2], cx
test cx, cx
jne 0x406e10
lea edx, [ebp - 0x198]
mov esi, edx
nop dword [eax + eax]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x406e30
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x406e40
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x454]
mov dword [ebp - 0x40c], eax
mov eax, dword [ebp - 0x4c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ifstream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x4c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x70]
mov dword [ebp + ecx - 0x4c8], eax
mov dword [ebp - 4], 8
lea ecx, [ebp - 0x4b4]
call fcn.004201b0
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x4c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_istream_wchar_t__struct_std::char_traits_wchar_t__.0
mov eax, dword [ebp - 0x4c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x18]
mov dword [ebp + ecx - 0x4c8], eax
lea eax, [ebp - 0x454]
mov dword [ebp - 0x40c], eax
mov dword [ebp - method.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.virtual_0], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
mov dword [ebp - 4], 0xffffffff
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004281ff
mov eax, dword [ebp - 0x404]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042654c
mov esp, ebp
pop ebp
ret