joyce8/EMBER2024-capa huggingface dataset:
Function at 0x50c80e
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], edx
push 0
push 0x14
mov dword [ebp - 8], edi
and dword [edi], 0
call fcn.00459870
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x50c836
push 7
pop eax
jmp 0x50c8a0
cmp dword [0x53a044], 0
push ebx
mov ebx, dword [ebp + 8]
je 0x50c878
mov ecx, 0xc8
call fcn.00453e5c
test eax, eax
jne 0x50c878
mov eax, dword [ebp - 4]
mov dword [esi + 8], eax
lea eax, [esi + 4]
push eax
xor eax, eax
mov dword [esi + 0xc], ebx
push eax
push esi
push 0x50c8fe
push eax
push eax
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [esi], eax
test eax, eax
jne 0x50c884
xor eax, eax
mov edi, esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov edi, dword [ebp - 8]
cmp dword [esi + 8], 0
jne 0x50c89b
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push ebx
mov dword [esi + 4], eax
call dword [ebp - 4]
pop ecx
mov dword [esi + 0x10], eax
mov dword [edi], esi
xor eax, eax
pop ebx
pop edi
pop esi
leave
ret

Function at 0x5263e8
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov ebx, ecx
mov eax, 0x10000
xor ecx, ecx
mov esi, edx
push ecx
push ecx
push eax
push eax
mov eax, dword [ebp + 0xc]
neg eax
push 0xff
sbb eax, eax
and eax, 0x80000
push ecx
add eax, 0x40040003
push eax
push dword [esi + 0x98]
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov edi, dword [ebp + 8]
mov dword [edi + 0x3c], eax
cmp eax, 0xffffffff
jne 0x526430
xor eax, eax
jmp 0x52645f
push 0
push esi
push dword [ebx + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
test eax, eax
jne 0x526453
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, 0x4200e8
mov ecx, eax
call fcn.0052863b
mov eax, dword [edi + 0x3c]
mov dword [esi + 0x94], eax
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x526641
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
xor esi, esi
mov dword [ebp - 8], ecx
mov ebx, edx
cmp dword [ebp + 8], esi
jbe 0x52667a
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 8]
sub eax, esi
push eax
lea eax, [esi + ebx]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x526680
add esi, dword [ebp - 4]
mov ecx, dword [ebp - 8]
cmp esi, dword [ebp + 8]
jb 0x526654
xor eax, eax
pop esi
pop ebx
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x52667c
Function at 0x526cf4
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa8
mov eax, dword [0x53a024]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
mov esi, edx
mov dword [ebp - 0xa0], ecx
mov ecx, dword [ebp + 8]
push edi
mov dword [ebp - 0x98], ecx
mov ebx, dword [esi + 0x2c]
and ebx, 0xfffeffff
mov dword [esi + 0x2c], ebx
mov edi, dword [ecx + 0x20]
test edi, edi
jns 0x526dc6
mov ecx, edi
call fcn.0052bfb7
mov dword [ebp - 0x9c], eax
cmp eax, 0x2738
je 0x526dc0
cmp eax, 0x2746
je 0x526db4
cmp eax, 0x2744
je 0x526db4
test ebx, 0x1000
je 0x526f0d
cmp dword [esi + 8], 0xf
jne 0x526d76
mov ecx, esi
call fcn.00526cb7
mov ebx, dword [esi + 0x2c]
mov eax, dword [ebp - 0x9c]
xor edi, edi
test ebx, 0x40000
je 0x526d86
mov ecx, edi
mov edx, edi
jmp 0x526d92
mov ecx, dword [esi + 0x80]
mov edx, dword [esi + 0x84]
push edi
mov dword [ebp - 0x94], ecx
lea ecx, [ebp - 0x94]
push edi
push ecx
mov dword [ebp - 0x90], edx
mov ecx, eax
call fcn.0043752f
push eax
jmp 0x526f03
test ebx, 0x40000
je 0x526f0d
mov ecx, dword [ebp - 0x98]
test ebx, 0x40000
jne 0x526dea
shr edi, 0x1f
lea eax, [esi + 0x88]
add edi, edi
push edi
push eax
lea eax, [esi + 0x80]
push eax
push dword [ecx + 0x24]
jmp 0x526f03
test ebx, 0x1000
je 0x526f0d
lea eax, [ebp - 0x94]
xor edi, edi
push eax
push 0x10000
push esi
mov dword [ebp - 0x94], edi
mov dword [ebp - 0x90], edi
call dword [esi + pe_nt_image_headers32]
add esp, 0xc
cmp dword [ebp - 0x90], edi
je 0x526ef5
cmp dword [ebp - 0x94], edi
je 0x526ef5
mov ebx, 0x80
lea eax, [ebp - 0x8c]
push ebx
push edi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x9c], ebx
lea eax, [ebp - 0x9c]
mov dword [ebp - 0xa4], edi
push edi
push edi
push eax
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x98]
push eax
push 1
lea eax, [ebp - 0x94]
push eax
push dword [esi + 0x38]
call dword [sym.imp.WS2_32.dll_WSARecvFrom]
cmp eax, 0xffffffff
je 0x526ea0
push edi
lea eax, [ebp - 0x8c]
push eax
lea eax, [ebp - 0x94]
push eax
push dword [ebp - 0x98]
jmp 0x526f03
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp ebx, 0x2738
jne 0x526eb4
push 2
jmp 0x526e8a
cmp ebx, 0x2733
jne 0x526ec8
push edi
push edi
lea eax, [ebp - 0x94]
push eax
push edi
jmp 0x526f03
cmp ebx, 0x2746
je 0x526ebc
cmp ebx, 0x2744
je 0x526ebc
cmp dword [esi + 8], 0xf
jne 0x526ee5
mov ecx, esi
call fcn.00526cb7
push edi
push edi
lea eax, [ebp - 0x94]
mov ecx, ebx
push eax
jmp 0x526da9
push edi
push edi
lea eax, [ebp - 0x94]
push eax
push 0xfffff024
push esi
call dword [esi + 0x10c]
add esp, 0x14
mov ecx, dword [esi + 0x2c]
mov eax, ecx
mov ebx, dword [ebp - 0xa0]
and eax, 0x11000
cmp eax, 0x1000
jne 0x526f30
mov edx, esi
mov ecx, ebx
call fcn.0052707c
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x3c]
dec eax
mov dword [esi + 0x3c], eax
test cl, 1
je 0x526f54
test eax, eax
jne 0x526f54
test cl, 0x20
jne 0x526f54
or ecx, 0x20
mov dword [esi + 0x2c], ecx
mov eax, dword [ebx + 0x2c]
mov dword [esi + 0x28], eax
mov dword [ebx + 0x2c], esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00481a32
leave
ret
Function at 0x5272fb
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, edx
push edi
mov edi, ecx
sub dword [esi + 0x40], 1
jne 0x527326
mov edx, dword [esi + 0x2c]
mov eax, edx
and al, 5
cmp al, 4
jne 0x527326
and edx, 0xfffffffb
mov dword [esi + 0x2c], edx
test dl, 8
je 0x527326
mov eax, dword [esi + 4]
dec dword [eax + 4]
dec dword [edi + 0x10]
xor edx, edx
mov eax, dword [esi + 0x94]
push ebx
mov ebx, edx
test eax, eax
je 0x527340
mov dword [esi + 0x94], edx
jmp 0x52738c
mov ecx, dword [ebp + 8]
mov ecx, dword [ecx + 0x20]
test ecx, ecx
js 0x527387
test byte [esi + 0x2c], 1
je 0x527357
mov ebx, 0x3e3
jmp 0x52738e
push edx
push edx
push 0x7010
push 0xffff
push dword [esi + 0x90]
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x52737f
or dword [esi + 0x2c], 0xc080
inc dword [edi + 0x58]
jmp 0x52738e
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x52738c
call fcn.0052bfb7
mov ebx, eax
mov ecx, ebx
call fcn.0043752f
push eax
mov eax, dword [ebp + 8]
push eax
call dword [eax + 0x3c]
mov eax, dword [esi + 0x2c]
pop ecx
pop ecx
mov ecx, dword [esi + 0x3c]
dec ecx
mov dword [esi + 0x3c], ecx
pop ebx
test al, 1
je 0x5273c5
test ecx, ecx
jne 0x5273c5
test al, 0x20
jne 0x5273c5
or eax, 0x20
mov dword [esi + 0x2c], eax
mov eax, dword [edi + 0x2c]
mov dword [esi + 0x28], eax
mov dword [edi + 0x2c], esi
pop edi
pop esi
pop ebp
ret
Function at 0x527ad3
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, ecx
push esi
push edi
push 0
mov eax, dword [ebx + 4]
mov esi, edx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
and eax, 0x400000
neg eax
push 1
sbb eax, eax
and eax, 0x15
add eax, 2
push eax
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
mov dword [ebp - 8], edi
cmp edi, 0xffffffff
jne 0x527b3c
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call edi
test eax, eax
jg 0x527b1d
call edi
jmp 0x527b27
call edi
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp - 4]
mov edx, esi
mov dword [esi + 0x20], eax
call fcn.00526306
inc dword [ebx + 0x3c]
jmp 0x527ca0
push 0
push 1
push edi
call dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
jne 0x527b87
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jg 0x527b5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x527b6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp - 4]
mov edx, esi
mov dword [esi + 0x20], eax
call fcn.00526306
inc dword [ebx + 0x3c]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x527ca0
lea ecx, [esi + 0x20]
xor eax, eax
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test dword [ebx + 0x2c], 0x80000
je 0x527ba8
mov eax, dword [esi + 0x160]
or eax, 1
mov dword [esi + 0x30], eax
mov edi, dword [ebp - 8]
lea eax, [ebp - 0xc]
push ecx
push eax
mov eax, 0x80
push eax
push eax
push 0
lea eax, [esi + 0x40]
push eax
push edi
push dword [ebx + 0x90]
call dword [ebx + 0xa4]
test eax, eax
je 0x527be2
test dword [ebx + 0x2c], 0x20000
je 0x527c44
mov dword [esi + 0x3c], edi
inc dword [ebx + 0x3c]
jmp 0x527c96
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
je 0x527c44
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
test eax, eax
jg 0x527c01
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x527c0f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp - 4]
mov edx, esi
mov dword [esi + 0x20], eax
call fcn.00526306
inc dword [ebx + 0x3c]
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
test dword [ebx + 0x2c], 0x80000
je 0x527ca0
push dword [esi + 0x160]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 0x160], 0
jmp 0x527ca0
mov dword [esi + 0x3c], edi
inc dword [ebx + 0x3c]
test dword [ebx + 0x2c], 0x80000
je 0x527ca0
lea eax, [esi + 0x164]
cmp dword [eax], 0xffffffff
jne 0x527ca0
push 4
push 0xffffffffffffffff
push esi
push 0x52656d
push dword [esi + 0x160]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x527ca0
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
call edi
test eax, eax
jg 0x527c89
call edi
jmp 0x527c93
call edi
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, esi
call fcn.00526306
pop edi
pop esi
pop ebx
leave
ret
Function at 0x527ca5
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, edx
mov dword [ebp - 4], ecx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x10], 0x546c94
lea esi, [ebx + 0x44]
xor edx, edx
lea ecx, [esi + 0x20]
mov dword [ebp - 0x14], edx
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
xor eax, eax
or dword [ebx + 0x2c], 0x40000
mov edi, ecx
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test dword [ebx + 0x2c], 0x80000
je 0x527cf0
mov eax, dword [esi + 0x3c]
or eax, 1
mov dword [esi + 0x30], eax
push edx
push ecx
lea eax, [ebp - 8]
mov dword [ebp - 8], edx
push eax
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 0x14]
push eax
push dword [ebx + 0x90]
call dword [sym.imp.WS2_32.dll_WSARecv]
mov ecx, dword [ebx + 0x2c]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
or ecx, 0x10000
inc dword [ebx + 0x3c]
mov dword [ebx + 0x2c], ecx
test eax, eax
jne 0x527d38
test ecx, 0x20000
je 0x527d49
mov eax, dword [ebp - 0xc]
mov dword [esi + 0x24], eax
jmp 0x527d89
call edi
cmp eax, 0x3e5
je 0x527d49
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x527d72
test dword [ebx + 0x2c], 0x80000
je 0x527d93
lea eax, [esi + 0x40]
cmp dword [eax], 0xffffffff
jne 0x527d93
push 4
push 0xffffffffffffffff
push esi
push 0x52656d
push dword [esi + 0x3c]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
test eax, eax
jne 0x527d93
call edi
test eax, eax
jg 0x527d7c
call edi
jmp 0x527d86
call edi
movzx eax, ax
or eax, 0x80070000
mov dword [esi + 0x20], eax
mov ecx, dword [ebp - 4]
mov edx, esi
call fcn.00526306
pop edi
pop esi
pop ebx
leave
ret
Function at 0x528cc9
Capabilities:
Log keystrokes
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x53a024]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push 0xffffffffffffffff
push dword [0x5460a0]
mov ebx, ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x528cf7
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_abort]
push 2
pop eax
mov ecx, 0x546098
xchg dword [ecx], eax
xor ecx, ecx
inc ecx
cmp eax, ecx
je 0x528d19
mov ecx, 0x5460a0
call fcn.00480506
xor eax, eax
jmp 0x528db5
push edi
push esi
push 0x80
push 3
push esi
push 3
push 0xc0000000
push 0x40efd8
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x528d57
push 0x7ceca0
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x528d57
xor ecx, ecx
mov eax, 0x54609c
inc ecx
lock or dword [eax], ecx
xor eax, eax
inc eax
push 0xd
mov word [ebp - 0x18], ax
mov dword [ebp - 0x14], eax
mov word [ebp - 0x10], ax
pop eax
push esi
push eax
mov word [ebp - 0xe], ax
call dword [sym.imp.USER32.dll_MapVirtualKeyW]
push 0xd
mov word [ebp - 0xc], ax
xor ecx, ecx
pop eax
mov word [ebp - 0xa], ax
inc ecx
lea eax, [ebp - 0x1c]
mov dword [ebp - 8], esi
push eax
push ecx
lea eax, [ebp - 0x18]
push eax
push dword [ebx + 0x90]
call dword [sym.imp.KERNEL32.dll_WriteConsoleInputW]
test eax, eax
jne 0x528da6
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp edi, 0xffffffff
je 0x528db2
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00481a32
leave
ret

Function at 0x529a84
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x53a024]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 0x14]
mov ebx, ecx
mov dword [ebp - 0x20], edx
cmp dword [esi], 0
je 0x529aa8
or eax, 0xffffffff
jmp 0x529b02
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x1c]
push eax
push dword [ebx + 0x90]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
jne 0x529ac7
call edi
mov dword [esi], eax
push dword [ebp + 0x10]
lea edx, [ebp - 0x1c]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 0x20]
call fcn.00529a15
add esp, 0x10
push eax
push dword [ebx + 0x90]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
jne 0x529aff
call edi
cmp eax, 0x57
je 0x529aaf
call edi
mov dword [esi], eax
or eax, 0xffffffff
jmp 0x529b01
xor eax, eax
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00481a32
leave
ret
Function at 0x529de3
Capabilities:
Manipulate console buffer

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x53a024]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, edx
xor eax, eax
push edi
mov edi, ecx
mov dword [ebp - 0x20], eax
cmp dword [esi], eax
je 0x529e0a
or eax, 0xffffffff
jmp 0x529ea4
push 7
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_SetConsoleTextAttribute]
test eax, eax
jne 0x529e26
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esi], eax
jmp 0x529e02
push dword [ebp - 0x20]
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
test eax, eax
je 0x529e1c
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [ebp - 0x1c]
push eax
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x529e9c
movsx eax, word [ebp - 0x1c]
movsx ecx, word [ebp - 0x1a]
imul ecx, eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push ecx
push 0x20
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
test eax, eax
je 0x529e95
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push dword [ebp - 0x24]
push 7
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputAttribute]
test eax, eax
jne 0x529eb2
call ebx
cmp eax, 0x57
je 0x529e40
call ebx
mov dword [esi], eax
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00481a32
leave
ret
and dword [0x53b0d8], 0
lea ecx, [ebp - 0x1c]
call fcn.0052a42d
push 0x7cecd0
push dword [edi + 0x90]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorInfo]
test eax, eax
je 0x529e9c
xor eax, eax
jmp 0x529ea3
Function at 0x52c523
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
push dword [ecx + 0xc]
shr eax, 1
add ebx, eax
mov dword [ebp - 4], ecx
add eax, 0xfffffffe
push eax
push 1
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
mov esi, eax
cmp byte [ebp + 8], 0
mov dword [ebp - 8], esi
je 0x52c571
xor edx, edx
test esi, esi
je 0x52c571
mov al, byte [edx + ebx + 1]
mov cl, byte [edx + ebx]
mov byte [edx + ebx], al
mov byte [edx + ebx + 1], cl
add edx, 2
cmp edx, esi
jb 0x52c55c
lea edi, [esi + ebx]
movzx eax, word [edi - 2]
cmp eax, 0xd
jne 0x52c5d1
push dword [ebp + 8]
mov eax, dword [ebp - 4]
push edi
push dword [eax + 0xc]
call fcn.0052c650
test al, al
je 0x52c5fb
add esi, 2
cmp word [edi], 0xa
je 0x52c5fb
cmp byte [ebp + 8], 0
je 0x52c5a9
mov cl, byte [edi]
mov al, byte [edi + 1]
mov byte [edi], al
mov byte [edi + 1], cl
mov edi, dword [ebp - 4]
movsx eax, byte [ebx + esi - 1]
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__ungetc_nolock]
push dword [edi + 0xc]
push eax
call esi
push dword [edi + 0xc]
mov edi, dword [ebp - 8]
movsx eax, byte [edi + ebx]
push eax
call esi
add esp, 0x10
mov esi, edi
jmp 0x52c5fb
mov ecx, 0xd800
cmp ax, cx
jb 0x52c5fb
mov ecx, 0xdbff
cmp ax, cx
ja 0x52c5fb
push dword [ebp + 8]
mov eax, dword [ebp - 4]
push edi
push dword [eax + 0xc]
call fcn.0052c650
test al, al
je 0x52c5fb
add esi, 2
push dword [ebp + 0x14]
mov eax, esi
lea edx, [ebp + 8]
push dword [ebp + 0x10]
shr eax, 1
mov ecx, ebx
mov dword [ebp + 8], eax
call fcn.004ee4d6
pop ecx
pop ecx
mov ecx, dword [ebp + 0x1c]
pop edi
mov dword [ecx], eax
mov eax, dword [ebp + 0x18]
mov dword [eax], esi
pop esi
pop ebx
leave
ret 0x18
Function at 0x40b520
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x441070]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
lea eax, [ebp - 0x2a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
push eax
push 0
mov ecx, 0x23
mov eax, 0x1c
cmovne eax, ecx
mov ebx, edx
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40b605
push 0x27
lea eax, [ebp - 0x9c]
push eax
lea eax, [esi + 0x8c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
js 0x40b605
mov ecx, dword [esi + 0xa0]
mov edx, dword [esi + 0x9c]
movzx eax, cx
push eax
shr ecx, 0x10
push ecx
movzx eax, dx
push eax
shr edx, 0x10
lea eax, [ebp - 0x4c]
push edx
push str._d._d._d._d
push 0x24
push eax
call fcn.0040b1c0
add esp, 0x1c
test eax, eax
js 0x40b605
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2a4]
push eax
push str._lsApplicationsCache_lsv_ls.msi
push edi
call fcn.0040de80
add esp, 0x14
test eax, eax
js 0x40b605
push 1
push 1
push dword [edi]
push ebx
call fcn.0040e500
test eax, eax
jns 0x40b605
cmp dword [ebp + 8], 1
jne 0x40b605
push edi
push 0
mov edx, ebx
mov ecx, esi
call fcn.0040b520
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410abf
mov esp, ebp
pop ebp
ret

Function at 0x40b620
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2a4
mov eax, dword [0x441070]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 8], 0
lea eax, [ebp - 0x2a4]
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov esi, ecx
push eax
push 0
mov ecx, 0x23
mov eax, 0x1c
cmovne eax, ecx
mov ebx, edx
push 0
or eax, 0x8000
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
js 0x40b705
push 0x27
lea eax, [ebp - 0x9c]
push eax
lea eax, [esi + 0x8c]
push eax
call dword [sym.imp.ole32.dll_StringFromGUID2]
test eax, eax
js 0x40b705
mov ecx, dword [esi + 0xa0]
mov edx, dword [esi + 0x9c]
movzx eax, cx
push eax
shr ecx, 0x10
push ecx
movzx eax, dx
push eax
shr edx, 0x10
lea eax, [ebp - 0x4c]
push edx
push str._d._d._d._d
push 0x24
push eax
call fcn.0040b1c0
add esp, 0x1c
test eax, eax
js 0x40b705
lea eax, [ebp - 0x4c]
push eax
lea eax, [ebp - 0x9c]
push eax
lea eax, [ebp - 0x2a4]
push eax
push str._lsApplicationsCache_lsv_ls.mst
push edi
call fcn.0040de80
add esp, 0x14
test eax, eax
js 0x40b705
push 1
push 1
push dword [edi]
push ebx
call fcn.0040e500
test eax, eax
jns 0x40b705
cmp dword [ebp + 8], 1
jne 0x40b705
push edi
push 0
mov edx, ebx
mov ecx, esi
call fcn.0040b620
add esp, 8
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00410abf
mov esp, ebp
pop ebp
ret
Function at 0x40f290
Capabilities:
Get session information
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x828
mov eax, dword [0x441070]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 0x10]
lea eax, [ebp - 0x828]
push eax
push esi
push dword [ebp + 0xc]
mov dword [ebp - 0x828], 0
push dword [ebp + 8]
push 0
call sub.WTSAPI32.dll_WTSQuerySessionInformationW
test eax, eax
jne 0x40f308
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.GetStringInfoFromSessionInformation__:_WTSQuerySessionInformation___err___d_n
lea ecx, [ebp - 0x824]
push 0x410
push ecx
call fcn.00409210
add esp, 0x10
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00410abf
mov esp, ebp
pop ebp
ret
push dword [esi]
lea ecx, [ebp - 0x824]
push dword [ebp + 0xc]
push str.GetStringInfoFromSessionInformation__:_WTSQuerySessionInformation__d____s_n
push 0x410
push ecx
call fcn.00409210
add esp, 0x14
lea ecx, [ebp - 0x824]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov ecx, dword [ebp - 4]
mov eax, 1
xor ecx, ebp
pop esi
call fcn.00410abf
mov esp, ebp
pop ebp
ret