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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, ecx
push esi
push edi
mov dword [ebp - 0x10], eax
cmp dword [eax + 4], 0xffffffff
je 0x4044e6
cmp dword [ebp + 8], 0
je 0x4044e6
cmp dword [ebp + 0x10], 0
ja 0x404471
cmp dword [ebp + 0xc], 1
jb 0x4044e6
xorps xmm0, xmm0
movlpd qword [ebp - 0xc], xmm0
mov edi, dword [ebp - 8]
mov esi, dword [ebp - 0xc]
and dword [ebp - 8], 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
sub ecx, esi
sbb eax, edi
test eax, eax
jb 0x4044a4
ja 0x40449b
cmp ecx, 0xfffffff
jbe 0x4044a4
mov eax, 0xfffffff
mov ecx, esi
jmp 0x4044ab
mov eax, dword [ebp + 0xc]
mov ecx, esi
sub eax, ecx
push 0
lea edx, [ebp - 8]
push edx
push eax
mov eax, dword [ebp + 8]
add eax, ecx
push eax
mov eax, dword [ebp - 0x10]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4044e0
cmp dword [ebp - 8], 0
je 0x4044e0
add esi, dword [ebp - 8]
adc edi, 0
cmp edi, dword [ebp + 0x10]
jb 0x40447f
ja 0x4044e0
cmp esi, dword [ebp + 0xc]
jb 0x40447f
mov eax, esi
mov edx, edi
jmp 0x4044ea
xor eax, eax
xor edx, edx
pop edi
pop esi
leave
ret 0xc

Function at 0x40461b
Capabilities:
Encode data using base64

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
xor esi, esi
mov ebp, ecx
and dword [esp + 0x10], esi
mov ebx, edx
push edi
xor edi, edi
test ebp, ebp
je 0x40474b
mov edx, dword [esp + 0x20]
test edx, edx
je 0x40474b
mov eax, dword [esp + 0x24]
cmp eax, 9
jb 0x40474b
mov byte [edx], 0
test ebx, ebx
je 0x404742
add eax, 0xfffffff8
mov dword [esp + 0x18], eax
cmp esi, eax
jae 0x404742
mov ch, byte [edi + ebp]
inc edi
cmp edi, ebx
jb 0x404683
xor al, al
mov dword [esp + 0x14], 2
xor cl, cl
mov byte [esp + 0x11], cl
jmp 0x4046a1
mov al, byte [edi + ebp]
inc edi
mov byte [esp + 0x11], al
mov cl, al
cmp edi, ebx
jae 0x404697
mov al, byte [edi + ebp]
inc edi
jmp 0x4046a1
xor al, al
mov dword [esp + 0x14], 1
mov byte [esp + 0x12], al
and cl, 0xf
shr al, 6
shl cl, 2
or cl, al
movzx eax, ch
shr eax, 2
and ch, 3
shl ch, 4
mov byte [esp + 0x13], cl
movzx ecx, ch
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
movzx eax, byte [esp + 0x11]
shr eax, 4
or ecx, eax
mov al, byte [ecx + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx + 1], al
add esi, 2
mov eax, dword [esp + 0x14]
sub eax, 0
je 0x404713
sub eax, 1
je 0x4046fe
sub eax, 1
jne 0x404736
mov word [esi + edx], 0x3d3d
jmp 0x404733
movzx eax, byte [esp + 0x13]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
mov byte [esi + edx + 1], 0x3d
jmp 0x404733
movzx eax, byte [esp + 0x13]
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx], al
movzx eax, byte [esp + 0x12]
and eax, 0x3f
mov al, byte [eax + str.ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_]
mov byte [esi + edx + 1], al
add esi, 2
mov eax, dword [esp + 0x18]
cmp edi, ebx
jb 0x404661
mov byte [esi + edx], 0
lea eax, [esi + 1]
jmp 0x40474d
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
Function at 0x405602
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x18
push ebx
mov ebx, ecx
push ebp
push esi
push edi
cmp dword [ebx + 8], 0xffffffff
je 0x405776
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x405776
mov ebp, dword [esp + 0x34]
xor ecx, ecx
test ebp, ebp
je 0x40562e
mov dword [ebp], ecx
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], ecx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x40573b
mov ecx, ebx
call fcn.00405cc1
test eax, eax
jne 0x40568e
mov ecx, ebx
call fcn.00405d3c
test al, al
jne 0x405782
push 1
jmp 0x405735
xor eax, eax
push eax
push eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x40]
push eax
push 1
lea eax, [esp + 0x34]
push eax
push dword [ebx + 8]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x405712
cmp dword [esp + 0x34], 1
jne 0x405712
mov esi, dword [ebx + 0x448]
xor ecx, ecx
mov edi, dword [ebx + 0x44c]
mov dword [esp + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov eax, dword [esp + 0x24]
adc edx, edi
mov dword [ebx + 0x454], edx
mov cl, byte [eax]
cmp cl, 0xd
je 0x40573b
cmp cl, 0xa
je 0x405799
mov ecx, dword [esp + 0x30]
cmp ecx, 1
jbe 0x40573b
add eax, dword [esp + 0x34]
sub ecx, dword [esp + 0x34]
mov dword [esp + 0x24], eax
mov dword [esp + 0x30], ecx
jmp 0x40573b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esp + 0x18], eax
cmp eax, 0x2733
jne 0x405748
mov eax, dword [esp + 0x14]
inc eax
mov dword [esp + 0x14], eax
cmp eax, 0x7d0
je 0x405748
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [ebx + 0x435], 0
je 0x40566d
push str.raw___read_string_failed
lea ecx, [ebx + 0x228]
mov edx, 0xff
call fcn.00403d58
test ebp, ebp
je 0x405768
mov eax, dword [esp + 0x18]
mov dword [ebp], eax
mov eax, dword [esp + 0x2c]
mov ecx, ebx
mov byte [eax], 0
call fcn.00403963
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0xc
push str.raw___read_string_timeout
lea ecx, [ebx + 0x228]
mov edx, 0xff
call fcn.00403d58
jmp 0x405776
mov byte [eax], 0
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov al, 1
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x405778
Function at 0x405b69
Capabilities:
Send data
Send data on socket

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
mov esi, dword [esp + 0x28]
mov ebx, ecx
push edi
xor edi, edi
test esi, esi
je 0x405b7e
mov dword [esi], edi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x405cb5
cmp dword [ebx + 8], 0xffffffff
je 0x405cb5
mov ebp, dword [esp + 0x28]
mov dword [esp + 0x24], edi
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], eax
test ebp, ebp
je 0x405c60
cmp byte [ebx + 0x435], 0
jne 0x405c86
mov esi, dword [ebx + 0x448]
mov dword [esp + 0x28], edi
mov edi, dword [ebx + 0x44c]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov esi, 0x200000
mov dword [ebx + 0x450], eax
mov eax, ebp
adc edx, edi
cmp ebp, esi
mov dword [ebx + 0x454], edx
cmova eax, esi
xor edi, edi
push edi
push edi
push edi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x34]
push eax
push 1
lea eax, [esp + 0x2c]
push eax
push dword [ebx + 8]
call dword [sym.imp.WS2_32.dll_WSASend]
test eax, eax
je 0x405c42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, eax
mov dword [esp + 0x24], edi
cmp edi, 0x2733
jne 0x405c5c
mov esi, dword [esp + 0x14]
inc esi
mov dword [esp + 0x14], esi
cmp esi, 0x7d0
je 0x405c58
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
xor edi, edi
jmp 0x405c50
mov eax, dword [esp + 0x28]
sub ebp, eax
add dword [esp + 0x1c], eax
mov dword [esp + 0x14], edi
test ebp, ebp
jne 0x405bb0
mov edi, dword [esp + 0x24]
test ebp, ebp
jne 0x405c8a
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov al, 1
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x405cb7
mov edi, dword [esp + 0x24]
push ebp
push str.raw___send_failed___zu_bytes_needed
lea eax, [ebx + 0x228]
push 0xff
push eax
call fcn.00403ae6
mov esi, dword [esp + 0x3c]
add esp, 0x10
test esi, esi
je 0x405cae
mov dword [esi], edi
mov ecx, ebx
call fcn.00403963
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc

Function at 0x405cc1
Capabilities:
Get socket status
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x110
push esi
push edi
mov esi, ecx
xor edi, edi
inc edi
mov dword [ebp - 4], edi
cmp dword [esi + 8], 0xffffffff
je 0x405d35
lea ecx, [ebp - 4]
push ecx
push 0x4004667f
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
je 0x405cfb
mov ecx, esi
call fcn.00403963
mov eax, edi
jmp 0x405d38
mov eax, dword [ebp - 4]
test eax, eax
jne 0x405d38
mov eax, dword [esi + 8]
xor ecx, ecx
mov dword [ebp - 0x10c], eax
lea eax, [ebp - 0xc]
push eax
push ecx
push ecx
lea eax, [ebp - 0x110]
mov dword [ebp - 0x110], edi
push eax
push ecx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], 0x3e8
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x405cf7
mov eax, dword [ebp - 4]
pop edi
pop esi
leave
ret
Function at 0x405d72
Capabilities:
Receive data
Receive data on socket

Disassembly:
sub esp, 0x14
xor edx, edx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
mov ebx, ecx
test edi, edi
je 0x405d87
mov dword [edi], edx
mov eax, dword [esp + 0x30]
mov dword [eax], edx
mov eax, dword [esp + 0x28]
test eax, eax
je 0x405eeb
cmp dword [ebx + 8], 0xffffffff
je 0x405eeb
push dword [esp + 0x38]
mov dword [esp + 0x18], edx
mov ebp, edx
mov dword [esp + 0x2c], edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x20], eax
call fcn.00406645
mov esi, dword [esp + 0x2c]
jmp 0x405ea8
cmp byte [ebx + 0x435], 0
jne 0x405f1c
mov ecx, ebx
call fcn.00405cc1
mov ecx, eax
test ecx, ecx
jne 0x405df7
mov ecx, ebx
call fcn.00405d3c
test al, al
jne 0x405ed6
push 1
jmp 0x405ea2
mov edx, 0x400000
mov eax, esi
cmp esi, edx
cmova eax, edx
cmp eax, ecx
cmova eax, ecx
mov dword [esp + 0x18], eax
xor eax, eax
push eax
push eax
mov dword [esp + 0x3c], eax
lea eax, [esp + 0x1c]
push eax
lea eax, [esp + 0x40]
push eax
push 1
lea eax, [esp + 0x2c]
push eax
push dword [ebx + 8]
call dword [sym.imp.WS2_32.dll_WSARecv]
test eax, eax
jne 0x405e80
cmp dword [esp + 0x34], eax
je 0x405e80
push dword [esp + 0x38]
xor ecx, ecx
mov dword [esp + 0x2c], ecx
mov ecx, ebx
call fcn.00406645
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
sub esi, eax
add dword [esp + 0x1c], eax
add dword [ecx], eax
cmp byte [esp + 0x3c], 0
je 0x405ea8
mov ecx, dword [ebx + 0x428]
test ecx, ecx
je 0x405ea8
push eax
push dword [ebx + 0x430]
push dword [ebx + 0x42c]
push ecx
call dword [sym.imp.USER32.dll_PostMessageA]
jmp 0x405ea8
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebp, eax
cmp ebp, 0x2733
jne 0x405ef7
mov eax, dword [esp + 0x28]
inc eax
mov dword [esp + 0x28], eax
cmp eax, 0x7d0
je 0x405f18
push 5
call dword [sym.imp.KERNEL32.dll_Sleep]
test esi, esi
jne 0x405dc7
mov esi, dword [ebx + 0x448]
mov edi, dword [ebx + 0x44c]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
add eax, esi
mov dword [ebx + 0x450], eax
mov al, 1
adc edx, edi
mov dword [ebx + 0x454], edx
jmp 0x405eed
push str.raw___read_timeout
lea ecx, [ebx + 0x228]
mov edx, 0xff
call fcn.00403d58
xor al, al
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x18
mov eax, dword [ebx + 8]
push dword [esp + 0x18]
lea eax, [ebx + 0x228]
push ebp
push str.raw___receive_failed___u_error___u_bytes_requested
push 0xff
push eax
call fcn.00403ae6
add esp, 0x14
test esi, esi
je 0x405eb0
push esi
push ebp
push str.raw___read_failed___u_error___zu_bytes_needed
lea eax, [ebx + 0x228]
push 0xff
push eax
call fcn.00403ae6
add esp, 0x14
test edi, edi
je 0x405f3d
mov dword [edi], ebp
mov ecx, ebx
call fcn.00403963
jmp 0x405eeb
Function at 0x406450
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x118
xor eax, eax
push ebx
push ebp
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x228]
mov word [edi], ax
cmp byte [esi + 0x435], al
je 0x406476
xor al, al
jmp 0x406638
call fcn.00403963
mov ebp, dword [esp + 0x12c]
xor ebx, ebx
push 1
push ebx
push ebx
movzx eax, word [ebp]
push 6
push 1
push eax
call dword [sym.imp.WS2_32.dll_WSASocketW]
mov dword [esi + 8], eax
cmp eax, 0xffffffff
jne 0x4064b2
push str.socket_create_failed
mov edx, 0xff
mov ecx, edi
call fcn.00403d58
jmp 0x40646f
lea eax, [esi + 0x440]
cmp dword [eax], ebx
mov ebx, dword [sym.imp.WS2_32.dll_setsockopt]
jbe 0x4064d4
push 4
push eax
push 0x1005
push 0xffff
push dword [esi + 8]
call ebx
lea eax, [esi + 0x444]
cmp dword [eax], 0
jbe 0x4064f1
push 4
push eax
push 0x1006
push 0xffff
push dword [esi + 8]
call ebx
push 4
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 1
push eax
push 8
push 0xffff
push dword [esi + 8]
call ebx
mov eax, dword [esi]
xor ebx, ebx
inc ebx
mov ecx, esi
push ebx
call dword [eax + 0x1c]
lea eax, [esp + 0x10]
mov dword [esp + 0x10], ebx
mov ebx, dword [sym.imp.WS2_32.dll_ioctlsocket]
push eax
push 0x8004667e
push dword [esi + 8]
call ebx
call fcn.0040637e
mov dword [esi + 0x470], eax
xor eax, eax
push eax
push eax
push eax
push eax
push 0x10
pop eax
push 0x1c
pop ecx
mov dword [esi + 0x474], edx
cmp word [ebp], 0x17
cmove eax, ecx
push eax
push ebp
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_WSAConnect]
cmp eax, 0xffffffff
jne 0x406603
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
jne 0x4065bd
mov ecx, dword [esi + 8]
xor edx, edx
mov eax, dword [esp + 0x130]
mov dword [esp + 0x24], ecx
mov ecx, 0x3e8
div ecx
mov dword [esp + 0x20], 1
mov dword [esp + 0x18], eax
imul eax, edx, 0x3e8
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x18]
push eax
push 0
lea eax, [esp + 0x28]
push eax
push 0
push 0
call dword [sym.imp.WS2_32.dll_select]
test eax, eax
jg 0x406603
mov ecx, esi
call fcn.00403963
and dword [esi + 0x470], 0
mov edx, 0xff
and dword [esi + 0x474], 0
mov ecx, edi
push str.connect_failed
call fcn.00403d58
lea eax, [esi + 0x28]
push eax
push str._s_direct_connect_failed
push str.Socket
push 0x55bd40
call fcn.0044aa7a
add esp, 0x10
jmp 0x40646f
push dword [esi + 0x474]
push dword [esi + 0x470]
call fcn.004063a5
and dword [esp + 0x18], 0
pop ecx
pop ecx
lea ecx, [esp + 0x10]
mov dword [esi + 0x470], eax
push ecx
push 0x8004667e
push dword [esi + 8]
mov dword [esi + 0x474], edx
call ebx
mov al, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x118
ret 0xc
Function at 0x406cf7
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x444c
call fcn.0041c880
push ebx
push ebp
push esi
push edi
lea ecx, [esp + 0x240]
mov esi, edx
call fcn.0040338e
push 8
pop ecx
xor eax, eax
lea edi, [esp + 0x20]
push 0x4000
rep stosd dword es:[edi], eax
xor ebx, ebx
lea eax, [esp + 0x45c]
push ebx
push eax
call fcn.0041d750
mov eax, dword [esi + 4]
add esp, 0xc
mov dword [esp + 0x10], ebx
mov dword [esi + 8], ebx
test eax, eax
je 0x406d49
xor ecx, ecx
mov word [eax], cx
push 0x43
lea eax, [esp + 0x244]
push 0x50d270
push eax
call fcn.00403732
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebp, dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov edi, eax
cmp edi, 0xffffffff
je 0x406daf
push ebx
lea eax, [esp + 0x14]
push eax
push 0x20
lea eax, [esp + 0x2c]
push eax
push ebx
push ebx
push 0x560000
push edi
call ebp
push edi
test eax, eax
jne 0x406da9
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406f16
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [esp + 0x28]
lea eax, [esp + 0x244]
push str..PHYSICALDRIVE_u
push eax
call fcn.00403732
add esp, 0xc
push ebx
push ebx
push 3
push ebx
push 3
push ebx
push dword [esp + 0x25c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x406efe
push ebx
lea eax, [esp + 0x14]
mov dword [esp + 0x20], ebx
push eax
push 0x4000
lea eax, [esp + 0x464]
mov dword [esp + 0x20], ebx
push eax
push 0xc
lea eax, [esp + 0x28]
mov dword [esp + 0x2c], ebx
push eax
push 0x2d1400
push edi
call ebp
test eax, eax
je 0x406ef7
cmp dword [esp + 0x10], 0x28
jb 0x406ef7
mov ebp, 0x100
lea eax, [esp + 0x140]
push ebp
push ebx
push eax
call fcn.0041d750
push ebp
lea eax, [esp + 0x50]
push ebx
push eax
call fcn.0041d750
mov eax, dword [esp + 0x47c]
add esp, 0x18
test eax, eax
je 0x406e77
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x148]
push ebp
push eax
call fcn.00429fd3
add esp, 0x10
mov eax, dword [esp + 0x468]
test eax, eax
je 0x406e9f
lea ecx, [esp + 0x458]
push 0xff
add eax, ecx
push eax
lea eax, [esp + 0x48]
push ebp
push eax
call fcn.00429fd3
add esp, 0x10
mov ebp, 0x50d16c
cmp byte [esp + 0x140], bl
je 0x406ee2
cmp byte [esp + 0x40], bl
je 0x406ed0
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x144]
push eax
push str._S__S
push esi
call fcn.00403732
add esp, 0x10
jmp 0x406ef7
lea eax, [esp + 0x140]
push eax
push ebp
push esi
call fcn.00403732
add esp, 0xc
cmp byte [esp + 0x40], bl
je 0x406ef7
lea eax, [esp + 0x40]
push eax
push ebp
push esi
call fcn.00403732
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
inc eax
cmp dword [esi + 8], eax
jb 0x406f12
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x406f12
cmp word [ecx], bx
jne 0x406f14
mov al, bl
mov bl, al
pop edi
pop esi
pop ebp
mov al, bl
pop ebx
add esp, 0x444c
ret
Function at 0x40719f
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x238
push ebx
push esi
push edi
push str.Windows
mov edi, edx
mov esi, ecx
call fcn.004031f2
push 0x118
lea eax, [ebp - 0x120]
push 0
push eax
call fcn.0041d750
add esp, 0xc
mov dword [ebp - 0x124], 0x11c
lea eax, [ebp - 0x124]
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
jne 0x4071f1
xor al, al
jmp 0x4073f0
mov ecx, dword [ebp - 0x11c]
mov edx, dword [ebp - 0x120]
test edi, edi
je 0x407208
imul eax, edx, 0x64
add eax, ecx
mov dword [edi], eax
mov edi, dword [ebp + 8]
test edi, edi
je 0x407217
mov eax, dword [ebp - 0x118]
mov dword [edi], eax
xor ebx, ebx
inc ebx
cmp edx, 6
jne 0x407267
sub ecx, 0
je 0x40725b
sub ecx, ebx
je 0x40724f
sub ecx, ebx
je 0x407243
sub ecx, ebx
jne 0x4072d3
mov eax, str.Windows_8.1
mov ecx, str.Windows_Server_2012_R2
jmp 0x4072c5
mov eax, str.Windows_8
mov ecx, str.Windows_Server_2012
jmp 0x4072c5
mov eax, str.Windows_7
mov ecx, str.Windows_Server_2008_R2
jmp 0x4072c5
mov eax, str.Windows_Vista
mov ecx, str.Windows_Server_2008
jmp 0x4072c5
cmp edx, 0xa
jne 0x4072b6
cmp byte [ebp - 0xa], bl
jne 0x40728a
cmp dword [ebp - 0x118], 0x55f0
mov eax, 0x50d020
mov ecx, str.Windows_11
cmovae eax, ecx
jmp 0x4072cb
cmp dword [ebp - 0x118], 0x4f7c
jb 0x40729d
mov eax, str.Windows_Server_2022
jmp 0x4072cb
cmp dword [ebp - 0x118], 0x3839
mov eax, str.Windows_Server_2019
mov ecx, str.Windows_Server_2016
cmovbe eax, ecx
jmp 0x4072cb
cmp edx, 0xb
jne 0x4072d3
mov eax, str.Windows_11
mov ecx, str.Windows_Server_2022
cmp byte [ebp - 0xa], bl
cmovne eax, ecx
push eax
mov ecx, esi
call fcn.004031f2
and dword [ebp - 0x22c], 0
lea eax, [ebp - 0x224]
mov dword [ebp - 0x230], eax
xor eax, eax
cmp word [ebp - 0x110], ax
mov word [ebp - 0x224], ax
movzx eax, word [ebp - 0x118]
mov dword [ebp - 0x228], 0x80
mov dword [ebp - 0x234], 0x50d0c8
push eax
jne 0x40732a
lea eax, [ebp - 0x234]
push 0x50d0cc
push eax
call fcn.00403732
add esp, 0xc
jmp 0x407345
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x234]
push str.__s_build__d
push eax
call fcn.00403732
add esp, 0x10
mov edx, dword [esi + 4]
test edx, edx
je 0x40738c
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x40738c
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x40738c
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041d1d0
mov eax, dword [ebp - 0x22c]
add esp, 0xc
add dword [esi + 8], eax
xor edx, edx
mov ecx, dword [esi + 8]
mov eax, dword [esi + 4]
mov word [eax + ecx*2], dx
lea ecx, [ebp - 0x234]
call fcn.00407164
test al, al
je 0x4073ee
push str._on
mov ecx, esi
call fcn.004035e9
mov edx, dword [esi + 4]
test edx, edx
je 0x4073ee
mov ecx, dword [ebp - 0x22c]
test ecx, ecx
je 0x4073ee
mov edi, dword [esi + 8]
lea eax, [edi + ecx]
cmp eax, dword [esi + 0xc]
jae 0x4073ee
lea eax, [ecx + ecx]
push eax
push dword [ebp - 0x230]
lea eax, [edx + edi*2]
push eax
call fcn.0041d1d0
mov ecx, dword [ebp - 0x22c]
add esp, 0xc
add dword [esi + 8], ecx
mov edx, dword [esi + 8]
mov ecx, dword [esi + 4]
xor esi, esi
mov word [ecx + edx*2], si
mov al, bl
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4077b3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
push esi
mov esi, ecx
lea ecx, [esp + 8]
call fcn.0040338e
push dword [esp + 0x14]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x4077e1
xor al, al
jmp 0x40780b
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x4077ff
push dword [esp + 0x14]
push ecx
call fcn.0042a771
pop ecx
pop ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
jmp 0x407804
and dword [esp + 0x10], 0
mov edx, esi
call fcn.004073f5
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x407a11
Capabilities:
Get storage device properties

Disassembly:
mov eax, 0x4014
call fcn.0041c880
push ebx
push ebp
push esi
push edi
mov edi, edx
xor ebp, ebp
mov eax, dword [edi + 4]
mov dword [edi + 8], ebp
test eax, eax
je 0x407a32
xor edx, edx
mov word [eax], dx
push ebp
push ebp
push 3
push ebp
push 3
push ebp
push dword [ecx + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x407ab6
mov ebx, 0x4000
mov dword [esp + 0x10], ebp
push ebx
lea eax, [esp + 0x24]
mov dword [esp + 0x20], ebp
push ebp
push eax
call fcn.0041d750
add esp, 0xc
mov dword [esp + 0x14], ebp
lea eax, [esp + 0x10]
mov dword [esp + 0x18], ebp
push ebp
push eax
push ebx
lea eax, [esp + 0x2c]
push eax
push 0xc
lea eax, [esp + 0x28]
push eax
push 0x2d1400
push esi
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
test eax, eax
je 0x407aaf
mov eax, dword [esp + 0x10]
cmp eax, 0x28
jb 0x407aaf
lea edx, [esp + 0x20]
lea ecx, [esp + 0x20]
add edx, eax
add ecx, dword [esp + 0x38]
push edi
call fcn.00407be2
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x4014
ret

Function at 0x40822f
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x21c
push esi
mov esi, ecx
lea ecx, [esp + 8]
call fcn.0040338e
push dword [esp + 0x14]
push dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jne 0x40825d
xor al, al
jmp 0x408287
mov ecx, dword [esp + 0xc]
test ecx, ecx
je 0x40827b
push dword [esp + 0x14]
push ecx
call fcn.0042a771
pop ecx
pop ecx
mov ecx, dword [esp + 0xc]
mov dword [esp + 0x10], eax
jmp 0x408280
and dword [esp + 0x10], 0
mov edx, esi
call fcn.00407e71
pop esi
mov esp, ebp
pop ebp
ret