joyce8/EMBER2024-capa huggingface dataset:
Function at 0x453798
Capabilities:
Get keyboard layout
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffda0
push ebx
xor edx, edx
mov dword [ebp - 0x260], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x453943
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp dword [eax + 0x34], 0
jne 0x453924
mov dl, 1
mov eax, dword [0x412460]
call fcn.00403b2c
mov edx, dword [ebp - 4]
mov dword [edx + 0x34], eax
mov eax, dword [ebp - 4]
add eax, 0x38
call fcn.00404970
lea eax, [ebp - 0x114]
push eax
push 0x40
call sub.user32.dll_GetKeyboardLayoutList
dec eax
test eax, eax
jl 0x453913
inc eax
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x114]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
call fcn.00445c94
test al, al
je 0x453906
lea eax, [ebp - 0xc]
push eax
push 0x20019
push 0
push 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0x25c], eax
mov byte [ebp - 0x258], 0
lea ecx, [ebp - 0x25c]
mov edx, 0x453954
lea eax, [ebp - 0x254]
call fcn.0040948c
push eax
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA_1
test eax, eax
jne 0x453906
xor eax, eax
push ebp
push 0x4538ff
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 8], pe_nt_image_headers32
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x214]
push eax
push 0
push 0
push 0x45398c
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegQueryValueExA_1
test eax, eax
jne 0x4538e8
lea eax, [ebp - 0x260]
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404be0
mov edx, dword [ebp - 0x260]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov ebx, dword [eax]
call dword [ebx + 0x3c]
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 4]
cmp eax, dword [edx + 0x3c]
jne 0x4538e8
mov eax, dword [ebp - 4]
add eax, 0x38
lea edx, [ebp - 0x214]
mov ecx, pe_nt_image_headers32
call fcn.00404be0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x453906
mov eax, dword [ebp - 0xc]
push eax
call sub.advapi32.dll_RegCloseKey_1
ret
add dword [ebp - 0x14], 4
dec dword [ebp - 0x10]
jne 0x453809
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
mov byte [eax + 0x25], 0
mov dl, 1
call fcn.00416138
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0x34]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x45394a
lea eax, [ebp - 0x260]
call fcn.00404970
ret

Function at 0x4542bc
Capabilities:
Create thread
Set global application hook

Disassembly:
push ecx
mov eax, dword [0x496c94]
cmp byte [eax + 0xad], 0
jne 0x45432d
cmp dword [0x496cb0], 0
jne 0x4542ee
call sub.kernel32.dll_GetCurrentThreadId_1
push eax
push 0
mov eax, 0x454278
push eax
push 3
call sub.user32.dll_SetWindowsHookExA
mov dword [0x496cb0], eax
cmp dword [0x496cac], 0
jne 0x454309
push 0
push 0
push 0
push 0
call sub.kernel32.dll_CreateEventA
mov dword [0x496cac], eax
cmp dword [0x496cb4], 0
jne 0x45432d
push esp
push 0
push 0
push 0x45421c
push 0x3e8
push 0
call sub.kernel32.dll_CreateThread
mov dword [0x496cb4], eax
pop edx
ret
Function at 0x454500
Capabilities:
Inspect load icon resource

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffefc
push ebx
push esi
test dl, dl
je 0x454517
add esp, 0xfffffff0
call fcn.00403e68
mov byte [ebp - 1], dl
mov ebx, eax
xor edx, edx
mov eax, ebx
call fcn.0041a2fc
mov eax, dword [0x491cf4]
cmp word [eax + 2], 0
jne 0x45453f
mov eax, dword [0x491cf4]
mov dword [eax + 4], ebx
mov dword [eax], fcn.00456100
mov eax, dword [0x491d94]
cmp word [eax + 2], 0
jne 0x454559
mov eax, dword [0x491d94]
mov dword [eax + 4], ebx
mov dword [eax], fcn.0045630c
mov byte [ebx + 0x34], 0
mov dl, 1
mov eax, dword [0x41203c]
call fcn.00403b2c
mov dword [ebx + 0x90], eax
mov dl, 1
mov eax, dword [0x41203c]
call fcn.00403b2c
mov dword [ebx + 0x98], eax
mov dl, 1
mov eax, dword [0x41203c]
call fcn.00403b2c
mov dword [ebx + 0xb0], eax
xor eax, eax
mov dword [ebx + 0x60], eax
xor eax, eax
mov dword [ebx + 0x84], eax
mov dword [ebx + 0x5c], 0xff000018
mov dword [ebx + 0x78], 0x1f4
mov byte [ebx + 0x7c], 1
xor eax, eax
mov dword [ebx + 0x80], eax
mov dword [ebx + 0x74], 0x9c4
mov byte [ebx + 0x88], 0
mov byte [ebx + 0xa5], 1
mov byte [ebx + 0xbc], 1
mov dl, 1
mov eax, dword [0x41e668]
call fcn.004244ec
mov esi, eax
mov dword [ebx + 0xa0], esi
push 0x454710
mov eax, dword [0x491c20]
mov eax, dword [eax]
push eax
call sub.user32.dll_LoadIconA
mov edx, eax
mov eax, esi
call fcn.004248c0
mov eax, dword [ebx + 0xa0]
mov dword [eax + 0x14], ebx
mov dword [eax + 0x10], 0x4569e0
push pe_nt_image_headers32
lea eax, [ebp - 0x101]
push eax
mov eax, dword [0x491c20]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetModuleFileNameA_1
lea eax, [ebp - 0x101]
push eax
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_OemToCharA
lea eax, [ebp - 0x101]
mov dl, 0x5c
call fcn.0040cbb4
test eax, eax
je 0x454660
lea edx, [eax + 1]
lea eax, [ebp - 0x101]
call fcn.00408e30
lea eax, [ebp - 0x101]
mov dl, 0x2e
call fcn.0040cbe8
test eax, eax
je 0x454674
mov byte [eax], 0
lea eax, [ebp - 0x101]
push eax
call sub.user32.dll_CharNextA_1
push eax
call sub.user32.dll_CharLowerA
lea eax, [ebx + 0x8c]
lea edx, [ebp - 0x101]
mov ecx, pe_nt_image_headers32
call fcn.00404be0
mov byte [ebx + 0xd4], 0
push ebx
push 0x455c28
call fcn.0041b478
mov dword [ebx + 0xc8], eax
mov eax, dword [0x491b2c]
cmp byte [eax], 0
jne 0x4546c5
mov eax, ebx
call fcn.00454854
mov byte [ebx + 0x59], 1
mov byte [ebx + 0x5a], 1
mov byte [ebx + 0x5b], 1
mov byte [ebx + 0xa6], 1
xor eax, eax
mov dword [ebx + 0xa8], eax
mov eax, ebx
call fcn.00456bb8
mov eax, ebx
call fcn.0045771c
mov eax, ebx
cmp byte [ebp - 1], 0
je 0x454705
call fcn.00403ec0
pop dword fs:[0]
add esp, 0xc
mov eax, ebx
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x454ad4
Capabilities:
Enumerate gui resources

Disassembly:
push ebx
push esi
add esp, 0xfffffff8
mov ebx, eax
mov eax, dword [ebx + 0x30]
test eax, eax
je 0x454b73
cmp dword [ebx + 0x94], 0
jne 0x454b6d
mov dword [esp], eax
mov byte [esp + 4], dl
mov eax, esp
push eax
push 0x454a5c
call sub.user32.dll_EnumWindows
mov eax, dword [ebx + 0x90]
cmp dword [eax + 8], 0
je 0x454b6d
push 3
mov eax, dword [esp + 4]
push eax
call sub.user32.dll_GetWindow
mov esi, eax
mov dword [esp], esi
push 0xffffffffffffffec
push esi
call sub.user32.dll_GetWindowLongA
test al, 8
je 0x454b33
mov dword [esp], 0xfffffffe
mov eax, dword [ebx + 0x90]
mov esi, dword [eax + 8]
dec esi
cmp esi, 0
jl 0x454b6d
push 0x213
push 0
push 0
push 0
push 0
mov eax, dword [esp + 0x14]
push eax
mov edx, esi
mov eax, dword [ebx + 0x90]
call fcn.004143e0
push eax
call sub.user32.dll_SetWindowPos
dec esi
cmp esi, 0xffffffff
jne 0x454b42
inc dword [ebx + 0x94]
pop ecx
pop edx
pop esi
pop ebx
ret

Function at 0x454d8c
Capabilities:
Enumerate gui resources
Hide graphical window

Disassembly:
push ebx
push esi
push edi
mov ebx, edx
mov esi, eax
mov eax, dword [0x496c94]
cmp dword [eax + 0x30], 0
je 0x454ee9
test bl, bl
jne 0x454e3a
cmp dword [esi + 0x9c], 0
jne 0x454e2f
mov eax, esi
call fcn.00457598
push eax
push 0x454cb8
call sub.user32.dll_EnumWindows
cmp dword [esi + 0x44], 0
je 0x454e00
mov eax, dword [0x496c94]
call fcn.00457c78
test al, al
je 0x454e00
mov eax, dword [0x496cb8]
call fcn.0040582c
mov edi, eax
cmp edi, 0
jl 0x454e00
push 0
mov eax, dword [0x496cb8]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x454dea
mov eax, dword [esi + 0x98]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x454e2f
cmp bl, 1
cmc
sbb eax, eax
push eax
mov edx, edi
mov eax, dword [esi + 0x98]
call fcn.004143e0
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x454e0f
inc dword [esi + 0x9c]
jmp 0x454ee9
cmp dword [esi + 0x9c], 0
jle 0x454ee9
dec dword [esi + 0x9c]
cmp dword [esi + 0x9c], 0
jne 0x454ee9
cmp dword [esi + 0x44], 0
je 0x454e95
mov eax, dword [0x496c94]
call fcn.00457c78
test al, al
je 0x454e95
mov eax, dword [0x496cb8]
call fcn.0040582c
mov edi, eax
cmp edi, 0
jl 0x454e95
push 5
mov eax, dword [0x496cb8]
mov eax, dword [eax + edi*4]
push eax
call sub.user32.dll_ShowWindow
dec edi
cmp edi, 0xffffffff
jne 0x454e7f
mov eax, dword [esi + 0x98]
mov edi, dword [eax + 8]
dec edi
cmp edi, 0
jl 0x454ec4
cmp bl, 1
cmc
sbb eax, eax
push eax
mov edx, edi
mov eax, dword [esi + 0x98]
call fcn.004143e0
push eax
call sub.user32.dll_ShowOwnedPopups
dec edi
cmp edi, 0xffffffff
jne 0x454ea4
mov eax, dword [esi + 0x98]
mov edx, dword [eax]
call dword [edx + 8]
push 0
mov eax, 0x496cb8
mov ecx, 1
mov edx, dword [0x454c98]
call fcn.004059e0
add esp, 4
pop edi
pop esi
pop ebx
ret
Function at 0x45597c
Capabilities:
Get graphical window text

Disassembly:
push ebx
push esi
add esp, 0xfffffefc
mov esi, edx
mov ebx, eax
cmp byte [ebx + 0xac], 0
je 0x4559e6
mov eax, ebx
call fcn.00457c78
test al, al
jne 0x4559e6
push pe_nt_image_headers32
lea eax, [esp + 4]
push eax
mov eax, dword [ebx + 0x30]
push eax
call sub.user32.dll_GetWindowTextA
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.00404a60
mov eax, dword [esi]
mov dword [esp + 0x100], eax
mov eax, dword [esp + 0x100]
test eax, eax
je 0x4559d3
sub eax, 4
mov eax, dword [eax]
test eax, eax
jne 0x4559f3
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.004049c4
jmp 0x4559f3
mov eax, esi
mov edx, dword [ebx + 0x8c]
call fcn.004049c4
add esp, 0x104
pop esi
pop ebx
ret

Function at 0x456d9c
Capabilities:
Hide graphical window

Disassembly:
push ebx
push esi
mov ebx, eax
mov esi, dword [ebx + 0x84]
test esi, esi
je 0x456e0a
mov eax, esi
call fcn.004409bc
test al, al
je 0x456e0a
mov eax, dword [ebx + 0x84]
call fcn.0044060c
push eax
call sub.user32.dll_IsWindowVisible
test eax, eax
je 0x456e0a
mov eax, dword [ebx + 0x84]
mov edx, dword [eax]
call dword [edx + 0xf0]
test al, al
je 0x456dfe
push 0
mov eax, dword [ebx + 0x84]
call fcn.0044060c
push eax
call sub.user32.dll_ShowWindow
xor edx, edx
mov eax, dword [ebx + 0x84]
call fcn.004385a0
jmp 0x456e0a
mov cl, 1
mov edx, dword [ebx + 0x74]
mov eax, ebx
call fcn.00456bd8
pop esi
pop ebx
ret
Function at 0x457fa0
Capabilities:
Copy file
Delete file
Get common file path

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee8
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x114], ecx
mov dword [ebp - 4], ecx
mov edi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4580fd
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x104
lea eax, [ebp - 0x10d]
push eax
call sub.kernel32.dll_GetSystemDirectoryA
lea edx, [ebp - 0x114]
lea eax, [ebp - 0x10d]
call fcn.0040901c
push dword [ebp - 0x114]
push 0x458118
push ebx
lea eax, [ebp - 4]
mov edx, 3
call fcn.00404d04
call fcn.00457f48
test al, al
je 0x45806c
xor eax, eax
mov dword [ebp - 8], eax
push 0x458124
push 0x458144
call sub.kernel32.dll_GetModuleHandleA_2
push eax
call sub.kernel32.dll_GetProcAddress_1
mov ebx, eax
push 0x458154
push 0x458144
call sub.kernel32.dll_GetModuleHandleA_2
push eax
call sub.kernel32.dll_GetProcAddress_1
mov esi, eax
lea eax, [ebp - 8]
push eax
call ebx
push 0
mov eax, dword [ebp - 4]
call fcn.00404e00
push eax
mov eax, dword [edi]
call fcn.00404e00
push eax
call sub.kernel32.dll_CopyFileA
cmp eax, 1
sbb ebx, ebx
inc ebx
mov eax, dword [ebp - 8]
push eax
call esi
jmp 0x45808a
push 0
mov eax, dword [ebp - 4]
call fcn.00404e00
push eax
mov eax, dword [edi]
call fcn.00404e00
push eax
call sub.kernel32.dll_CopyFileA
cmp eax, 1
sbb ebx, ebx
inc ebx
mov eax, dword [edi]
call fcn.00408bec
test al, al
je 0x4580c0
mov eax, dword [edi]
mov edx, 0x80
call fcn.00408c10
mov esi, dword [edi]
mov dword [ebp - 0x118], esi
mov eax, dword [ebp - 0x118]
call fcn.00404e00
push eax
call sub.kernel32.dll_DeleteFileA
cmp eax, 1
sbb eax, eax
inc eax
mov esi, dword [ebp - 4]
test esi, esi
je 0x4580cc
sub esi, 4
mov esi, dword [esi]
push edi
mov ecx, esi
mov edx, 1
mov eax, dword [ebp - 4]
call fcn.00404e68
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x458104
lea eax, [ebp - 0x114]
call fcn.00404970
lea eax, [ebp - 4]
call fcn.00404970
ret

Function at 0x45826c
Capabilities:
Query service status

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffffe4
mov ebx, eax
xor esi, esi
mov edi, dword [ebx + 0x14]
test edi, edi
jbe 0x4582b7
push 4
mov eax, dword [ebx + 0xc]
call fcn.00404e00
push eax
push edi
call sub.advapi32.dll_OpenServiceA
mov ebx, eax
test ebx, ebx
jbe 0x4582b7
mov eax, esp
xor ecx, ecx
mov edx, 0x1c
call fcn.00403498
push esp
push ebx
call sub.advapi32.dll_QueryServiceStatus
test eax, eax
je 0x4582b1
mov esi, dword [esp + 4]
push ebx
call sub.advapi32.dll_CloseServiceHandle
mov eax, esi
add esp, 0x1c
pop edi
pop esi
pop ebx
ret
Function at 0x4582e4
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
xor edx, edx
mov dword [ebp - 4], edx
mov esi, eax
xor eax, eax
push ebp
push 0x4583d8
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
cmp dword [esi + 0x14], 0
jbe 0x4583c2
xor eax, eax
mov dword [ebp - 8], eax
mov eax, esi
call fcn.004582c0
test al, al
je 0x45832c
mov eax, esi
call fcn.004583e8
push 0x64
call sub.kernel32.dll_Sleep_1
mov eax, esi
call fcn.004582d0
test al, al
je 0x4583c2
mov edi, dword [esi + 8]
test edi, edi
je 0x458347
sub edi, 4
mov edi, dword [edi]
lea eax, [ebp - 4]
push eax
mov ecx, edi
mov edx, 1
mov eax, dword [esi + 8]
call fcn.00404e68
lea edx, [ebp - 4]
mov eax, dword [esi + 4]
call fcn.00457fa0
test al, al
je 0x4583c2
mov eax, dword [ebp - 4]
call fcn.00404e00
mov edi, eax
push 0
push 0
push 0
push 0
push 0
push edi
push 1
push 2
push 1
push 0xf01ff
mov eax, dword [esi + 0x10]
call fcn.00404e00
push eax
mov eax, dword [esi + 0xc]
call fcn.00404e00
push eax
mov eax, dword [esi + 0x14]
push eax
call sub.advapi32.dll_CreateServiceA
mov esi, eax
test esi, esi
jbe 0x4583c2
lea eax, [ebp - 8]
push eax
push 0
push esi
call sub.advapi32.dll_StartServiceA
cmp eax, 1
sbb ebx, ebx
inc ebx
push esi
call sub.advapi32.dll_CloseServiceHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4583df
lea eax, [ebp - 4]
call fcn.00404970
ret

Function at 0x4583e8
Capabilities:
Delete service
Stop service

Disassembly:
push ebx
push esi
add esp, 0xffffffe4
mov ebx, eax
mov esi, dword [ebx + 0x14]
test esi, esi
jbe 0x458425
push 0xf01ff
mov eax, dword [ebx + 0xc]
call fcn.00404e00
push eax
push esi
call sub.advapi32.dll_OpenServiceA
mov ebx, eax
test ebx, ebx
jbe 0x458425
push esp
push 1
push ebx
call sub.advapi32.dll_ControlService
push ebx
call sub.advapi32.dll_DeleteService
push ebx
call sub.advapi32.dll_CloseServiceHandle
add esp, 0x1c
pop esi
pop ebx
ret

Function at 0x458cf0
Capabilities:
Check os version

Disassembly:
add esp, 0xffffff6c
call fcn.00458c9c
test al, al
je 0x458d03
mov al, 2
jmp 0x458d24
mov dword [esp], 0x94
push esp
call sub.kernel32.dll_GetVersionExA
cmp dword [esp + 4], 6
jne 0x458d22
cmp dword [esp + 8], 1
jne 0x458d22
mov al, 1
jmp 0x458d24
xor eax, eax
add esp, 0x94
ret
Function at 0x100321b
Capabilities:
Compare security identifiers

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp dword [ebp + 0xc], esi
je 0x10033de
mov eax, dword [ebp + 0x10]
cmp dword [eax], esi
je 0x10033de
cmp byte [0x10062a8], 0
push ebx
push edi
mov edi, dword [sym.imp.ntdll.dll_RtlEnterCriticalSection]
jne 0x100325c
call fcn.01002f6f
mov dword [ebp - 4], eax
cmp eax, esi
jne 0x1003313
cmp dword [0x10062a4], esi
je 0x1003313
mov ebx, 0x100628c
cmp dword [ebp + 8], esi
je 0x1003318
push ebx
call edi
mov eax, dword [0x10062a4]
mov esi, eax
test eax, eax
je 0x100329a
push dword [esi + 4]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_EqualSid]
test eax, eax
jne 0x10032a5
mov esi, dword [esi]
test esi, esi
jne 0x1003284
push ebx
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
xor esi, esi
jmp 0x1003318
add esi, 8
mov eax, esi
mov dword [ebp + 8], esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x10032b0
mov edi, dword [ebp + 0x10]
mov ecx, dword [edi]
sub eax, edx
sar eax, 1
lea edx, [ecx - 1]
cmp edx, eax
jae 0x10032ce
mov eax, edx
jmp 0x10032e1
mov eax, esi
lea esi, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10032d3
sub eax, esi
sar eax, 1
mov esi, dword [ebp + 0xc]
push eax
push dword [ebp + 8]
push ecx
push esi
call fcn.01003198
mov eax, dword [edi]
xor ecx, ecx
mov word [esi + eax*2 - 2], cx
mov eax, esi
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10032fd
sub eax, ecx
sar eax, 1
mov dword [edi], eax
push ebx
jmp 0x10033d6
mov ebx, 0x100628c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.01002fc6
cmp dword [ebp - 4], esi
jne 0x10033dc
cmp dword [ebp + 8], esi
je 0x10033dc
push ebx
call edi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_GetLengthSid]
mov esi, dword [sym.imp.msvcrt.dll_malloc]
mov ebx, eax
push ebx
call esi
mov edi, eax
pop ecx
test edi, edi
je 0x10033d1
push dword [ebp + 8]
push edi
push ebx
call dword [sym.imp.ADVAPI32.dll_CopySid]
test eax, eax
je 0x10033c9
push 0x34
call esi
mov esi, eax
pop ecx
test esi, esi
je 0x10033c9
mov eax, dword [ebp + 0xc]
mov dword [esi + 4], edi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1003379
sub eax, edx
sar eax, 1
cmp eax, 0x14
jbe 0x1003391
push 0x14
pop eax
jmp 0x10033a5
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1003397
sub eax, edx
sar eax, 1
push eax
push dword [ebp + 0xc]
lea eax, [esi + 8]
push 0x15
push eax
call fcn.01003198
xor eax, eax
mov word [esi + 0x30], ax
mov eax, dword [0x10062a4]
mov dword [esi], eax
mov dword [0x10062a4], esi
jmp 0x10033d1
push edi
call dword [sym.imp.msvcrt.dll_free]
pop ecx
push 0x100628c
call dword [sym.imp.ntdll.dll_RtlLeaveCriticalSection]
pop edi
pop ebx
pop esi
leave
ret 0xc
Function at 0x10041e9
Capabilities:
Check if file exists
Get file attributes

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x100625c]
xor eax, ebp
mov dword [ebp - 4], eax
test esi, esi
je 0x100427e
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1004207
sub eax, edx
sar eax, 1
mov ecx, 0x104
cmp eax, ecx
ja 0x100427e
push esi
push ecx
lea eax, [ebp - 0x20c]
push eax
call sub.msvcrt.dll_wcscpy_s
lea eax, [ebp - 0x20c]
add esp, 0xc
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
test cx, cx
jne 0x1004238
sub eax, edx
sar eax, 1
lea eax, [ebp + eax*2 - 0x20c]
dec eax
dec eax
movzx ecx, word [eax]
cmp cx, 0x5c
je 0x100425e
cmp cx, 0x2f
jne 0x1004265
xor ecx, ecx
mov word [eax], cx
jmp 0x100424d
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
jmp 0x1004280
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.01004c6b
leave
ret
Function at 0x1004291
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x768
mov eax, dword [0x100625c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push dword [edi + 4]
mov dword [ebp - 0x768], eax
mov ebx, 0x104
lea eax, [ebp - 0x20c]
push ebx
push eax
call sub.msvcrt.dll_wcscpy_s
mov ecx, dword [edi + 4]
mov eax, ecx
add esp, 0xc
lea edx, [eax + 2]
mov si, word [eax]
inc eax
inc eax
test si, si
jne 0x10042d1
sub eax, edx
sar eax, 1
sub ebx, eax
mov eax, ecx
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x10042e6
sub eax, ecx
sar eax, 1
push 0x1001da0
lea eax, [ebp + eax*2 - 0x20c]
push ebx
push eax
mov dword [ebp - 0x764], eax
call sub.msvcrt.dll_wcscpy_s
add esp, 0xc
lea eax, [ebp - 0x75c]
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 0x760], eax
cmp eax, 0xffffffff
jne 0x1004341
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x12
neg eax
sbb eax, eax
jmp 0x10044cc
mov ecx, 0x1001d9c
lea eax, [ebp - 0x730]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1004372
test dx, dx
je 0x100436e
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1004372
add eax, 4
add ecx, 4
test dx, dx
jne 0x100434c
xor eax, eax
jmp 0x1004377
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1004492
mov ecx, 0x1001d94
lea eax, [ebp - 0x730]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x10043b0
test dx, dx
je 0x10043ac
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10043b0
add eax, 4
add ecx, 4
test dx, dx
jne 0x100438a
xor eax, eax
jmp 0x10043b5
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x1004492
lea eax, [ebp - 0x730]
push eax
call dword [sym.imp.msvcrt.dll__wcslwr]
push eax
push ebx
push dword [ebp - 0x764]
call sub.msvcrt.dll_wcscpy_s
mov eax, dword [edi + 0xc]
add esp, 0x10
test eax, eax
je 0x10043f6
push eax
lea eax, [ebp - 0x20c]
push 0x104
push eax
call sub.msvcrt.dll_wcscat_s
add esp, 0xc
push 0x104
lea eax, [ebp - 0x730]
push eax
push dword [edi + 8]
call fcn.01004750
test eax, eax
je 0x1004492
cmp dword [edi + 0xc], 0
je 0x100446f
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x50c]
push eax
lea eax, [ebp - 0x30c]
push eax
lea edx, [ebp - 0x20c]
call fcn.01004116
test eax, eax
je 0x100446f
test byte [ebp - 0x75c], 0x10
je 0x1004492
lea esi, [ebp - 0x30c]
call fcn.010041e9
test eax, eax
je 0x1004492
lea eax, [ebp - 0x40c]
push eax
lea eax, [ebp - 0x50c]
push eax
mov eax, esi
push eax
mov eax, dword [ebp + 8]
call fcn.01003f5b
jmp 0x1004492
lea esi, [ebp - 0x20c]
call fcn.010041e9
test eax, eax
je 0x1004492
mov eax, esi
push eax
mov eax, dword [ebp - 0x768]
call fcn.01004034
mov esi, eax
test esi, esi
jne 0x10044af
lea eax, [ebp - 0x75c]
push eax
push dword [ebp - 0x760]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
mov esi, eax
test esi, esi
jne 0x1004341
push dword [ebp - 0x760]
call dword [sym.imp.KERNEL32.dll_FindClose]
test esi, esi
jne 0x10044ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
jne 0x10044ca
mov eax, esi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.01004c6b
leave
ret 8
Function at 0x1004c45
Capabilities:
Terminate process

Disassembly:
push 0x10
push 0x1005108
call fcn.01004e34
xor ebx, ebx
mov dword [ebp - 4], ebx
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x1c], ebx
mov edi, 0x1007acc
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x1004a5a
cmp eax, esi
jne 0x1004a4d
xor esi, esi
inc esi
mov dword [ebp - 0x1c], esi
jmp 0x1004a5d
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x1004a34
xor esi, esi
inc esi
mov eax, dword [0x1007ac8]
cmp eax, esi
jne 0x1004a70
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x1004aab
mov eax, dword [0x1007ac8]
test eax, eax
jne 0x1004aa5
mov dword [0x1007ac8], esi
push 0x10011c8
push 0x10011bc
call fcn.010049b1
pop ecx
pop ecx
test eax, eax
je 0x1004aab
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
jmp 0x1004b75
mov dword [0x1006314], esi
mov eax, dword [0x1007ac8]
cmp eax, esi
jne 0x1004acf
push 0x10011b8
push 0x10011b0
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x1007ac8], 2
cmp dword [ebp - 0x1c], ebx
jne 0x1004adc
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x1007ad0], ebx
je 0x1004afd
push 0x1007ad0
call fcn.01004da9
pop ecx
test eax, eax
je 0x1004afd
push ebx
push 2
push ebx
call dword [0x1007ad0]
push dword [0x10062fc]
push dword [0x1006300]
push dword [0x10062f8]
call fcn.010022aa
add esp, 0xc
mov dword [0x1006310], eax
cmp dword [0x1006304], ebx
jne 0x1004b5b
push eax
call dword [sym.imp.msvcrt.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x20], ecx
push eax
push ecx
call sub.msvcrt.dll__XcptFilter
pop ecx
pop ecx
ret
cmp dword [0x1006314], ebx
jne 0x1004b69
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x1006310]
call fcn.01004e79
ret
call fcn.01004f81
jmp 0x1004a12