joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4016bf
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], ebx
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push esi
lea eax, [ebp - 4]
push eax
push ebx
push str.LocalService
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40172a
cmp dword [ebp - 4], 1
je 0x4016ff
cmp dword [ebp - 4], 2
jne 0x40171a
mov ecx, dword [ebp - 8]
test esi, esi
je 0x401724
test ecx, ecx
je 0x40171f
test cl, 1
jne 0x40171a
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], bx
je 0x401724
push 0xd
pop eax
jmp 0x40172a
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x401ba0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0x424
mov eax, 0x41a376
call fcn.0041993c
mov eax, dword [ebp + 0xc]
xor esi, esi
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x420], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x430], esi
mov dword [ebp - 4], esi
mov dword [ebp - 0x428], ecx
mov dword [ebp - 0x42c], esi
mov dword [ebp - 0x418], esi
push 0x60
push esi
push ebx
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x424], edi
test edi, edi
jne 0x401c1d
push 2
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
mov dword [ebp - 0x424], eax
test edi, edi
jne 0x401c1d
call fcn.00401225
mov esi, eax
jmp 0x401d23
push dword [ebp - 0x41c]
push dword [ebp - 0x420]
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
jne 0x401c40
call fcn.00401225
jmp 0x401d16
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 0x41c], eax
test eax, eax
je 0x401c36
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov dword [ebp - 0x420], ebx
lea eax, [ebx + 1]
cmp eax, ebx
jae 0x401c73
mov esi, 0x8007000e
jmp 0x401d18
push 2
pop ecx
mul ecx
mov byte [ebp - 4], cl
cmp edx, esi
ja 0x401d46
jb 0x401c8e
cmp eax, 0xffffffff
ja 0x401d46
cmp eax, 0x400
jbe 0x401ca3
push eax
lea ecx, [ebp - 0x418]
call fcn.00406053
jmp 0x401cc5
lea eax, [ebp - 0x414]
mov dword [ebp - 0x418], eax
jmp 0x401cc5
mov dword [ebp - 4], 1
cmp dword [ebp - 0x418], 0
je 0x401c69
push ebx
push dword [ebp - 0x418]
push ebx
push dword [ebp - 0x41c]
push esi
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
test ecx, ecx
je 0x401c36
mov eax, dword [ebp - 0x418]
xor edx, edx
push dword [ebp + 0x14]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x42c]
push dword [ebp - 0x418]
call fcn.00402758
mov esi, eax
test edi, edi
je 0x401d23
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [ebp - 0x414]
cmp dword [ebp - 0x418], eax
je 0x401d3c
lea ecx, [ebp - 0x418]
call fcn.0040604a
mov eax, esi
call fcn.00419889
ret 0x10
push 0x80070216
call fcn.004011a5
int3
Function at 0x404298
Capabilities:
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x228
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
push esi
push edx
mov edx, ecx
call fcn.00406be9
cmp dword [ebp + 0xc], 0
pop ecx
pop ecx
je 0x40448f
push ebx
push 0x2001f
xor ebx, ebx
lea ecx, [ebp - 0x220]
push 0x4214e0
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x220], ebx
mov dword [ebp - 0x21c], ebx
mov dword [ebp - 0x218], ebx
call fcn.004015f0
test eax, eax
je 0x404319
push eax
push 0x421398
mov edx, str.failed_to_open_arm_registry
call fcn.00406be9
pop ecx
pop ecx
lea ecx, [ebp - 0x220]
call fcn.00401531
jmp 0x40448e
push edi
test esi, esi
jne 0x40438c
mov esi, dword [ebp - 0x220]
push str.iLastSvcFailure
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.iLastSvcErrorCode
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
push str.iSvcErrorCount
push esi
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
push 4
pop edi
push edi
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x210]
push eax
push edi
push ebx
push str.iLastSvcSuccess
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
je 0x404477
push eax
push 0x421398
mov edx, str.SetDWORDValue_failed_to_register_success_time
call fcn.00406be9
pop ecx
pop ecx
jmp 0x404477
lea eax, [ebp - 0x228]
push eax
call fcn.0040d3e4
mov dword [esp], 0x208
lea eax, [ebp - 0x20c]
push ebx
push eax
call fcn.004095f0
push 0xa
push 0x104
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x228]
call fcn.0040cf82
lea eax, [ebp - 0x20c]
mov edx, str.current_error_time:
push ebx
push eax
call fcn.00406be9
mov eax, dword [ebp - 0x228]
add esp, 0x24
mov dword [ebp - 0x214], eax
lea eax, [ebp - 0x214]
push 4
pop edi
push edi
push eax
push edi
push ebx
push str.iLastSvcFailure
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push edi
lea eax, [ebp - 0x214]
mov dword [ebp - 0x214], esi
push eax
push edi
push ebx
push str.iLastSvcErrorCode
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea eax, [ebp - 0x210]
mov dword [ebp - 0x210], ebx
push eax
push str.iSvcErrorCount
lea ecx, [ebp - 0x220]
call fcn.00401689
mov eax, dword [ebp - 0x210]
cmp eax, 0x7d00
jae 0x404477
inc eax
mov dword [ebp - 0x214], esi
push edi
mov dword [ebp - 0x210], eax
lea eax, [ebp - 0x214]
push eax
push edi
push ebx
push str.iSvcErrorCount
push dword [ebp - 0x220]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [ebp - 0x220]
call fcn.00401531
lea ecx, [ebp - 0x220]
call fcn.00401531
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00407989
leave
ret
Function at 0x40449c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x25c
mov eax, dword [0x42600c]
xor eax, esp
mov dword [esp + 0x258], eax
push esi
mov esi, ecx
test esi, esi
jne 0x4044c1
push 0xd
jmp 0x404516
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x404514
push 0x250
lea eax, [esp + 0xc]
push 0
push eax
call fcn.004095f0
add esp, 0xc
lea eax, [esp + 8]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, 0xffffffff
je 0x404514
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ecx
xor edx, edx
mov ecx, esi
call fcn.00403c3e
neg eax
pop ecx
sbb eax, eax
and eax, 0xfffffc12
add eax, 0x3ee
jmp 0x404517
push 2
pop eax
mov ecx, dword [esp + 0x25c]
pop esi
xor ecx, esp
call fcn.00407989
mov esp, ebp
pop ebp
ret

Function at 0x4045e3
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor esi, esi
mov dword [ebp - 0xc], ecx
push esi
push 0x80
push 1
push esi
push 1
push 0x40000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x404697
mov eax, 0x100000
mov dword [ebp - 8], esi
push eax
mov dword [ebp - 4], eax
mov edi, esi
call fcn.0040d569
pop ecx
mov esi, eax
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404687
cmp dword [ebp - 8], 0
jbe 0x404687
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push 0
push eax
push dword [ebp - 8]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x404667
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
and dword [ebp - 8], 0
mov eax, 0x100000
mov dword [ebp - 4], eax
test esi, esi
je 0x404683
push eax
push 0
push esi
call fcn.004095f0
add esp, 0xc
test edi, edi
je 0x404629
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.0040d424
pop ecx
jmp 0x40469f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4046a6
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x66c
mov eax, dword [0x42600c]
xor eax, esp
mov dword [esp + 0x668], eax
push ebx
push esi
push edi
mov esi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebx, 0x104
cmp word [esi + eax*2 - 2], 0x5c
je 0x4046ef
push 0x421014
mov edx, ebx
mov ecx, esi
call fcn.00403aa0
test eax, eax
js 0x40480e
push 0x208
lea eax, [esp + 0x46c]
push 0
push eax
call fcn.004095f0
pop ecx
pop ecx
push esi
push ecx
mov edx, 0x82
lea ecx, [esp + 0x474]
call fcn.00403b0e
test eax, eax
js 0x40480e
push 0x421668
mov edx, ebx
lea ecx, [esp + 0x46c]
call fcn.00403aa0
test eax, eax
js 0x40480e
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x46c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x404800
push 0x208
lea eax, [esp + 0x264]
push 0
push eax
call fcn.004095f0
pop ecx
pop ecx
push esi
push ecx
mov edx, 0x82
lea ecx, [esp + 0x26c]
call fcn.00403b0e
test eax, eax
js 0x40480e
lea eax, [esp + 0x3c]
mov edx, ebx
push eax
lea ecx, [esp + 0x264]
call fcn.00403aa0
test eax, eax
js 0x40480e
test byte [esp + 0x10], 0x10
je 0x4047de
push 0x42166c
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4047ec
push 0x421670
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
je 0x4047ec
lea ecx, [esp + 0x260]
call fcn.004046a6
jmp 0x4047ec
lea eax, [esp + 0x260]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
lea eax, [esp + 0x10]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404750
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
push esi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
mov ecx, dword [esp + 0x674]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00407989
mov esp, ebp
pop ebp
ret
Function at 0x404823
Capabilities:
Get common file path

Disassembly:
push 0xc3c
mov eax, 0x41a45b
call fcn.004198ce
push 1
push dword [ebp + 0xc]
call fcn.00404298
pop ecx
pop ecx
lea ecx, [ebp - 0xc44]
call fcn.00406644
xor esi, esi
lea eax, [ebp - 0xa38]
push 0x800
push esi
push eax
mov dword [ebp - 4], esi
call fcn.004095f0
pop ecx
pop ecx
push str.ServiceError
push ecx
mov edx, 0x200
lea ecx, [ebp - 0xa38]
call fcn.00403b0e
test eax, eax
js 0x4048d3
push 8
pop ecx
xor eax, eax
lea edi, [ebp - 0x30]
push 0xa
rep stosd dword es:[edi], eax
push 0x10
lea eax, [ebp - 0x30]
push eax
push dword [ebp + 0xc]
call fcn.0040cf82
add esp, 0x10
lea eax, [ebp - 0x30]
mov edx, 0x400
lea ecx, [ebp - 0xa38]
push eax
call fcn.00403aa0
test eax, eax
js 0x4048d3
lea eax, [ebp - 0xc45]
mov byte [ebp - 0xc45], 1
push eax
push ecx
lea eax, [ebp - 0xa38]
push eax
push ecx
lea ecx, [ebp - 0xc44]
call fcn.00406884
push 0x208
lea eax, [ebp - 0x238]
push esi
push eax
call fcn.004095f0
add esp, 0xc
lea eax, [ebp - 0x238]
push eax
push esi
push esi
push 0x2b
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x404922
push str.AdobeARM1.0Temp
mov edx, 0x104
lea ecx, [ebp - 0x238]
call fcn.00403aa0
test eax, eax
js 0x404922
lea ecx, [ebp - 0x238]
call fcn.004046a6
call fcn.00419878
ret
Function at 0x4058f8
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov esi, ecx
call fcn.00405817
test eax, eax
je 0x405977
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x40594b
push 0x10020
lea eax, [esi + 0x230]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov ebx, eax
test ebx, ebx
jne 0x40594f
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
jmp 0x40597a
lea eax, [ebp - 0x20]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ControlService]
push ebx
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push ebx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test esi, esi
je 0x40594b
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00407989
leave
ret

Function at 0x405989
Capabilities:
Access the windows event log

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
mov eax, dword [0x42600c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp + 0x10]
push edi
push eax
xor edi, edi
lea eax, [ebp - 0x204]
push edi
push dword [ebp + 0xc]
push 0x100
push eax
call fcn.0040117c
push dword [eax + 4]
push dword [eax]
call fcn.0040cd8e
add esp, 0x1c
lea eax, [ebp - 0x204]
mov dword [ebp - 0x208], eax
cmp dword [esi + 0x454], edi
je 0x405a11
lea eax, [esi + 0x230]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_RegisterEventSourceW]
mov esi, eax
test esi, esi
je 0x405a1e
push edi
lea eax, [ebp - 0x208]
push eax
push edi
push 1
push edi
push edi
push edi
push 4
push esi
call dword [sym.imp.ADVAPI32.dll_ReportEventW]
push esi
call dword [sym.imp.ADVAPI32.dll_DeregisterEventSource]
jmp 0x405a1e
lea eax, [ebp - 0x204]
push eax
call fcn.0040d511
pop ecx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00407989
leave
ret
Function at 0x405a2c
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
lea eax, [ebp - 0xc]
push esi
push edi
push eax
lea eax, [ebp - 4]
xor edi, edi
push eax
push edi
push 0xf003f
push edi
push edi
push edi
push 0x4214e0
push reloc.OLEAUT32.dll_SysReAllocString
mov esi, ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x405a86
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
push 4
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push 4
push edi
push str.iLastSvcSuccess
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esi + 0x230]
mov dword [ebp - 0x18], 0x405bf0
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
cmp dword [esi + 0x454], edi
je 0x405ac6
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceCtrlDispatcherW]
test eax, eax
jne 0x405abe
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi + 0x454], edi
cmp dword [esi + 0x454], edi
jne 0x405acd
mov ecx, esi
call fcn.00405c8d
pop edi
pop esi
leave
ret

Function at 0x406644
Capabilities:
Get common file path

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
xor ebx, ebx
push 0x104
push ebx
lea edi, [esi + 4]
mov dword [esi], vtable.CArmReport.0
push edi
call fcn.004095f0
add esp, 0xc
push edi
push ebx
push ebx
push 0x24
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x406694
mov ebx, 0x104
mov ecx, edi
push str.Temp_
mov edx, ebx
call fcn.00403aa0
push str.ArmReport.ini
mov edx, ebx
mov ecx, edi
call fcn.00403aa0
pop edi
mov eax, esi
pop esi
pop ebx
ret
Function at 0x4066cd
Capabilities:
Get token membership
Write file on windows

Disassembly:
push 0x9c
mov eax, 0x41a58e
call fcn.004198ce
mov ebx, ecx
mov eax, 0xfeff
xor edi, edi
mov word [ebp - 0x74], ax
mov eax, vtable.ATL::CAccessToken.0
mov dword [ebp - 0x9c], eax
mov dword [ebp - 0x98], edi
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x90], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x88], eax
mov dword [ebp - 0x84], edi
mov dword [ebp - 0x80], edi
mov dword [ebp - 0x7c], edi
push 0x220
push 0x20
push 2
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 1
push 0x422634
push eax
call fcn.004063f2
add esp, 0x10
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x9c]
call fcn.00406573
lea eax, [ebp - 0x78]
push eax
push 2
push dword [ebp - 0x98]
call dword [sym.imp.ADVAPI32.dll_DuplicateToken]
test eax, eax
je 0x406782
mov eax, dword [ebp - 0x88]
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x41b2b0]
lea ecx, [ebp - 0x88]
call esi
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x84], eax
jmp 0x406788
mov eax, dword [ebp - 0x84]
lea ecx, [ebp - 0x78]
push ecx
lea ecx, [ebp - 0x6c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_CheckTokenMembership]
test eax, eax
je 0x4067db
cmp dword [ebp - 0x78], 0
je 0x4067db
push edi
lea eax, [ebp - 0xa4]
mov dword [ebp - 0xa8], 0xc
push eax
push 1
push str.D:_D_OICI_GA___BG__D_OICI_GA___AN__A_OICI_GA___AU_
mov dword [ebp - 0xa0], edi
call dword [sym.imp.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW]
test eax, eax
je 0x40683c
push edi
push 0x80
push 1
lea eax, [ebp - 0xa8]
push eax
jmp 0x4067e4
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
lea eax, [ebx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x40683c
push edi
lea eax, [ebp - 0x8c]
push eax
push 2
lea eax, [ebp - 0x74]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40683c
push edi
lea eax, [ebp - 0x8c]
mov ebx, str._SESSION_
push eax
push ebx
call fcn.0040b62e
pop ecx
lea eax, [eax*2 + 2]
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x406846
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x40684d
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [ebp - 0x70]
call fcn.004064bd
mov esi, vtable.ATL::CAccessToken.0
lea ecx, [ebp - 0x88]
mov dword [ebp - 0x88], esi
call fcn.00406600
lea ecx, [ebp - 0x9c]
mov dword [ebp - 0x9c], esi
call fcn.00406600
mov eax, edi
call fcn.00419878
ret
Function at 0x406884
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, ecx
xor ebx, ebx
mov dword [ebp - 8], edi
lea esi, [edi + 4]
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4068a9
push 3
pop eax
jmp 0x4069d9
push esi
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x4068d0
and dword [ebp - 4], ebx
mov ecx, edi
call fcn.004066cd
mov ebx, eax
test ebx, ebx
jne 0x4069d9
mov eax, dword [ebp + 0x14]
cmp byte [eax], 0
je 0x4069b5
cmp dword [ebp - 4], 0
je 0x4069b5
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push ecx
mov ecx, edi
call fcn.004069e0
test eax, eax
jne 0x4069b5
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
test edi, edi
je 0x4069b5
push dword [ebp + 0xc]
push dword [ebp - 4]
call fcn.00409374
pop ecx
pop ecx
test eax, eax
je 0x406935
push 2
push dword [ebp - 4]
call fcn.00407deb
pop ecx
pop ecx
xor eax, eax
jmp 0x4069d9
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, edi
xor ecx, ecx
push 2
pop edx
lea esi, [eax*2 + 2]
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040802f
pop ecx
push dword [ebp - 4]
mov edi, eax
mov edx, esi
mov ecx, edi
call fcn.00403a7c
push 0x421694
mov edx, esi
mov ecx, edi
call fcn.00403aa0
push dword [ebp + 0xc]
mov edx, esi
mov ecx, edi
call fcn.00403aa0
mov eax, dword [ebp - 8]
add eax, 4
push eax
push edi
push 0x421698
push str.SESSION
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
push 2
push dword [ebp - 4]
mov esi, eax
call fcn.00407deb
push edi
call fcn.0040799a
add esp, 0xc
jmp 0x4069cb
push esi
push dword [ebp + 0xc]
push 0x421698
push str.SESSION
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
mov esi, eax
test esi, esi
jne 0x4069d7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4069e0
Capabilities:
Check if file exists
Get file attributes
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
lea ebx, [ecx + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
jne 0x4069fb
push 3
pop eax
jmp 0x406aa5
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x406a0b
push 2
jmp 0x4069f5
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, 0x82
push 2
pop edx
add esi, esi
cmp esi, 0x821
jae 0x406aa0
xor ecx, ecx
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0040802f
lea ecx, [esi + esi]
mov dword [edi], eax
push ecx
push 0
push eax
call fcn.004095f0
add esp, 0x10
push ebx
push esi
push dword [edi]
push 0
push 0x421698
push str.SESSION
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov dword [ebp - 4], eax
test eax, eax
je 0x406a6a
lea ecx, [esi - 1]
cmp eax, ecx
jne 0x406a7c
push dword [edi]
call fcn.0040799a
and dword [edi], 0
mov eax, dword [ebp - 4]
pop ecx
test eax, eax
je 0x406a99
inc eax
push 2
pop edx
cmp esi, eax
jbe 0x406a18
cmp dword [edi], 0
je 0x406aa0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x406aa0
xor eax, eax
jmp 0x406aa3
mov eax, 0xe8
jmp 0x406aa3
push 0xd
pop eax
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x406b3f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
lea eax, [ebp - 8]
xor esi, esi
push eax
push 0x20019
push esi
xor ebx, ebx
mov dword [ebp - 0xc], esi
push 0x4214e0
inc ebx
mov dword [ebp - 0x14], esi
push reloc.OLEAUT32.dll_SysReAllocString
mov byte [0x427944], bl
mov dword [0x427948], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x406be5
push edi
push 4
pop edi
lea eax, [ebp - 4]
mov dword [ebp - 0x10], edi
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push 0x422644
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406baa
cmp dword [ebp - 0xc], ebx
je 0x406bd1
lea eax, [ebp - 4]
mov dword [ebp - 4], edi
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push esi
push str.iLogLevelDev
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x406bdb
cmp dword [ebp - 0x14], ebx
jne 0x406bdb
mov dword [0x427948], 2
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
leave
ret