joyce8/EMBER2024-capa huggingface dataset:
Function at 0x402fe4
Capabilities:
Get geographical location
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
and word [ebp - 0x44], 0
push 0x20
lea eax, [ebp - 0x44]
push eax
push str.LC_ALL
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
cmp word [ebp - 0x44], 0
jne 0x40301a
push 0x20
lea eax, [ebp - 0x44]
push eax
push 0xb
push 0x800
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
cmp word [ebp - 0x44], 0
lea eax, [ebp - 0x44]
jne 0x403029
mov eax, 0x484be0
push eax
mov ecx, 0x49abe8
call fcn.0043a57e
push dword [0x49abe8]
call fcn.0042eb72
cmp eax, 1
pop ecx
jle 0x40304b
mov word [0x49e010], ax
leave
ret

Function at 0x4030c5
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
mov edi, dword [sym.imp.USER32.dll_GetLastInputInfo]
lea eax, [ebp - 8]
xor ebx, ebx
push eax
mov dword [ebp - 8], 8
mov dword [ebp - 4], ebx
call edi
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x49ab90]
test ecx, ecx
jle 0x4030f8
mov dword [0x49ab90], eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call esi
mov dword [0x49ab90], eax
jmp 0x403130
lea eax, [ebp - 8]
push eax
mov dword [ebp - 4], ebx
call edi
call esi
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, dword [ebp + 8]
jb 0x403128
sub eax, dword [0x49ab90]
cmp eax, dword [ebp + 8]
jae 0x403138
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [0x499280], bl
jg 0x403108
mov eax, dword [ebp - 4]
mov ecx, eax
sub ecx, dword [0x49ab90]
pop esi
test ecx, ecx
jle 0x40314d
mov dword [0x49ab90], eax
xor eax, eax
cmp byte [0x499280], bl
pop edi
setg al
pop ebx
leave
ret

Function at 0x403322
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push ebx
push edi
xor ebx, ebx
xor eax, eax
mov dword [ebp - 0x10], ebx
lea edi, [ebp - 0xc]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0xf
xor eax, eax
cmp byte [ebp + 0x10], bl
pop ecx
lea edi, [ebp - 0x4c]
mov dword [ebp - 0x54], 0x44
mov dword [ebp - 0x50], ebx
rep stosd dword es:[edi], eax
je 0x403358
or dword [ebp - 0x28], 1
mov word [ebp - 0x24], bx
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push ebx
push ebx
push ebx
push 1
push ebx
push ebx
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x403397
push esi
push dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
cmp byte [ebp + 0xc], bl
je 0x403391
push 0xffffffffffffffff
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x10]
call esi
pop esi
pop edi
pop ebx
leave
ret

Function at 0x40339b
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x400
push 0x3ff
lea eax, [ebp - 0x400]
push eax
push str.SHOWEWFMSG
mov byte [ebp - 0x400], 0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x400], 0x31
jne 0x4033dd
push 0
push 0x484c0c
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
leave
ret
Function at 0x4033df
Capabilities:
Terminate process

Disassembly:
cmp byte [0x499280], 2
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
push 0x14
pop esi
je 0x4033f6
push esi
call edi
cmp dword [0x49ab9c], 0
je 0x403411
push 0x1e
pop esi
jmp 0x403411
cmp dword [0x49ab94], 0
je 0x403414
push 0xa
call edi
dec esi
jns 0x403404
mov eax, dword [0x49ab94]
test eax, eax
pop edi
pop esi
je 0x403432
push 0
push eax
mov dword [0x49ab94], 0
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov byte [0x499280], 0xff
ret

Function at 0x40343a
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp + 0xc]
mov esi, 0x8000004
push 0x64
push ebx
push esi
push ebx
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
cmp edi, ebx
mov byte [ebp - 1], 1
je 0x40347b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40348c
mov byte [ebp - 1], bl
jmp 0x40348c
push dword [ebp + 0xc]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_OpenFileMappingA]
mov edi, eax
cmp edi, ebx
je 0x4034c8
push ebx
push ebx
push ebx
push 6
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
push edi
mov dword [0x49aba4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [0x49aba4]
cmp eax, ebx
je 0x4034c8
cmp byte [ebp - 1], bl
je 0x4034c3
push 0x64
push ebx
push eax
call fcn.00470340
mov eax, dword [0x49aba4]
add esp, 0xc
mov ecx, dword [ebp + 8]
mov dword [eax], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x403715
Capabilities:
Get file version info

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push 0x169
lea ecx, [ebp - 4]
call fcn.0042e1e2
mov ebx, dword [ebp - 4]
push 0x104
push dword [ebp + 0xc]
add ebx, 0xc8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpynW]
lea eax, [ebp - 8]
push eax
xor esi, esi
push ebx
mov dword [ebp - 8], esi
call sub.VERSION.dll_GetFileVersionInfoSizeW
cmp eax, esi
mov dword [ebp - 0x10], eax
je 0x4037d3
push edi
push eax
push 2
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
push edi
push dword [ebp - 0x10]
push dword [ebp - 8]
push ebx
call sub.VERSION.dll_GetFileVersionInfoW
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0xc]
push eax
push 0x484c48
push edi
call sub.VERSION.dll_VerQueryValueW
mov eax, dword [ebp - 0xc]
mov cx, word [eax + 0x12]
mov dx, word [eax + 0x10]
mov di, word [eax + 0x16]
movzx eax, word [eax + 0x14]
push eax
movzx eax, di
push eax
movzx eax, dx
push eax
movzx eax, cx
push eax
push 0x484c30
push dword [ebp - 4]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
mov eax, dword [ebp - 4]
mov esi, dword [ebp + 8]
and dword [ebp - 4], 0
lea ecx, [ebp - 4]
mov dword [esi], eax
call fcn.00428a48
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x403dde
Capabilities:
Enumerate disk volumes
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xd68
push esi
push edi
mov edi, 0x514
push edi
lea eax, [ebp - 0xd68]
xor esi, esi
push eax
mov word [ebp - 0xd68], si
call dword [sym.imp.KERNEL32.dll_FindFirstVolumeW]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x403fd6
cmp dword [ebp + 0xc], 0xffffffff
mov eax, dword [0x49abc0]
push ebx
mov dword [ebp - 8], eax
jne 0x403e79
cmp eax, esi
je 0x403fd5
mov edi, dword [eax]
add eax, 4
mov dword [ebp - 8], eax
jmp 0x403e66
mov eax, dword [ebp - 8]
dec edi
lea eax, [eax + edi*4]
mov ebx, dword [eax]
cmp ebx, esi
mov dword [eax], esi
je 0x403e66
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push esi
push esi
push 0x9001c
push ebx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp edi, esi
jg 0x403e32
mov ecx, 0x49abc0
call fcn.00428a48
jmp 0x403fd5
cmp eax, esi
jne 0x403e9c
push 0x7d4
mov ecx, 0x49abc0
call fcn.0042e092
mov eax, dword [0x49abc0]
cmp eax, esi
mov dword [ebp - 8], eax
je 0x403fd5
add dword [ebp - 8], 4
mov dword [ebp - 0x10], eax
mov dword [eax], esi
push edi
jmp 0x403fad
lea eax, [ebp - 0xd68]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
mov word [ebp + eax*2 - 0xd6a], si
call dword [sym.imp.KERNEL32.dll_SetLastError]
push esi
push 0x80
push 3
push esi
push 7
push 0x80000000
lea eax, [ebp - 0xd68]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403fa8
xor eax, eax
mov dword [ebp - 0x33c], esi
mov ecx, 0xc7
lea edi, [ebp - 0x338]
rep stosd dword es:[edi], eax
lea edi, [ebp - 0x1c]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push esi
mov dword [ebp - 4], 0xffffff9c
stosd dword es:[edi], eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 0x18], 0xffffffff
push esi
lea eax, [ebp - 0x33c]
push eax
push 0xc
lea eax, [ebp - 0x1c]
push eax
push esi
push esi
push 0x2d1080
push ebx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
movsx eax, word [ebp - 0x18]
jne 0x403f43
mov eax, dword [ebp - 4]
cmp dword [ebp + 8], eax
jne 0x403f9d
mov edi, dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push ebx
mov dword [ebp - 4], esi
call edi
push ebx
call edi
push ebx
call edi
push ebx
call edi
xor edi, edi
push esi
lea eax, [ebp - 4]
push eax
push esi
push esi
push esi
push esi
push 0x90018
push ebx
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
jne 0x403f86
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
dec edi
jns 0x403f5f
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax]
cmp ecx, 0x1f4
jge 0x403f9b
mov edx, dword [ebp - 8]
mov dword [edx + ecx*4], ebx
inc dword [eax]
xor ebx, ebx
cmp ebx, esi
je 0x403fa8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x514
lea eax, [ebp - 0xd68]
push eax
push dword [ebp - 0xc]
mov word [ebp - 0xd68], si
call dword [sym.imp.KERNEL32.dll_FindNextVolumeW]
test eax, eax
jne 0x403eab
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_FindVolumeClose]
pop ebx
pop edi
pop esi
leave
ret
Function at 0x40441e
Capabilities:
Query environment variable
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov dword [ebp - 4], eax
push ebx
lea ecx, [eax + 8]
push edi
mov di, word [eax]
mov dword [ebp - 4], ecx
mov ax, word [ecx]
call fcn.0040ac1b
test al, al
jne 0x404443
inc ecx
inc ecx
mov dword [ebp - 4], ecx
push 0x63
lea eax, [ebp - 0x74]
push eax
xor ebx, ebx
push str.DEBUGMDG
mov byte [ebp - 0x74], bl
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
cmp byte [ebp - 0x74], 0x31
jne 0x404466
mov byte [0x49ab8c], 1
push esi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push dword [ebp - 4]
lea ecx, [ebp - 0x10]
mov dword [0x49ab90], eax
mov dword [ebp - 0xc], ebx
call fcn.0043a4ba
lea ecx, [ebp - 8]
call fcn.0042e1c4
push 1
push ebx
lea eax, [ebp - 8]
push eax
push dword [ebp - 0x10]
mov ecx, 0x49aed0
call fcn.00436312
push dword [ebp - 8]
lea ecx, [ebp - 0xc]
call fcn.0043a57e
mov eax, dword [ebp - 0xc]
lea ecx, [ebp - 8]
mov dword [ebp - 4], eax
call fcn.00428a48
lea ecx, [ebp - 0x10]
call fcn.00428a48
mov ecx, dword [ebp - 4]
call fcn.0040315c
push 0x1e
push eax
push str._InstallService
mov dword [ebp - 4], eax
mov esi, eax
call fcn.004703b0
add esp, 0xc
test eax, eax
jne 0x404514
movzx esi, word [esi + 0x1e]
mov eax, esi
call fcn.0040ac1b
test al, al
jne 0x4044f2
cmp si, bx
jne 0x404514
push 0x1e
push 0x484eb4
push dword [ebp - 4]
call fcn.00470580
mov ecx, dword [ebp - 4]
add esp, 0xc
add ecx, 0x1e
call fcn.0040315c
mov dword [ebp - 4], eax
jmp 0x40452b
push 8
lea eax, [ebp - 4]
push eax
push 0x484ea8
call fcn.0042fc5f
add esp, 0xc
test al, al
je 0x40456e
cmp di, 0x22
jne 0x404564
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 0x404564
mov ax, word [ecx]
call fcn.0040ac1b
test al, al
je 0x404557
dec ecx
dec ecx
cmp ecx, edx
ja 0x404545
cmp ecx, edx
jbe 0x404564
cmp word [ecx], 0x22
jne 0x404564
mov word [ecx], bx
push dword [ebp - 4]
call fcn.0040aa97
jmp 0x40458e
push 0xe
lea eax, [ebp - 4]
push eax
push 0x484e98
call fcn.0042fc5f
add esp, 0xc
test al, al
pop esi
je 0x404596
push dword [ebp - 4]
call fcn.0040500e
pop ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea ecx, [ebp - 0xc]
call fcn.00428a48
pop edi
xor eax, eax
pop ebx
leave
ret

Function at 0x4045a4
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 [0x49ab94], 0
call ebx
and dword [esi], 0
test edi, edi
je 0x4045e3
mov eax, dword [edi]
test eax, eax
je 0x4045e3
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 0x4045fb
push 1
push 0
push str.shutdown__a
call fcn.00403322
add esp, 0xc
push dword [0x49abe4]
call fcn.004032a1
cmp byte [esp + 0x10], 0
pop ecx
je 0x404627
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 0x404611
pop esi
pop ebx
ret
Function at 0x404e61
Capabilities:
Create service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
push ebx
push esi
push edi
mov edi, ecx
xor eax, eax
mov dword [0x49ab98], ecx
mov dword [ebp - 0xc], edi
xor ebx, ebx
jmp 0x404e89
call fcn.0040ac1b
test al, al
jne 0x404e91
inc ecx
inc ecx
mov ax, word [ecx]
cmp ax, bx
jne 0x404e7e
sub ecx, edi
sar ecx, 1
mov eax, 0x400
cmp ecx, eax
jle 0x404ea0
mov ecx, eax
lea esi, [ecx + ecx]
push esi
lea eax, [ebp - 0x820]
push edi
push eax
call fcn.00470580
add esp, 0xc
push edi
mov word [ebp + esi - 0x820], bx
mov byte [0x49e003], bl
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edi, eax
inc edi
lea eax, [edi + 0x226]
push eax
lea ecx, [ebp - 4]
call fcn.0042e1e2
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 0x405001
mov eax, dword [ebp - 4]
mov word [eax + ecx*2 + 2], bx
mov eax, dword [ebp - 4]
lea esi, [eax + ecx*2 + 2]
mov dword [ebp - 8], esi
lea edx, [eax + 2]
xor esi, esi
mov word [eax], 0x22
jmp 0x404f27
mov ax, word [edx]
call fcn.0040ac1b
test al, al
je 0x404f25
xor esi, esi
inc esi
inc edx
inc edx
cmp edx, dword [ebp - 8]
jb 0x404f16
cmp si, bx
mov edx, dword [ebp - 4]
lea eax, [edx + 2]
mov dword [ebp - 8], eax
je 0x404f48
dec eax
dec eax
mov word [edx + ecx*2 + 2], 0x22
inc ecx
mov dword [ebp - 8], eax
inc ecx
push 0x1e
lea esi, [eax + ecx*2]
push 0x485024
push esi
call fcn.00470580
push edi
push dword [ebp - 0xc]
add esi, 0x1e
push esi
call fcn.00403fda
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 0x404ff3
push ebx
push ebx
push ebx
push ebx
push ebx
push dword [ebp - 8]
lea eax, [ebp - 0x820]
push ebx
push 2
push 0x110
push 0xf01ff
push eax
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
cmp eax, ebx
je 0x404ff3
push eax
call esi
push 0x20000000
lea eax, [ebp - 0x820]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, ebx
mov dword [ebp - 0xc], eax
je 0x404fec
push ebx
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
je 0x404fda
push 0x485018
jmp 0x404fdf
push 0x48500c
call fcn.0040339b
pop ecx
push dword [ebp - 0xc]
call esi
jmp 0x404ffe
push 0x485000
jmp 0x404ff8
push 0x484ff4
call fcn.0040339b
pop ecx
push edi
call esi
lea ecx, [ebp - 4]
call fcn.00428a48
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40500e
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 0x405030
call fcn.0040ac1b
test al, al
jne 0x405038
inc esi
inc esi
mov ax, word [esi]
cmp ax, bx
jne 0x405025
mov eax, esi
sub eax, edx
sar eax, 1
mov ecx, 0x400
cmp eax, ecx
jle 0x405049
mov eax, ecx
lea edi, [eax + eax]
push edi
push edx
lea eax, [ebp - 0x824]
push eax
call fcn.00470580
add esp, 0xc
mov word [ebp + edi - 0x824], bx
jmp 0x405069
inc esi
inc esi
mov ax, word [esi]
call fcn.0040ac1b
test al, al
jne 0x405067
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 0x4050fc
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 0x4050fc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x4050c5
push 0x485074
call fcn.0040339b
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 0x4050e7
push 0x485068
jmp 0x4050ec
push 0x48505c
call fcn.0040339b
pop ecx
push dword [ebp + 8]
call ebx
push edi
call esi
jmp 0x40511b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
jne 0x405110
push 0x485050
jmp 0x405115
push 0x485044
call fcn.0040339b
pop ecx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x40520b
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7f8
push ebx
push esi
push edi
mov esi, 0x485080
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.0040315c
mov edx, eax
mov ecx, edx
call fcn.00403223
mov esi, eax
sub esi, edx
sar esi, 1
mov eax, 0x3e8
cmp esi, eax
jl 0x405259
mov esi, eax
push esi
push edx
lea eax, [ebp - 0x7e8]
push eax
call fcn.00403fda
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 0x4052ce
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 0x4052ce
push 0x64
push edi
push esi
call fcn.0040316f
mov dword [esi], 0xffffffff
mov dword [esi + 8], edi
lea eax, [esi + 4]
add esp, 0xc
mov dword [0x4990c4], eax
mov dword [0x49ab9c], esi
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40adf9
Capabilities:
Check os version
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push 0x49ac38
mov dword [0x49ac38], 0x114
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [0x49ac3c], 5
je 0x40ae21
xor eax, eax
leave
ret
mov eax, dword [0x49ac40]
push ebx
push edi
xor edi, edi
sub eax, edi
je 0x40ae3c
dec eax
jne 0x40aebd
mov ebx, 0x39000
jmp 0x40ae41
mov ebx, 0x30000
push esi
push str.DevicePhysicalMemory
lea eax, [ebp - 8]
push eax
call dword [0x49ad4c]
lea eax, [ebp - 8]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
push eax
push 6
mov esi, 0x49ad5c
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 [0x49ac00]
cmp eax, 0xc0000022
jne 0x40aeb8
lea eax, [ebp - 0x20]
push eax
push 0x60000
push esi
call dword [0x49ac00]
push dword [0x49ad5c]
call fcn.0040ad2b
pop ecx
push dword [0x49ad5c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x20]
push eax
push 6
push esi
call dword [0x49ac00]
cmp eax, edi
pop esi
jge 0x40aec1
xor eax, eax
jmp 0x40aee5
push 0x1000
push ebx
push edi
push 6
push dword [0x49ad5c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [0x49ad58], eax
neg eax
sbb eax, eax
and eax, dword [0x49ad5c]
pop edi
pop ebx
leave
ret

Function at 0x40aee9
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 0x40af02
xor eax, eax
pop edi
ret
test al, al
push esi
jns 0x40af15
mov esi, eax
xor esi, edi
and esi, 0x3fffff
xor esi, eax
jmp 0x40af5d
push 0x1000
and eax, 0xfffff000
push eax
push 0
push 4
push dword [0x49ad5c]
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 0x40af4a
xor eax, eax
jmp 0x40af5f
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 0x40af62
Capabilities:
Read file via mapping

Disassembly:
push esi
push dword [esp + 8]
push dword [0x49ad58]
call fcn.0040aee9
pop ecx
pop ecx
push 0x1000
mov esi, eax
and eax, 0xfffff000
push eax
push 0
push 6
push dword [0x49ad5c]
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
jne 0x40af97
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 0x40b203
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.0040b183
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 4], eax
je 0x40b29a
push esi
push eax
call fcn.0040b1e1
mov esi, dword [ebp + 0x10]
test esi, esi
pop ecx
mov dword [ebp - 8], eax
je 0x40b235
mov dword [esi], eax
jmp 0x40b238
lea esi, [ebp - 8]
mov edi, dword [ebp + 0xc]
test edi, edi
jne 0x40b25e
add eax, 0x10
push eax
lea ecx, [ebp + 0xc]
call fcn.0042e06b
mov edi, dword [ebp + 0xc]
and dword [ebp + 0xc], 0
lea ecx, [ebp + 0xc]
call fcn.00428a48
test edi, edi
je 0x40b28e
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 0x40b27d
xor eax, eax
push 6
mov dword [esi], eax
add eax, edi
push 0
push eax
call fcn.00470340
add esp, 0xc
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
jmp 0x40b29d
mov edi, dword [ebp + 0xc]
mov eax, edi
pop edi
leave
ret

Function at 0x40b93c
Capabilities:
Parse pe header

Disassembly:
cmp dword [esp + 8], 0x40
jb 0x40b951
mov eax, dword [esp + 4]
mov dword [ecx + 0xc], eax
cmp word [eax], 0x5a4d
je 0x40b955
xor eax, eax
jmp 0x40b9c0
mov edx, dword [eax + 0x3c]
push esi
lea esi, [edx + 0xf8]
cmp dword [esp + 0xc], esi
jae 0x40b969
xor eax, eax
jmp 0x40b9bf
add eax, edx
mov dword [ecx + 0x10], eax
cmp dword [eax], 0x4550
jne 0x40b965
mov dx, word [eax + 0x16]
test dh, 0x20
je 0x40b965
test dl, 2
je 0x40b965
cmp word [eax + 0x14], 0xe0
jne 0x40b965
mov esi, dword [ecx + 0x10]
add eax, 0xf8
xor edx, edx
mov dword [ecx + 0x14], eax
cmp word [esi + 6], dx
jbe 0x40b9bc
add eax, 0x10
mov esi, dword [eax + 4]
add esi, dword [eax]
cmp esi, dword [esp + 0xc]
ja 0x40b965
mov esi, dword [ecx + 0x10]
movzx esi, word [esi + 6]
inc edx
add eax, 0x28
cmp edx, esi
jl 0x40b9a2
xor eax, eax
inc eax
pop esi
ret 8

Function at 0x40baf1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
xor ebx, ebx
cmp dword [0x49adec], ebx
push esi
je 0x40bb57
cmp byte [ebp + 8], bl
je 0x40bb57
mov eax, dword [0x49aec0]
cmp word [eax], bx
je 0x40bb57
test byte [0x49b194], 2
mov esi, eax
je 0x40bb38
push ebx
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push esi
push dword [0x49adec]
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40bb57
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push ebx
lea ecx, [ebp - 4]
push ecx
shl eax, 1
push eax
push esi
push dword [0x49adec]
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, 0x10000
push esi
mov ecx, 0x49aec0
call fcn.0042e20b
mov eax, dword [0x49aec0]
mov word [eax], bx
mov dword [0x49aec8], esi
pop esi
mov dword [0x49aec4], ebx
pop ebx
leave
ret