joyce8/EMBER2024-capa huggingface dataset:
Function at 0x45d57c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x45d5be
call fcn.004754b6
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x45d5be
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x45d5b5
xor eax, eax
jmp 0x45d5c6
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0045d5cc
pop edi
pop esi
pop ebx
ret 4

Function at 0x45e57a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push esi
mov eax, ebx
push edi
mov edi, ecx
shr eax, 0x10
test ax, ax
mov dword [edi + 0x40], ebx
jne 0x45e59c
cmp dword [edi + 0x3c], 0
jne 0x45e59c
movzx eax, bx
mov dword [edi + 0x3c], eax
call fcn.004754b6
mov esi, dword [eax + 0xc]
push 5
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push esi
mov ecx, edi
push dword [esp + 0x18]
push eax
call fcn.0045e5c9
pop edi
pop esi
pop ebx
ret 8

Function at 0x45e617
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
call fcn.004754b6
mov esi, dword [eax + 0xc]
push 5
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x45e648
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push esi
mov ecx, ebx
push dword [esp + 0x18]
push edi
call fcn.0045e65b
pop edi
pop esi
pop ebx
ret 8

Function at 0x4741d3
Capabilities:
Create http request

Disassembly:
mov eax, 0x48d5b4
call fcn.00444e38
push ecx
push esi
mov esi, ecx
mov dword [ebp - 0x10], esi
mov eax, dword [ebp + 0xc]
and dword [ebp - 4], 0
and dword [esi + 0x10], 0
and dword [esi + 0xc], 0
mov dword [esi + 4], eax
mov eax, dword [ebp + 8]
test eax, eax
mov dword [esi], vtable.CInternetSession.0
jne 0x47420b
call fcn.004754b6
mov eax, dword [eax + 0x10]
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esi + 8], eax
jne 0x474230
push eax
push dword [esi + 4]
call fcn.00474eb1
jmp 0x47423c
push esi
push eax
mov ecx, 0x4913d0
call fcn.0047424d
mov ecx, dword [ebp - 0xc]
mov eax, esi
pop esi
mov dword fs:[0], ecx
leave
ret 0x18
Function at 0x47451a
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags

Disassembly:
mov eax, 0x48d613
call fcn.00444e38
push ecx
push ebx
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x10], esi
call fcn.00460b90
mov eax, dword [ebp + 0x18]
lea ebx, [esi + 0x24]
mov dword [esi + 0x1c], eax
mov eax, dword [0x4b3918]
xor edi, edi
mov dword [ebx], eax
mov dword [ebp - 4], edi
push dword [ebp + 0x10]
lea ecx, [esi + 0xc]
mov byte [ebp - 4], 1
mov dword [esi], vtable.CInternetFile.0
call fcn.0045a584
push dword [ebp + 0x14]
mov ecx, ebx
call fcn.0045a584
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0x18], eax
mov dword [esi + 0x3c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov dword [esi + 0x38], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x40], edi
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 0x18

Function at 0x475f20
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov dword [ebp - 8], ecx
call fcn.004754b6
mov esi, dword [eax + 0xc]
push 0xf1
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x475f5d
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x475f5d
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x475f61
xor eax, eax
jmp 0x475fdf
movzx eax, word [esi + 6]
push ebx
push edi
shl eax, 2
push eax
call fcn.0045aa20
and dword [ebp - 4], 0
cmp word [esi + 6], 0
pop ecx
mov ebx, eax
jbe 0x475f99
mov ecx, ebx
lea eax, [esi + 8]
movzx edx, word [eax]
inc dword [ebp - 4]
mov dword [ecx], edx
movzx edx, word [esi + 6]
inc eax
add ecx, 4
inc eax
cmp dword [ebp - 4], edx
jl 0x475f83
movzx eax, word [esi + 6]
mov ecx, dword [ebp - 8]
push eax
push ebx
call fcn.004760d0
push ebx
mov edi, eax
call fcn.0045aa49
test edi, edi
pop ecx
je 0x475fdb
movzx ecx, word [esi + 4]
movzx eax, word [esi + 2]
lea esi, [ecx + 7]
push ecx
mov ecx, dword [ebp - 8]
lea edx, [eax + 7]
push eax
push esi
push edx
call fcn.00475e99
push dword [ebp + 8]
mov ecx, dword [ebp - 8]
call fcn.00475fe4
mov edi, eax
mov eax, edi
pop edi
pop ebx
pop esi
leave
ret 4
Function at 0x48421c
Capabilities:
Check for time delay via gettickcount
Log keystrokes via polling

Disassembly:
sub esp, 0x20
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov edi, dword [sym.imp.USER32.dll_GetKeyState]
xor ebx, ebx
push 1
mov dword [esi + 0x30], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x38], ebx
call edi
test ax, ax
jge 0x484244
or dword [esi + 0x38], 1
or dword [esi + 0x34], 2
jmp 0x484255
push 2
call edi
test ax, ax
jge 0x484255
or dword [esi + 0x38], 2
or dword [esi + 0x34], 1
mov ebp, dword [sym.imp.KERNEL32.dll_GetTickCount]
call ebp
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x34]
push dword [eax + 0x1c]
call dword [sym.imp.USER32.dll_SetCapture]
push eax
call fcn.0045af8d
cmp dword [esi + 0x30], ebx
jne 0x48432f
mov edi, dword [sym.imp.USER32.dll_PeekMessageA]
mov ebx, 0x100
call dword [sym.imp.USER32.dll_GetCapture]
push eax
call fcn.0045af8d
cmp eax, dword [esp + 0x34]
jne 0x48432f
push 1
push 0x209
push 0x200
lea eax, [esp + 0x20]
push 0
push eax
call edi
test eax, eax
jne 0x4842cb
push 1
push 0x108
push ebx
push eax
lea eax, [esp + 0x24]
push eax
call edi
test eax, eax
je 0x484310
mov eax, dword [esp + 0x18]
cmp eax, 0x202
je 0x48432f
cmp eax, 0x205
je 0x48432f
cmp eax, 0x201
je 0x48432f
cmp eax, 0x204
je 0x48432f
cmp eax, ebx
jne 0x4842f6
cmp dword [esp + 0x1c], 0x1b
je 0x48432f
push dword [esp + 0x2c]
lea eax, [esi + 0x20]
push dword [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_PtInRect]
neg eax
sbb eax, eax
inc eax
mov dword [esi + 0x30], eax
call ebp
sub eax, dword [esp + 0x10]
cmp eax, dword [0x49148c]
jbe 0x484325
mov dword [esi + 0x30], 1
cmp dword [esi + 0x30], 0
je 0x484288
call dword [sym.imp.USER32.dll_ReleaseCapture]
mov eax, dword [esi + 0x30]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 4
Function at 0x41001c
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
push edi
call dword [0x44b0ec]
mov esi, eax
test esi, esi
jne 0x410070
call dword [0x44b0e8]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov eax, 0x80004005
test edi, edi
cmovns edi, eax
push edi
push 0x140
push 0x44edd4
call fcn.004086e9
push 0x44f1cc
push edi
call 0x445045
pop ecx
pop ecx
jmp 0x4101bd
mov eax, 0x5a4d
cmp ax, word [esi]
je 0x410099
mov esi, 0x8007000d
push esi
push 0x14a
push 0x44edd4
mov edi, esi
call fcn.004086e9
push 0x44ee50
push esi
jmp 0x410064
mov ecx, dword [esi + 0x3c]
cmp dword [ecx + esi], 0x4550
je 0x4100c3
mov esi, 0x8007000d
push esi
push 0x155
push 0x44edd4
mov edi, esi
call fcn.004086e9
push 0x44eec0
jmp 0x410096
movzx eax, word [ecx + esi + 0x14]
push ebx
add eax, ecx
lea ebx, [esi + 0x18]
push 8
add ebx, eax
push 0x44efe4
push ebx
call fcn.0043482f
add esp, 0xc
test eax, eax
je 0x410108
mov eax, dword [esi + 0x3c]
movzx ecx, word [eax + esi + 6]
xor eax, eax
inc eax
cmp eax, ecx
jae 0x41012f
add ebx, 0x28
inc eax
cmp dword [ebx], 0x7869772e
jne 0x4100ef
cmp dword [ebx + 4], 0x6e727562
jne 0x4100ef
cmp dword [ebx + 0x10], 0x34
jae 0x41014d
mov esi, 0x8007000d
push esi
push 0x17a
push 0x44edd4
mov edi, esi
call fcn.004086e9
push dword [ebx + 0x10]
push 0x44f010
jmp 0x410177
mov esi, 0x8007000d
push esi
push 0x16e
push 0x44edd4
mov edi, esi
call fcn.004086e9
push 0x44eff0
jmp 0x4101b4
mov ebx, dword [ebx + 0xc]
add ebx, esi
cmp dword [ebx + 4], 2
je 0x410182
mov esi, 0x8007000d
push esi
push 0x184
push 0x44edd4
mov edi, esi
call fcn.004086e9
push dword [ebx + 4]
push 0x44f0b4
push esi
call 0x445045
add esp, 0xc
jmp 0x4101bc
mov edx, dword [ebp + 8]
mov ecx, edi
mov eax, dword [edx + ecx*4]
cmp eax, dword [ebx + ecx*4 + 8]
jne 0x410198
inc ecx
cmp ecx, 4
jne 0x410187
jmp 0x4101bc
mov esi, 0x8007000d
push esi
push 0x18a
push 0x44edd4
mov edi, esi
call fcn.004086e9
push 0x44f1f4
push esi
call 0x445045
pop ecx
pop ecx
pop ebx
mov eax, edi
pop edi
pop esi
pop ebp
ret 4
Function at 0x405e29
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x514
lea eax, [ebp - 0x514]
push 0x513
push eax
push 0x403c40
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x405e7e
push 0xb
push 0x403c48
lea eax, [ebp - 0x514]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [ebp - 0x514]
add eax, ecx
push eax
call fcn.0040c8b4
push dword [ebp + 8]
lea eax, [ebp - 0x514]
push eax
call fcn.0040ad12
leave
ret 4

Function at 0x4062b0
Capabilities:
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, 0x418060
xor eax, eax
cmp dword [esi], eax
jne 0x4062ec
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ecx, dword [ebp + 8]
jecxz 0x4062fb
cmp eax, ecx
je 0x4062fb
mov dword [esi], ecx
push eax
push dword [0x401138]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, sym.rpcnet.exe_ServiceMain
pop eax
jne 0x4062fb
call fcn.00409445
mov eax, 1
mov dword [0x418144], eax
pop esi
leave
ret 0xc
mov dword [esi], eax
pop esi
leave
jmp fcn.004064d0
Function at 0x406f4b
Capabilities:
Create thread
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x18]
xor ebx, ebx
push edi
mov edi, dword [ebp + 0x14]
push ebx
push ebx
push dword [ebp + 0x10]
mov dword [ebp - 4], edi
push dword [ebp + 0xc]
mov dword [esi], ebx
push ebx
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov dword [ebp - 8], eax
test eax, eax
je 0x406fb7
cmp dword [ebp + 0x1c], ebx
jne 0x406f87
mov dword [esi], 1
jmp 0x406fac
lea eax, [ebp - 8]
push 0xffffffffffffffff
push ebx
push eax
test edi, edi
je 0x406f96
push 2
jmp 0x406f98
push 1
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x406fac
push esi
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406fc1
push ebx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop edi
pop esi
pop ebx
leave
ret 0x18

Function at 0x407111
Capabilities:
Create a process with modified i/o handles and window
Create process on windows
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
push ebx
mov ebx, dword [ebp + 8]
xor eax, eax
push esi
xor esi, esi
push edi
lea edi, [ebx + 0xc]
mov dword [ebp - 4], esi
cmp ax, word [ebx]
jae 0x407225
movzx eax, byte [edi]
sub eax, 1
je 0x4071db
sub eax, 1
je 0x407197
sub eax, 1
je 0x407159
sub eax, 1
jne 0x407213
call fcn.004086f0
jmp 0x407213
mov eax, dword [edi + 2]
mov bl, byte [edi + 2]
shr eax, 8
mov dword [ebp - 0xc], eax
lea eax, [ebp - 8]
push eax
push 0x1e
call fcn.0040840b
movzx esi, bl
movzx edx, byte [eax]
btr edx, esi
mov byte [eax], dl
lea eax, [ebp - 8]
push eax
push 0x1e
call fcn.0040840b
mov edx, dword [ebp - 0xc]
mov ecx, esi
mov ebx, dword [ebp + 8]
mov esi, dword [ebp - 4]
shl dl, cl
or byte [eax], dl
jmp 0x407213
push 0x44
push 0
lea eax, [ebp - 0x60]
push eax
call fcn.0040c8cd
xor eax, eax
mov dword [ebp - 0x60], 0x44
mov word [ebp - 0x30], ax
xor ecx, ecx
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x34], 0x101
push eax
lea eax, [ebp - 0x60]
mov dword [ebp - 0x58], ecx
push eax
mov eax, dword [edi + 2]
add eax, dword [ebx + 4]
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
jmp 0x407213
mov eax, dword [ebx + 4]
add eax, dword [edi + 2]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, dword [ebx + 4]
add eax, dword [edi + 2]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x407213
cmp byte [edi + 1], al
je 0x407213
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
je 0x40722f
cmp eax, 0x20
je 0x40722f
movzx eax, word [ebx]
inc esi
add edi, 6
mov dword [ebp - 4], esi
cmp esi, eax
jl 0x407130
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 4
xor eax, eax
jmp 0x407228
Function at 0x407377
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, dword [ebp + 0xc]
mov al, byte [esi + 0x1b44]
test al, 1
jne 0x40741d
mov ecx, dword [ebp + 8]
or al, 1
mov byte [esi + 0x1b44], al
push edi
mov eax, dword [ecx + 0x70]
mov dword [esi + 0x1b14], eax
lea eax, [esi + 0x1b18]
push eax
mov dword [esi + 0x1b48], ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
xor edi, edi
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
push edi
push edi
push 1
push edi
mov dword [esi + 0x1b40], eax
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov dword [esi + 0x1b10], eax
cmp dword [esi + 0x1b40], edi
je 0x407416
test eax, eax
je 0x407416
cmp dword [ebp + 0x10], edi
je 0x407405
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [ebp + 0x10]
push edi
push edi
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x1b0c], eax
test eax, eax
je 0x407416
push dword [ebp + 0x14]
push dword [esi + 0x1b0c]
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
jmp 0x40741c
push esi
call fcn.00406423
pop edi
movzx eax, byte [esi + 0x1b44]
and eax, 1
pop esi
leave
ret 0x10
Function at 0x4081b8
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
push 0x403a50
lea eax, [ebp - 4]
xor esi, esi
push eax
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call fcn.0040874a
mov ebx, dword [ebp + 8]
test eax, eax
jne 0x40834d
lea eax, [ebp - 8]
mov edi, 0x404320
push eax
push esi
lea eax, [ebp - 0xc]
push eax
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
cmp dword [ebp - 8], 0x204
jne 0x40834d
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0xc]
push eax
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40834d
push 0x204
push ebx
call fcn.004094f1
test eax, eax
jne 0x40833e
push 0x202
push ebx
call fcn.00408990
cmp word [ebx + 0x202], ax
jne 0x40833e
push 0x7e
pop ecx
lea edi, [ebx + 0x104]
movzx eax, word [edi]
lea esi, [ebx + 0x106]
push 0x200
push eax
rep movsw word es:[edi], word [esi]
push ebx
call fcn.004091ab
push 0x204
push ebx
call fcn.004094f1
test eax, eax
je 0x40833e
test dword [0x418068], 0x80000000
jne 0x40833e
xor edi, edi
push edi
push edi
push 3
push edi
push 3
push 0xc0000000
push 0x40432c
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40833e
push 1
push edi
push edi
lea eax, [ebp - 0x210]
push eax
push esi
call fcn.00408935
test eax, eax
je 0x408337
movzx eax, byte [ebp - 0x20a]
cdq
sub eax, 1
push 1
sbb edx, edi
push edx
push eax
lea eax, [ebp - 0x210]
push eax
push esi
call fcn.00408935
test eax, eax
je 0x408337
movzx eax, byte [ebp - 0x1f8]
cdq
mov edi, eax
mov eax, edx
push 1
push eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x210]
push edi
push eax
push esi
call fcn.00408935
test eax, eax
je 0x408337
push 0x200
lea eax, [ebp - 0x210]
push eax
call fcn.004094f1
test eax, eax
je 0x408337
push 0
push dword [ebp - 0x10]
push edi
push ebx
push esi
call fcn.00408935
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x204
push ebx
call fcn.004094f1
test eax, eax
jne 0x40835d
push 0x204
push section..cdata
push ebx
call fcn.0040c8b4
cmp dword [ebp - 4], 0
pop edi
pop esi
pop ebx
je 0x40836f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
leave
ret 4

Function at 0x408395
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
lea eax, [ebp - 4]
mov dword [ebp - 8], 4
push eax
push 0x403d74
push closesocket
xor esi, esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
jne 0x408404
push edi
lea eax, [ebp - 8]
mov edi, 0x403db0
push eax
push dword [ebp + 0xc]
lea eax, [ebp - 0xc]
push eax
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x4083fa
push dword [ebp - 8]
lea eax, [ebp + 8]
push eax
push dword [ebp - 0xc]
push esi
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
xor ecx, ecx
inc ecx
test eax, eax
cmove esi, ecx
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov eax, esi
pop esi
leave
ret 8
Function at 0x40854f
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
lea eax, [ebp - 4]
push 0x403a50
push eax
call fcn.0040874a
test eax, eax
jne 0x408616
push esi
push edi
mov edi, 0x204
lea eax, [ebp - 0x218]
push edi
push dword [0x418070]
push eax
call fcn.0040c8b4
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0xa]
add eax, 0x2070
shl ecx, 8
add eax, ecx
movzx esi, ax
lea eax, [ebp - 0x218]
push 0x200
push esi
push eax
call fcn.00408e30
mov ecx, 0x100
mov ax, word [ebp + ecx*2 - 0x21a]
mov word [ebp + ecx*2 - 0x218], ax
dec ecx
cmp ecx, 0x82
jg 0x4085bc
push 0x202
lea eax, [ebp - 0x218]
mov word [ebp - 0x114], si
push eax
call fcn.00408990
push edi
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x218]
push eax
push 3
push 0
push 0x404320
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
leave
ret

Function at 0x40876e
Capabilities:
Terminate thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x4087ce
cmp dword [ebp + 0xc], 0
je 0x40878a
push closesocket
push esi
call fcn.00408801
push esi
call fcn.004072c8
mov eax, dword [esi + 0x5224]
test eax, eax
je 0x4087c7
push 0x1388
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4087bb
push 0
push dword [esi + 0x5224]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
push dword [esi + 0x5224]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
pop ebp
ret 8

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp + 0x14]
shld eax, ecx, 9
push 0
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
shl ecx, 9
push eax
push ecx
push dword [ebp + 8]
mov dword [ebp - 0xc], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, dword [ebp - 0xc]
jne 0x40898a
cmp dword [ebp + 0x18], 0
lea eax, [ebp - 4]
push 0
push eax
push 0x200
push dword [ebp + 0xc]
push dword [ebp + 8]
je 0x408982
call dword [sym.imp.KERNEL32.dll_ReadFile]
jmp 0x40898c
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40898c
xor eax, eax
leave
ret 0x14
Function at 0x408ac4
Capabilities:
Compare security identifiers

Disassembly:
push 0x34
push 0x416f90
call fcn.00409e13
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x1c], 0x32
or dword [ebp - 0x20], 0xffffffff
mov esi, ebx
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x3c], ebx
mov word [ebp - 0x38], 0x500
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x20]
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
je 0x408c15
push dword [ebp - 0x1c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x30], esi
test esi, esi
jne 0x408b32
mov dword [ebp - 0x24], 1
jmp 0x408c15
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x1c]
push esi
push 2
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x408b92
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x408c15
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push dword [ebp - 0x1c]
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x30], esi
test esi, esi
je 0x408c15
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x1c]
push esi
push 2
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
je 0x408c15
lea eax, [ebp - 0x28]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 4
xor eax, eax
inc eax
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x408c15
lea eax, [ebp - 0x2c]
push eax
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push ebx
push 6
xor eax, eax
inc eax
push eax
lea eax, [ebp - 0x3c]
push eax
call dword [sym.imp.ADVAPI32.dll_AllocateAndInitializeSid]
test eax, eax
je 0x408c15
mov dword [ebp - 0x34], ebx
cmp ebx, dword [esi]
jae 0x408c07
mov edi, dword [esi + ebx*8 + 4]
mov eax, dword [esi + ebx*8 + 8]
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], eax
push dword [ebp - 0x28]
push edi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x408c07
push dword [ebp - 0x2c]
push edi
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
je 0x408c1b
xor eax, eax
inc eax
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
cmp ebx, dword [esi]
push 1
pop ecx
cmovae eax, ecx
mov dword [ebp - 0x24], eax
or dword [ebp - 4], 0xffffffff
jmp 0x408c2c
inc ebx
jmp 0x408bd0
cmp dword [ebp - 0x28], 0
je 0x408c3b
push dword [ebp - 0x28]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
cmp dword [ebp - 0x2c], 0
je 0x408c4a
push dword [ebp - 0x2c]
call dword [sym.imp.ADVAPI32.dll_FreeSid]
test esi, esi
je 0x408c55
push esi
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x20], 0
je 0x408c64
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408e30
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0x10]
test cl, 1
je 0x408e3f
xor eax, eax
jmp 0x408e6e
xor edx, edx
shr ecx, 1
push edi
mov edi, 0x9591
je 0x408e6a
push esi
mov esi, dword [ebp + 8]
imul eax, edx, 3
add eax, edi
add eax, dword [ebp + 0xc]
xor ax, word [esi + edx*2]
movzx eax, ax
mov word [esi + edx*2], ax
mov edi, eax
inc edx
cmp edx, ecx
jb 0x408e4f
pop esi
xor eax, eax
inc eax
pop edi
pop ebp
ret 0xc