joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4a4de0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x458
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [ebp - 0x448], eax
cmp esi, ebx
je 0x4a4f8d
cmp eax, ebx
je 0x4a4f8d
push edi
push 0x3f
lea eax, [ebp - 0x43]
push ebx
push eax
mov byte [ebp - 0x44], bl
call fcn.004e8ba0
push str.WinMasterVI
lea ecx, [ebp - 0x44]
push str..pipe_s
push ecx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x18
push ebx
push ebx
push 3
push ebx
push ebx
push 0xc0000000
lea edx, [ebp - 0x44]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x4a4f74
push ebx
push ebx
lea eax, [ebp - 0x458]
push eax
push edi
mov dword [ebp - 0x458], ebx
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
test eax, eax
je 0x4a4f54
mov edx, dword [ebp + 8]
push ebx
lea ecx, [ebp - 0x454]
push ecx
push edx
push esi
push edi
mov dword [ebp - 0x454], ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0xa
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp esi, ebx
je 0x4a4f5a
mov dword [ebp - 0x450], ebx
lea esp, [esp]
push 0x3ff
lea eax, [ebp - 0x443]
push ebx
push eax
mov byte [ebp - 0x444], bl
call fcn.004e8ba0
add esp, 0xc
push ebx
lea ecx, [ebp - 0x44c]
push ecx
push 0x400
lea edx, [ebp - 0x444]
push edx
push edi
mov dword [ebp - 0x44c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov eax, dword [ebp - 0x44c]
cmp eax, ebx
jbe 0x4a4f25
mov ecx, dword [ebp - 0x450]
add ecx, eax
cmp ecx, 0x2084e8
jae 0x4a4f25
push eax
mov eax, dword [ebp - 0x448]
lea edx, [ebp - 0x444]
push edx
push eax
mov dword [ebp - 0x450], ecx
call fcn.004ebc70
add esp, 0xc
cmp esi, ebx
jne 0x4a4f5a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
je 0x4a4eb0
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x448]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x448]
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4a5510
Capabilities:
Get hostname
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2bc
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x2b8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
cmp eax, 0xffffffff
jne 0x4a5553
mov eax, 1
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
xor eax, eax
push 0xff
push eax
lea ecx, [ebp - 0x127]
push ecx
mov byte [ebp - 0x24], 0
mov dword [ebp - 0x23], eax
mov dword [ebp - 0x1f], eax
mov dword [ebp - 0x1b], eax
mov dword [ebp - 0x17], eax
mov dword [ebp - 0x13], eax
mov dword [ebp - 0xf], eax
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
mov byte [ebp - 0x128], al
call fcn.004e8ba0
add esp, 0xc
push 0x100
lea edx, [ebp - 0x128]
push edx
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x128]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov edi, eax
test edi, edi
je 0x4a565d
mov ecx, dword [edi + 0xc]
cmp dword [ecx], 0
je 0x4a565d
mov ebx, dword [sym.imp.USER32.dll_wsprintfA]
xor esi, esi
lea ecx, [ecx]
cmp esi, 0x80
jge 0x4a565d
mov edx, dword [edi + 0xc]
mov eax, dword [esi + edx]
movzx ecx, byte [eax + 3]
movzx edx, byte [eax + 2]
push ecx
movzx ecx, byte [eax + 1]
push edx
movzx edx, byte [eax]
push ecx
push edx
lea eax, [ebp - 0x24]
push str._d._d._d._d
push eax
call ebx
add esp, 0x18
add esi, 4
mov ecx, str.127.0.0.1
lea eax, [ebp - 0x24]
mov edi, edi
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x4a5630
test dl, dl
je 0x4a562c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x4a5630
add eax, 2
add ecx, 2
test dl, dl
jne 0x4a5610
xor eax, eax
jmp 0x4a5635
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4a565d
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov ecx, dword [edi + 0xc]
cmp dword [esi + ecx], eax
jne 0x4a55d0
call dword [sym.imp.WS2_32.dll_WSACleanup]
lea eax, [ebp - 0x24]
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4a5670
mov ecx, dword [ebp - 4]
sub eax, edx
pop edi
mov eax, 0
sete al
pop esi
xor ecx, ebp
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4a56a0
Capabilities:
Get user security identifier

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push 0
mov ebx, eax
lea eax, [ebp - 4]
push eax
push 0
lea ecx, [ebp - 8]
push ecx
push 0
push ebx
push 0
mov dword [ebp - 8], 0
mov dword [ebp - 4], 0xff
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
mov eax, dword [ebp - 8]
test eax, eax
je 0x4a585c
cmp dword [ebp - 4], 0
je 0x4a585c
push esi
push edi
push eax
call fcn.004e5420
mov edx, dword [ebp - 8]
push edx
mov edi, eax
push 0
push edi
call fcn.004e8ba0
mov eax, dword [ebp - 4]
xor ecx, ecx
add eax, eax
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004e5420
mov esi, eax
mov eax, dword [ebp - 4]
lea ecx, [eax + eax]
push ecx
push 0
push esi
call fcn.004e8ba0
add esp, 0x20
lea edx, [ebp - 0x14]
push edx
lea eax, [ebp - 4]
push eax
push esi
lea ecx, [ebp - 8]
push ecx
push edi
push ebx
push 0
call dword [sym.imp.ADVAPI32.dll_LookupAccountNameW]
cmp eax, 1
jne 0x4a5844
push edi
call dword [sym.imp.ADVAPI32.dll_GetSidIdentifierAuthority]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthorityCount]
movzx eax, byte [eax]
mov edx, dword [ebp + 0xc]
lea ecx, [eax + eax*2]
mov dword [ebp - 0xc], eax
mov eax, dword [edx]
lea ecx, [ecx*4 + 0x1c]
mov dword [ebp - 0x10], ecx
cmp ecx, eax
jae 0x4a5839
mov ebx, dword [ebp + 8]
lea edx, [eax + eax]
push edx
push 0
push ebx
call fcn.004e8ba0
push 1
push 0x51ce90
mov edx, ebx
call fcn.004715b0
mov eax, ebx
add esp, 0x14
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a57a0
movzx ecx, byte [esi + 2]
sub eax, edx
movzx edx, byte [esi + 3]
shl ecx, 8
add ecx, edx
movzx edx, byte [esi + 4]
shl ecx, 8
add ecx, edx
movzx edx, byte [esi + 5]
shl ecx, 8
add ecx, edx
sar eax, 1
push ecx
push 0x51cea0
lea edx, [ebx + eax*2]
call fcn.004715b0
xor esi, esi
add esp, 8
cmp dword [ebp - 0xc], esi
jbe 0x4a5825
jmp 0x4a57eb
mov ebx, dword [ebp + 8]
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a57f0
sub eax, edx
push esi
sar eax, 1
push edi
mov ebx, eax
call dword [sym.imp.ADVAPI32.dll_GetSidSubAuthority]
mov eax, dword [eax]
mov ecx, dword [ebp + 8]
push eax
push str.__lu
lea edx, [ecx + ebx*2]
call fcn.004715b0
inc esi
add esp, 8
cmp esi, dword [ebp - 0xc]
jb 0x4a57e8
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp - 0x10]
pop edi
pop esi
mov dword [eax], edx
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov dword [edx], ecx
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push esi
call fcn.004e577a
push edi
call fcn.004e577a
add esp, 8
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a5d80
Capabilities:
List groups for user account

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
push edi
lea eax, [ebp - 0x10]
push eax
mov eax, dword [ebp + 8]
lea ecx, [ebp - 8]
push ecx
push 0xffffffffffffffff
lea edx, [ebp - 4]
push edx
xor edi, edi
push 1
push edi
push eax
push edi
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.NETAPI32.dll_NetUserGetLocalGroups]
mov ebx, dword [ebp - 4]
test eax, eax
jne 0x4a5e86
cmp ebx, edi
je 0x4a5e91
mov dword [ebp - 0xc], edi
cmp dword [ebp - 8], edi
jbe 0x4a5e5a
nop
test ebx, ebx
je 0x4a5e55
mov eax, dword [ebp + 0xc]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a5de0
sub eax, edx
mov edx, dword [ebx]
sar eax, 1
mov esi, eax
mov eax, edx
lea edi, [eax + 2]
jmp 0x4a5e00
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a5e00
mov ecx, dword [ebp + 0x10]
sub eax, edi
sar eax, 1
add eax, esi
cmp dword [ecx], eax
jbe 0x4a5e55
mov edi, dword [ebp + 0xc]
mov eax, edi
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a5e20
sub eax, esi
push edx
sar eax, 1
lea edx, [edi + eax*2]
push 0x5236a8
push edx
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, dword [ebp - 0xc]
inc eax
add esp, 0xc
add ebx, 4
mov dword [ebp - 0xc], eax
cmp eax, dword [ebp - 8]
jb 0x4a5dd0
mov ebx, dword [ebp - 4]
xor edi, edi
mov eax, dword [ebp + 0x10]
cmp dword [eax], edi
jbe 0x4a5e86
mov edx, dword [ebp + 0xc]
mov eax, edx
lea esi, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, di
jne 0x4a5e70
sub eax, esi
sar eax, 1
xor ecx, ecx
mov word [edx + eax*2 - 2], cx
cmp ebx, edi
je 0x4a5e91
push ebx
call dword [sym.imp.NETAPI32.dll_NetApiBufferFree]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4a8e60
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x43c
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
xor eax, eax
push 0xfe
push eax
lea ecx, [ebp - 0x102]
push ecx
mov word [ebp - 0x104], ax
call fcn.004e8ba0
xor edx, edx
push 0xfe
push edx
lea eax, [ebp - 0x202]
push eax
mov word [ebp - 0x204], dx
call fcn.004e8ba0
push 0x110
lea ecx, [ebp - 0x314]
push 0
push ecx
call fcn.004e8ba0
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersionExW]
add esp, 0x24
lea edx, [ebp - 0x318]
push edx
mov dword [ebp - 0x318], 0x114
call ebx
push 0x11c
lea eax, [ebp - 0x434]
push 0
push eax
call fcn.004e8ba0
add esp, 0xc
lea ecx, [ebp - 0x434]
push ecx
mov dword [ebp - 0x434], 0x11c
call ebx
cmp dword [ebp - 0x430], 6
jb 0x4a8f1e
lea edx, [ebp - 0x204]
lea ecx, [ebp - 0x104]
call fcn.004a6340
jmp 0x4a8f9d
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jae 0x4a8f42
cmp al, 5
jne 0x4a8f42
lea ebx, [ebp - 0x204]
lea ecx, [ebp - 0x104]
call fcn.004a5ea0
jmp 0x4a8f9d
xor eax, eax
jmp 0x4a8f50
movzx ecx, word [eax + str.Windows]
mov word [ebp + eax - 0x104], cx
add eax, 2
test cx, cx
jne 0x4a8f50
lea eax, [ebp - 0x304]
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a8f70
sub eax, edx
sar eax, 1
je 0x4a8f9d
lea edx, [ebp - 0x304]
push edx
lea eax, [ebp - 0x204]
push 0x5252a8
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea ecx, [ebp - 0x104]
push ecx
push str._s_t_t_t_t_t_t_t_t_t_tSystem_t
push edi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, edi
add esp, 0xc
lea edx, [eax + 2]
jmp 0x4a8fc0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4a8fc0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
sub eax, edx
sar eax, 1
mov edx, 1
mov word [edi + eax*2], dx
inc dword [esi]
lea eax, [ebp - 0x438]
push eax
push 0x208
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionUninstall
push reloc.WS2_32.dll_bind
mov dword [ebp - 0x438], 0
call ebx
test eax, eax
jne 0x4a9039
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x438]
push ecx
push edi
push 0x209
mov ecx, esi
call fcn.004a9130
mov edx, dword [ebp - 0x438]
add esp, 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov dword [ebp - 0x438], 0
call fcn.004bc0d0
test eax, eax
je 0x4a9087
lea eax, [ebp - 0x438]
push eax
push 0x108
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionUninstall
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x4a9087
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x438]
push ecx
push edi
push 0x109
mov ecx, esi
call fcn.004a9130
mov edx, dword [ebp - 0x438]
add esp, 0xc
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4a9b70
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x102c
call fcn.004f23a0
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor ebx, ebx
mov esi, ecx
push 0x3fe
lea ecx, [ebp - 0x402]
xor eax, eax
push ebx
xor edi, edi
push ecx
mov dword [ebp - 0x1020], esi
mov dword [ebp - 0x1010], edi
mov dword [ebp - 0x100c], ebx
mov dword [ebp - 0x1008], ebx
mov word [ebp - 0x404], ax
call fcn.004e8ba0
add esp, 0xc
push 0x200
lea edx, [ebp - 0x404]
push edx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
jne 0x4a9dbe
mov eax, dword [ebp + 8]
or eax, 1
mov dword [ebp - 0x1024], eax
mov edi, edi
push 0x7fe
lea ecx, [ebp - 0x1002]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x1004], ax
call fcn.004e8ba0
add esp, 0xc
xor eax, eax
movzx ecx, word [eax + str.SoftwareMicrosoftWindowsCurrentVersionUninstall_]
mov word [ebp + eax - 0x1004], cx
add eax, 2
cmp cx, bx
jne 0x4a9c10
lea eax, [ebp - 0x404]
mov esi, eax
nop
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4a9c30
lea edi, [ebp - 0x1004]
sub eax, esi
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
cmp cx, bx
jne 0x4a9c46
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov eax, dword [ebp - 0x1024]
lea edx, [ebp - 0x100c]
push edx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
push ebx
lea ecx, [ebp - 0x1004]
push ecx
push reloc.WS2_32.dll_bind
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4a9d56
mov esi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, 4
lea edx, [ebp - 0x101c]
push edx
mov edx, dword [ebp - 0x100c]
mov dword [ebp - 0x1018], eax
mov dword [ebp - 0x101c], eax
lea eax, [ebp - 0x1014]
push eax
lea ecx, [ebp - 0x1018]
push ecx
push ebx
push str.SystemComponent
push edx
mov dword [ebp - 0x1014], ebx
call esi
mov edi, 1
test eax, eax
jne 0x4a9cdf
cmp dword [ebp - 0x1014], edi
je 0x4a9d5b
push 0x3fe
lea ecx, [ebp - 0x802]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x804], ax
call fcn.004e8ba0
mov ecx, dword [ebp - 0x100c]
add esp, 0xc
lea edx, [ebp - 0x1028]
push edx
lea eax, [ebp - 0x804]
push eax
push ebx
push ebx
push str.DisplayName
push ecx
mov dword [ebp - 0x1028], 0x200
call esi
lea eax, [ebp - 0x804]
lea edx, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4a9d30
sub eax, edx
sar eax, 1
je 0x4a9d47
add dword [ebp - 0x1010], edi
mov edx, dword [ebp - 0x100c]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4a9d5b
mov edi, 1
add dword [ebp - 0x1008], edi
push 0x3fe
lea ecx, [ebp - 0x402]
xor eax, eax
push ebx
push ecx
mov word [ebp - 0x404], ax
call fcn.004e8ba0
mov eax, dword [ebp - 0x1008]
mov ecx, dword [ebp - 0x1020]
add esp, 0xc
push 0x200
lea edx, [ebp - 0x404]
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x4a9bf0
mov eax, dword [ebp - 0x1010]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4adc50
Capabilities:
Get disk information via ioctl

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x568462], 0
push esi
mov esi, ecx
jne 0x4adc83
push 0x400
push 0x568220
mov byte [0x568462], 1
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
push 0x568220
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0
push 0
push 3
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4add10
xor eax, eax
push eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0
push 0x2d1080
push esi
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4add10
mov eax, dword [ebp - 0x10]
cmp eax, 0x3e8
jae 0x4add10
shl eax, 8
add eax, dword [ebp - 0xc]
push edi
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x568220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e4746
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x568220
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4aef80
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov ebx, dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov dword [ebp - 0x10], eax
xor esi, esi
cmp word [edi + esi*2], 0x35
je case.0x4aefe4.4
mov eax, 1
mov ecx, esi
shl eax, cl
test dword [ebp - 0x10], eax
je case.0x4aefe4.4
lea edx, [esi + 0x41]
mov word [ebp - 0xc], dx
lea eax, [ebp - 0xc]
xor edx, edx
push eax
mov dword [ebp - 0xa], 0x5c003a
mov word [ebp - 6], dx
call ebx
dec eax
cmp eax, 5
ja case.0x4aefe4.4
jmp dword [eax*4 + 0x4af0d0]
mov ecx, 0x39
jmp 0x4af0aa
mov ecx, 0x526228
lea eax, [ebp - 0xc]
lea ecx, [ecx]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4af026
test dx, dx
je 0x4af022
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4af026
add eax, 4
add ecx, 4
test dx, dx
jne 0x4af000
xor eax, eax
jmp 0x4af02b
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4af071
mov ecx, 0x526230
lea eax, [ebp - 0xc]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4af05d
test dx, dx
je 0x4af059
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4af05d
add eax, 4
add ecx, 4
test dx, dx
jne 0x4af037
xor eax, eax
jmp 0x4af062
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
je 0x4af071
mov edx, 0x37
mov word [edi + esi*2], dx
jmp case.0x4aefe4.4
mov eax, 0x31
mov word [edi + esi*2], ax
jmp case.0x4aefe4.4
cmp esi, 1
jle 0x4af088
mov ecx, 0x37
jmp 0x4af0aa
mov edx, 0x31
mov word [edi + esi*2], dx
jmp case.0x4aefe4.4
mov eax, 0x32
mov word [edi + esi*2], ax
jmp case.0x4aefe4.4
cmp word [edi + esi*2], 0x30
jne case.0x4aefe4.4
mov ecx, 0x34
mov word [edi + esi*2], cx
inc esi
cmp esi, 0x1a
jl 0x4aefa3
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4af0f0
Capabilities:
Get storage device properties

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
mov dword [ebp - 0x4c], esi
cmp esi, ebx
je 0x4af209
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4af117
sub eax, edx
sar eax, 1
cmp eax, 0x1a
jb 0x4af209
mov eax, dword [str.._:]
mov ecx, dword [0x52623c]
mov edx, dword [0x526240]
mov dword [ebp - 0x14], eax
mov ax, word [0x526244]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], edx
mov word [ebp - 8], ax
xor edi, edi
jmp 0x4af163
mov esi, dword [ebp - 0x4c]
cmp word [esi + edi*2], 0x34
jne 0x4af1ff
push ebx
push ebx
push 3
push ebx
push 7
push 0xc0000000
lea edx, [ebp - 0x14]
lea ecx, [edi + 0x41]
push edx
mov word [ebp - 0xc], cx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4af1ff
xor eax, eax
push ebx
mov dword [ebp - 0x44], eax
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x50]
push eax
push 0x28
lea ecx, [ebp - 0x48]
push ecx
push 0xc
lea edx, [ebp - 0x20]
push edx
push 0x2d1400
push esi
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x44], 0x28
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x4af1f8
cmp dword [ebp - 0x2c], 7
jne 0x4af1f8
mov ecx, dword [ebp - 0x4c]
mov eax, 0x35
mov word [ecx + edi*2], ax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc edi
cmp edi, 0x1a
jl 0x4af160
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4b4ac0
Capabilities:
Get memory capacity

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
mov eax, dword [0x5552b0]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
lea ecx, [ebp - 0x4c]
push ecx
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], 0x40
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
mov edi, dword [ebp - 0x44]
mov edx, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x3c]
mov eax, dword [ebp - 0x38]
add edi, 0xfffff
adc edx, 0
shrd edi, edx, 0x14
shr edx, 0x14
add ebx, 0xfffff
adc eax, 0
shrd ebx, eax, 0x14
push 0x200
shr eax, 0x14
call fcn.004e5420
push 0x200
mov esi, eax
push 0
push esi
call fcn.004e8ba0
push ebx
push edi
push str._d_t_d_t
push esi
call dword [sym.imp.USER32.dll_wsprintfW]
mov eax, esi
add esp, 0x20
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4b4b45
sub eax, edx
sar eax, 1
mov ecx, 1
mov word [esi + eax*2], cx
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4b4b62
sub eax, edx
sar eax, 1
lea edx, [eax + eax]
cmp edx, 0x100
jae 0x4b4b92
mov edx, dword [ebp - 0x50]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x4b4b83
push esi
call fcn.004e577a
mov ecx, dword [ebp - 8]
add esp, 4
pop edi
pop esi
xor ecx, ebp
mov eax, 1
pop ebx
call fcn.004e4746
mov esp, ebp
pop ebp
ret
Function at 0x4b7820
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileW]
push esi
push edi
push 0
push 0x8000080
push 3
push 0
push 1
mov edi, eax
push 0xc0000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4b7890
push 0
push 0x8000080
push 1
push 0
push 0
push 0xc0000000
push edi
call ebx
mov esi, eax
cmp esi, 0xffffffff
jne 0x4b7872
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 8]
push eax
push 2
lea ecx, [ebp - 4]
mov word [ebp - 4], 0xfeff
mov dword [ebp - 8], 0
push ecx
jmp 0x4b794e
xor ebx, ebx
push ebx
push esi
mov word [ebp - 4], 0xfeff
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
mov dword [ebp - 8], ebx
cmp edi, 2
jb 0x4b792f
push edi
call fcn.004e5420
push edi
mov ebx, eax
push 0
push ebx
call fcn.004e8ba0
add esp, 0x10
push 0
lea edx, [ebp - 8]
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [ebx], 0xff
jne 0x4b78dc
cmp byte [ebx + 1], 0xfe
je 0x4b790a
push 0
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
lea eax, [ebp - 8]
push eax
push 2
lea ecx, [ebp - 4]
push ecx
push esi
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push ebx
call fcn.004e8ba0
push ebx
call fcn.004e577a
add esp, 0x10
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
lea edx, [ebp - 8]
push edx
push 2
lea eax, [ebp - 4]
mov dword [ebp - 8], ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, 1
pop ebx
mov esp, ebp
pop ebp
ret