joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40422a
Capabilities:
Enumerate disk volumes
Get disk information via ioctl

Disassembly:
push ebp
lea ebp, [esp - 0x6c]
sub esp, 0xad0
push esi
push 0x103
lea eax, [ebp - 0x3ac]
xor esi, esi
push eax
mov word [ebp - 0x3ac], si
mov dword [ebp + 0x60], 2
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp + 0x64], eax
je 0x404417
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
push edi
lea eax, [ebp - 0x3ac]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov word [ebp + eax*2 - 0x3ae], si
call ebx
push esi
push 0x80
push 3
push esi
push 7
push 0x80000000
lea eax, [ebp - 0x3ac]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp + 0x68], eax
je 0x4043e3
xor eax, eax
mov dword [ebp - 0x6cc], esi
mov ecx, 0xc7
lea edi, [ebp - 0x6c8]
rep stosd dword es:[edi], eax
lea edi, [ebp + 0x54]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
stosd dword es:[edi], eax
call ebx
or dword [ebp + 0x58], 0xffffffff
push esi
lea eax, [ebp - 0x6cc]
push eax
push 0xc
lea eax, [ebp + 0x54]
push eax
push esi
push esi
push 0x2d1080
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
push 0x24
pop ecx
xor eax, eax
lea edi, [ebp - 0x3c]
rep stosd dword es:[edi], eax
mov edi, 0x90
push edi
lea eax, [ebp - 0x3c]
push esi
push eax
call fcn.004832e0
or dword [ebp - 0x24], 0xffffffff
add esp, 0xc
push esi
lea eax, [ebp - 0x6cc]
push eax
push edi
lea eax, [ebp - 0x3c]
push eax
push esi
push esi
push 0x70048
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
cmp dword [ebp + 0x68], esi
je 0x404339
push dword [ebp + 0x68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x30]
lea eax, [ebp - 0x1a4]
push dword [ebp - 0x34]
push eax
call fcn.004781a1
push dword [ebp - 0x28]
lea eax, [ebp - 0x12c]
push dword [ebp - 0x2c]
push eax
call fcn.004781a1
add esp, 0x18
cmp dword [ebp - 0x3c], 1
jne 0x404379
push esi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xb4]
push eax
call fcn.0043508e
jmp 0x404390
movzx eax, byte [ebp - 0x1c]
push eax
lea eax, [ebp - 0xb4]
push 0x497ed0
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x12c]
push eax
lea eax, [ebp - 0x1a4]
push eax
lea eax, [ebp - 0xb4]
push eax
push dword [ebp + 0x54]
lea eax, [ebp - 0x3ac]
push dword [ebp + 0x5c]
push dword [ebp + 0x58]
push eax
lea eax, [ebp - 0xa64]
push str._r_n_s__d__d__d__s__s__s
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebp + 0x60]
mov ecx, dword [ebp + 0x74]
add esp, 0x24
lea eax, [ebp + eax*2 - 0xa64]
push eax
call fcn.004371ec
mov dword [ebp + 0x60], esi
push 0x103
lea eax, [ebp - 0x3ac]
push eax
push dword [ebp + 0x64]
mov word [ebp - 0x3ac], si
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x40426c
cmp dword [ebp + 0x64], esi
pop edi
pop ebx
je 0x404417
push dword [ebp + 0x64]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
pop esi
add ebp, 0x6c
leave
ret
Function at 0x40492a
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
xor eax, eax
cmp dword [ebp + 8], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
jne 0x404945
lea ebx, [ebp - 0x14]
cmp dword [ebp + 0xc], eax
mov esi, dword [ebp + 0xc]
jne 0x404966
cmp dword [ebp + 8], eax
lea esi, [ebp - 0x10]
jne 0x40495c
xor esi, esi
jmp 0x404af4
push dword [ebx]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push edi
push 0x26c
mov ecx, ebx
call fcn.004371c5
push esi
call fcn.00402d71
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [esi]
mov dword [ebp - 0x18], edi
push dword [ebx]
call fcn.004047cb
add esp, 0x10
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
and dword [ebp - 4], 0
and dword [ebp - 0xc], 0
mov dword [ebp - 8], 0xc7
jmp 0x4049aa
mov edi, dword [ebp - 0x18]
cmp dword [ebp + 8], 0
je 0x404a57
mov eax, dword [ebx]
lea eax, [eax + edi*2]
push 0x497f30
mov dword [ebp - 0x1c], eax
call fcn.00433dc1
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s_
push dword [ebp - 0x1c]
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebx]
add esp, 0x18
xor edi, edi
push edi
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x404a13
push edi
push 5
mov ecx, 0x4aff28
call fcn.0040da4e
dec dword [ebp - 8]
jns 0x4049a7
jmp 0x404acf
cmp dword [ebp + 0xc], edi
mov dword [ebp - 0xc], 1
jne 0x404a26
xor esi, esi
jmp 0x404af3
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
lea eax, [edi + 1]
push eax
push dword [ebx]
mov dword [ebp + 8], eax
push dword [esi]
call fcn.004047cb
mov eax, dword [esi]
mov word [eax + edi*2], 0x5c
mov eax, dword [ebp + 8]
mov ecx, dword [esi]
add esp, 0xc
and word [ecx + eax*2], 0
jmp 0x404a59
mov eax, edi
and dword [ebp + 8], 0
add eax, eax
mov dword [ebp + 0xc], eax
push dword [ebp + 0x18]
mov edi, dword [esi]
push dword [ebp + 8]
add edi, dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push dword [ebp + 0x14]
push str.pecmd__s._lu._lu_s
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [esi]
add esp, 0x18
xor edi, edi
push edi
push 0x80
push 1
push edi
push edi
push 0x40000000
push eax
lea ecx, [ebp - 0x1c]
mov dword [ebp - 0x1c], edi
call fcn.00404863
cmp eax, edi
mov dword [ebp - 4], eax
jne 0x404aca
push edi
push 5
mov ecx, 0x4aff28
call fcn.0040da4e
inc dword [ebp + 8]
cmp dword [ebp + 8], 0xc8
jl 0x404a62
mov eax, dword [esi]
and word [eax], di
cmp dword [ebp - 0xc], edi
jne 0x404ad4
mov eax, dword [ebx]
mov word [eax], di
mov eax, dword [ebp + 0x10]
cmp eax, edi
je 0x404ae2
mov ecx, dword [ebp - 4]
mov dword [eax], ecx
jmp 0x404af0
cmp dword [ebp - 4], edi
je 0x404af0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 4]
pop edi
lea ecx, [ebp - 0x10]
call fcn.00431c4c
lea ecx, [ebp - 0x14]
call fcn.00431c4c
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x404b0a
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x12c
push ebx
push esi
push edi
push str.PECMD:MSGSVR:HWND
xor ebx, ebx
push ebx
call fcn.004036f2
pop ecx
pop ecx
call fcn.0040320d
mov byte [0x4afb92], 1
call fcn.0042d431
call fcn.004336e4
push ebx
push 0x24
pop edi
push edi
lea eax, [ebp - 0x12c]
push eax
push ebx
mov byte [ebp - 0x12c], bl
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str.System32Kernel32.dll
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x12c]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x497f9c
push eax
mov dword [ebp - 4], eax
call esi
push 7
pop ecx
mov dword [ebp - 0x28], edi
push str.GetNativeSystemInfo
push dword [ebp - 4]
mov dword [0x4afb54], eax
xor eax, eax
mov dword [ebp - 0x24], ebx
lea edi, [ebp - 0x20]
rep stosd dword es:[edi], eax
call esi
cmp eax, ebx
je 0x404bad
lea ecx, [ebp - 0x28]
push ecx
call eax
cmp word [ebp - 0x28], bx
je 0x404bea
push str.Wow64RevertWow64FsRedirection
push dword [ebp - 4]
call esi
push str.Wow64DisableWow64FsRedirection
push dword [ebp - 4]
mov dword [0x4afb8c], eax
call esi
cmp dword [0x4afb8c], ebx
mov dword [0x4afb88], eax
jne 0x404bdf
mov dword [0x4afb88], ebx
mov bl, 1
mov word [0x4afb70], 0x100
movsx eax, bl
push str.bX64
push eax
push 0x4aff28
mov byte [0x4afb91], bl
call fcn.004394ef
add esp, 0xc
pop edi
pop esi
pop ebx
leave
ret
Function at 0x404c0b
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov dword [ebp - 4], eax
lea ecx, [eax + 8]
push ebx
mov bx, word [eax]
mov dword [ebp - 4], ecx
mov ax, word [ecx]
call fcn.00431c5f
test al, al
jne 0x404c2f
inc ecx
inc ecx
mov dword [ebp - 4], ecx
push 0x63
lea eax, [ebp - 0x74]
push eax
push str.DEBUGMDG
mov byte [ebp - 0x74], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x74], 0x31
jne 0x404c51
mov byte [0x4afb98], 1
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 4]
and dword [ebp - 0xc], 0
lea ecx, [ebp - 0x10]
mov dword [0x4afb9c], eax
call fcn.004419bc
lea ecx, [ebp - 8]
call fcn.0043717e
push 1
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
mov ecx, 0x4aff28
call fcn.0043eb92
push dword [ebp - 8]
lea ecx, [ebp - 0xc]
call fcn.00441a80
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 8]
mov dword [ebp - 4], eax
call fcn.00431c4c
lea ecx, [ebp - 0x10]
call fcn.00431c4c
mov ecx, dword [ebp - 4]
call fcn.00403414
push str._InstallService
mov edi, eax
push 0xf
pop esi
mov dword [ebp - 4], edi
call fcn.00402bf3
test al, al
pop ecx
pop edi
pop esi
je 0x404cee
push 0x1e
push 0x497ff8
push dword [ebp - 4]
call fcn.00410b58
mov ecx, dword [ebp - 4]
add esp, 0xc
add ecx, 0x1e
call fcn.00403414
mov dword [ebp - 4], eax
jmp 0x404d05
push 8
lea eax, [ebp - 4]
push eax
push 0x497fec
call fcn.00438eee
add esp, 0xc
test al, al
je 0x404d49
cmp bx, 0x22
jne 0x404d3f
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp - 4]
lea ecx, [edx + eax*2 - 2]
cmp ecx, edx
jbe 0x404d3f
mov ax, word [ecx]
call fcn.00431c5f
test al, al
je 0x404d31
dec ecx
dec ecx
cmp ecx, edx
ja 0x404d1f
cmp ecx, edx
jbe 0x404d3f
cmp word [ecx], 0x22
jne 0x404d3f
and word [ecx], 0
push dword [ebp - 4]
call fcn.0040bf0d
jmp 0x404d69
push 0xe
lea eax, [ebp - 4]
push eax
push 0x497fdc
call fcn.00438eee
add esp, 0xc
test al, al
pop ebx
je 0x404d72
push dword [ebp - 4]
call fcn.004058a5
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0xc]
call fcn.00431c4c
xor eax, eax
leave
ret

Function at 0x404d7e
Capabilities:
Terminate process

Disassembly:
push ebx
push esi
mov esi, eax
push 0
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [esi]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x4afba0], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x404dbd
mov eax, dword [edi]
test eax, eax
je 0x404dbd
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateJobObject]
push dword [edi]
call ebx
and dword [edi], 0
cmp byte [esp + 0x10], 0
je 0x404dd5
push 1
push 0
push str.shutdown__a
call fcn.004035da
add esp, 0xc
push dword [0x4afbf8]
call fcn.00403559
cmp byte [esp + 0x10], 0
pop ecx
je 0x404e01
push 3
pop esi
push 0
call dword [sym.imp.ADVAPI32.dll_AbortSystemShutdownW]
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
dec esi
jne 0x404deb
pop esi
pop ebx
ret
Function at 0x4056a2
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [0x4afba4], eax
mov dword [ebp - 8], eax
lea eax, [ebp + 8]
push edi
push eax
mov dword [ebp - 0x10], 0x100
call fcn.004047e3
pop ecx
mov ecx, dword [ebp + 8]
mov esi, ecx
sub esi, dword [ebp - 8]
mov eax, 0x400
sar esi, 1
cmp esi, eax
jle 0x4056df
mov esi, eax
lea eax, [ebp - 0xc]
push eax
mov dword [ebp - 0xc], ecx
call fcn.00431c97
push 6
push dword [ebp - 0xc]
push str.__gui_
call fcn.00432c0f
mov edi, dword [sym.imp.KERNEL32.dll_lstrlenW]
add esp, 0x10
xor ebx, ebx
test al, al
je 0x405736
mov eax, dword [ebp - 0xc]
add eax, 0xc
mov dword [ebp + 8], eax
lea eax, [ebp + 8]
push eax
mov dword [ebp - 0x10], ebx
call fcn.00431c97
pop ecx
push dword [ebp + 8]
call edi
inc eax
add eax, eax
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call fcn.00410b0e
add esp, 0xc
add esi, esi
push esi
push dword [ebp - 8]
lea eax, [ebp - 0x824]
push eax
call fcn.00410b58
add esp, 0xc
push dword [ebp - 8]
mov word [ebp + esi - 0x824], bx
mov byte [0x4b3003], bl
call edi
mov esi, eax
inc esi
lea eax, [esi + 0x226]
push eax
lea ecx, [ebp - 4]
call fcn.0043719c
mov eax, dword [ebp - 4]
push 0x1cc
add eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov ecx, eax
cmp ecx, ebx
jle 0x405898
mov eax, dword [ebp - 4]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 4]
lea edi, [eax + ecx*2 + 2]
mov dword [ebp + 8], edi
lea edx, [eax + 2]
xor edi, edi
mov word [eax], 0x22
jmp 0x4057bc
mov ax, word [edx]
call fcn.00431c5f
test al, al
je 0x4057ba
xor edi, edi
inc edi
inc edx
inc edx
cmp edx, dword [ebp + 8]
jb 0x4057ab
cmp di, bx
mov edx, dword [ebp - 4]
lea eax, [edx + 2]
mov dword [ebp + 8], eax
je 0x4057dd
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp + 8], eax
inc ecx
push 0x1e
lea edi, [eax + ecx*2]
push 0x498190
push edi
call fcn.00410b58
push esi
push dword [ebp - 8]
add edi, 0x1e
push edi
call fcn.004047cb
add esp, 0x18
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
cmp edi, ebx
je 0x40588a
mov eax, dword [ebp - 0x10]
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp + 8]
or eax, 0x10
push ebx
push 2
push eax
push 0xf01ff
lea eax, [ebp - 0x824]
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x40588a
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x824]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x405883
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x405871
push 0x498184
jmp 0x405876
push 0x498178
call fcn.00403653
pop ecx
push dword [ebp + 8]
call esi
jmp 0x405895
push 0x49816c
jmp 0x40588f
push 0x498160
call fcn.00403653
pop ecx
push edi
call esi
lea ecx, [ebp - 4]
call fcn.00431c4c
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4058a5
Capabilities:
Delete service
Stop service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x824
push ebx
push esi
mov esi, dword [ebp + 8]
xor eax, eax
push edi
mov edx, esi
xor ebx, ebx
jmp 0x4058c7
call fcn.00431c5f
test al, al
jne 0x4058cf
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x4058bc
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x4058e0
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.00410b58
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405900
inc esi
inc esi
mov ax, word [esi]
call fcn.00431c5f
test al, al
jne 0x4058fe
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
cmp eax, ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov dword [ebp - 4], eax
je 0x405993
push 0x10020
lea ecx, [ebp - 0x824]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
test eax, eax
mov dword [ebp + 8], eax
je 0x405993
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x40595c
push 0x4981e8
call fcn.00403653
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, 0xc8
push edi
call esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
je 0x40597e
push 0x4981dc
jmp 0x405983
push 0x4981d0
call fcn.00403653
pop ecx
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x4059b2
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x4059a7
push 0x4981c4
jmp 0x4059ac
push 0x4981b8
call fcn.00403653
pop ecx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x405aa2
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, 0x4981f4
lea edi, [ebp - 0x7f8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
xor eax, eax
mov ecx, 0x1f9
lea edi, [ebp - 0x7e6]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
call fcn.00403414
mov edx, eax
mov ecx, edx
call fcn.004034db
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x405af0
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.004047cb
add esp, 0xc
lea eax, [ebp - 0x7f8]
push eax
push 0x64
xor edi, edi
push edi
push 0x8000004
push edi
push 0xffffffffffffffff
mov word [ebp + esi*2 - 0x7e8], di
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov ebx, eax
cmp ebx, edi
je 0x405b65
push edi
push edi
push edi
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp esi, edi
je 0x405b65
push 0x64
push edi
push esi
call fcn.00403427
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4ae0d4], eax
mov dword [0x4afba8], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40c1bd
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x4afc48
mov dword [0x4afc48], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x4afc4c], 5
je 0x40c1e5
xor eax, eax
leave
ret
mov eax, dword [0x4afc50]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40c200
dec eax
jne 0x40c281
mov ebx, 0x39000
jmp 0x40c205
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x4afc14]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x4afd68
push esi
mov dword [ebp - 0x20], 0x18
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x10], edi
mov dword [ebp - 0xc], edi
call dword [0x4afc10]
cmp eax, 0xc0000022
jne 0x40c27c
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x4afc10]
push dword [0x4afd68]
call fcn.0040c0ef
pop ecx
push dword [0x4afd68]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x4afc10]
cmp eax, edi
pop esi
jge 0x40c285
xor eax, eax
jmp 0x40c2a9
push 0x1000
push ebx
push edi
push 6
push dword [0x4afd68]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x4afd64], eax
neg eax
sbb eax, eax
and eax, dword [0x4afd68]
pop edi
pop ebx
leave
ret

Function at 0x40c2ad
Capabilities:
Read file via mapping

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
mov eax, edi
shr eax, 0x16
mov eax, dword [ecx + eax*4]
test al, 1
jne 0x40c2c6
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40c2d9
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40c321
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x4afd68]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, edi
shr ecx, 0xc
and ecx, 0x3ff
mov ecx, dword [eax + ecx*4]
test ecx, 1
jne 0x40c30e
xor eax, eax
jmp 0x40c323
mov esi, ecx
xor esi, edi
and esi, 0xfff
push eax
xor esi, ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop esi
pop edi
ret

Function at 0x40c326
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x4afd64]
call fcn.0040c2ad
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x4afd68]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x40c35b
pop esi
ret
shr esi, 2
and esi, 0x3ff
mov esi, dword [eax + esi*4]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, esi
pop esi
ret

Function at 0x40c3ed
Capabilities:
Check mutex on windows

Disassembly:
push esi
push dword [esp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
test esi, esi
je 0x40c40b
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, esi
pop esi
ret
Function at 0x40c4dd
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 7
push 0xc0000000
push str.C:pe.debug.log
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x40c539
push esi
push 2
push ebx
push ebx
push edi
call fcn.00432bc3
mov esi, dword [ebp + 8]
add esp, 0x10
cmp byte [esi], bl
je 0x40c531
push ebx
lea eax, [ebp - 4]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40c6ab
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push edi
push 0x80000000
push dword [ebp + 8]
call fcn.0040c62a
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40c742
push esi
push eax
call fcn.0040c689
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40c6dd
mov dword [esi], eax
jmp 0x40c6e0
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40c706
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.00437072
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.00431c4c
test edi, edi
je 0x40c736
and dword [ebp + 0xc], 0
push 0
lea eax, [ebp + 0xc]
push eax
push dword [esi]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp + 0xc]
test eax, eax
jge 0x40c725
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.004832e0
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x40c745
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40cdd9
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40cdee
mov eax, dword [esp + 4]
mov dword [ecx + 0xc], eax
cmp word [eax], 0x5a4d
je 0x40cdf2
xor eax, eax
jmp 0x40ce5d
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40ce06
xor eax, eax
jmp 0x40ce5c
add eax, edx
mov dword [ecx + 0x10], eax
cmp dword [eax], 0x4550
jne 0x40ce02
mov dx, word [eax + 0x16]
test dh, 0x20
je 0x40ce02
test dl, 2
je 0x40ce02
cmp word [eax + 0x14], 0xe0
jne 0x40ce02
mov esi, dword [ecx + 0x10]
add eax, 0xf8
xor edx, edx
mov dword [ecx + 0x14], eax
cmp word [esi + 6], dx
jbe 0x40ce59
add eax, 0x10
mov esi, dword [eax + 4]
add esi, dword [eax]
cmp esi, dword [esp + 0xc]
ja 0x40ce02
mov esi, dword [ecx + 0x10]
movzx esi, word [esi + 6]
inc edx
add eax, 0x28
cmp edx, esi
jl 0x40ce3f
xor eax, eax
inc eax
pop esi
ret 8
Function at 0x40ced1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [0x4afe20], ebx
je 0x40cf45
cmp byte [ebp + 8], bl
je 0x40cf45
cmp dword [0x4aff1c], ebx
jle 0x40cf45
mov eax, dword [0x4aff18]
cmp word [eax], bx
je 0x40cf45
test byte [0x4b0268], 2
push eax
je 0x40cf22
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
push dword [0x4aff18]
push dword [0x4afe20]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40cf45
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
add eax, eax
push eax
push dword [0x4aff18]
mov dword [ebp - 4], ebx
push dword [0x4afe20]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [0x4aff20]
dec eax
cmp eax, 0x1ffff
jb 0x40cf6b
push 0x10002
mov ecx, 0x4aff18
mov dword [0x4aff20], 0x10000
call fcn.004371c5
mov eax, dword [0x4aff18]
mov word [eax], bx
mov dword [0x4aff1c], ebx
pop ebx
leave
ret

Function at 0x40d237
Capabilities:
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push esi
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
xor esi, esi
lea eax, [ebp - 0x18]
push eax
push dword [ebp + 8]
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExW]
cmp dword [ebp + 0x10], esi
je 0x40d26f
cdq
jmp 0x40d282
cmp dword [ebp + 0xc], esi
je 0x40d27c
mov eax, dword [ebp - 8]
mov edx, dword [ebp - 4]
jmp 0x40d282
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
pop esi
leave
ret