joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40632f
Capabilities:
Log keystrokes

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
push ebp
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
je 0x4063bf
push ebp
call dword [sym.imp.USER32.dll_IsIconic]
test eax, eax
je 0x406358
push 9
push ebp
call dword [sym.imp.USER32.dll_ShowWindow]
jmp 0x4063bf
and dword [esp + 0x14], 0
mov ebx, dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
call dword [sym.imp.USER32.dll_GetForegroundWindow]
test eax, eax
jne 0x406376
push ebp
call dword [sym.imp.USER32.dll_SetForegroundWindow]
jmp 0x4063ab
cmp eax, ebp
je 0x4063b8
push 0
push eax
call ebx
push 0
push ebp
mov esi, eax
call ebx
mov edi, eax
cmp esi, edi
je 0x406396
push 1
push esi
push edi
call dword [sym.imp.USER32.dll_AttachThreadInput]
push ebp
call dword [sym.imp.USER32.dll_SetForegroundWindow]
cmp esi, edi
je 0x4063ab
push 0
push esi
push edi
call dword [sym.imp.USER32.dll_AttachThreadInput]
inc dword [esp + 0x14]
cmp dword [esp + 0x14], 3
jl 0x406363
jmp 0x4063bf
push ebp
call dword [sym.imp.USER32.dll_BringWindowToTop]
pop edi
pop esi
pop ebp
pop ebx
ret 4

Function at 0x40811b
Capabilities:
Create process on windows
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x208
push esi
lea eax, [ebp - 0x208]
push edi
xor esi, esi
push eax
push esi
push esi
push 0x26
mov edi, ecx
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x408144
xor eax, eax
jmp 0x40817b
lea eax, [ebp - 0x208]
push str.Internet_Exploreriexplore.exe
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 5
push esi
lea eax, [ebp - 0x208]
push str.http:__www.3366.com_ADTAGsosotb
push eax
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, edi
call fcn.00408683
push 1
pop eax
pop edi
pop esi
leave
ret 0x10

Function at 0x4081be
Capabilities:
Create process on windows
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa08
push ebx
push esi
mov ebx, ecx
push edi
xor esi, esi
mov ecx, 0x1ff
xor eax, eax
lea edi, [ebp - 0xa06]
mov word [ebp - 0xa08], si
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xa08]
push eax
push 0x400
push 0x1084
push dword [ebx + 4]
call dword [sym.imp.USER32.dll_SendMessageW]
lea eax, [ebp - 0x208]
push eax
push esi
push esi
push 0x26
push esi
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x40824c
lea eax, [ebp - 0x208]
push str.Internet_Exploreriexplore.exe
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
push 5
lea eax, [ebp - 0xa08]
push esi
push eax
lea eax, [ebp - 0x208]
push eax
push str.open
push esi
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov ecx, ebx
call fcn.00408683
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 0x10
Function at 0x4084ee
Capabilities:
Check if file exists
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x820
and word [ebp - 0x208], 0
push esi
mov esi, ecx
push edi
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x206]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x354]
test ecx, ecx
stosw word es:[edi], ax
je 0x40852f
mov eax, dword [ecx]
lea edx, [ebp - 0x208]
push 0x104
push edx
call dword [eax + 4]
lea eax, [esi + 0x36c]
push eax
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
and word [ebp - 0x820], 0
mov ecx, 0x103
xor eax, eax
lea edi, [ebp - 0x81e]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0x208]
push eax
push str.__select____s_
lea eax, [ebp - 0x820]
push 0x208
push eax
call dword [sym.imp.MSVCRT.dll__snwprintf]
add esp, 0x10
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4085ac
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.MSVCRT.dll_wcslen]
test eax, eax
pop ecx
je 0x4085ac
push 0xa
push 0
lea eax, [ebp - 0x820]
jmp 0x4085ea
and word [ebp - 0x410], 0
mov ecx, 0x81
xor eax, eax
lea edi, [ebp - 0x40e]
rep stosd dword es:[edi], eax
mov ecx, dword [esi + 0x354]
test ecx, ecx
stosw word es:[edi], ax
je 0x4085e0
mov eax, dword [ecx]
lea edx, [ebp - 0x410]
push 0x104
push edx
call dword [eax + 4]
push 0xa
push 0
lea eax, [ebp - 0x410]
push eax
push 0x435710
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
pop edi
pop esi
leave
ret

Function at 0x409977
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42cc90
push 0x414e3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
and dword [ebp - 4], 0
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x4099fd
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
je 0x4099d5
xor al, al
or dword [ebp - 4], 0xffffffff
jmp 0x409a03
mov edx, dword [eax + 0xd8]
lea esi, [edx + ecx]
cmp dword [ebp + 0xc], esi
jb 0x4099cd
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x4099cd
mov al, 1
jmp 0x4099cf
or dword [ebp - 4], 0xffffffff
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x409a80
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push esi
mov esi, dword [0x438b84]
test esi, esi
je 0x409aa4
lea eax, [esp + 4]
push eax
push 0x40
push 0x10000
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov esi, dword [esi + 4]
jmp 0x409a88
pop esi
pop ecx
ret
Function at 0x409aa7
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x438b94], eax
je 0x409abd
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x438ba4]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x409b0a
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x36]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x409afb
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x409afb
push eax
call fcn.00409b89
pop ecx
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x409acc
mov dword [0x438ba4], ebx
call fcn.00409b4a
mov esi, dword [0x438ba0]
cmp esi, ebx
je 0x409b37
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x409b1f
pop edi
mov dword [0x438ba0], ebx
mov dword [0x438b94], ebx
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x409e52
Capabilities:
Hook routines via microsoft detours

Disassembly:
mov eax, dword [esp + 4]
push esi
push edi
cmp dword [eax], 0x52727464
jne 0x409e8e
lea esi, [eax + 0x10000]
xor edi, edi
lea ecx, [eax + 0x88]
mov edx, dword [ecx]
test edx, edx
je 0x409e7c
cmp edx, eax
jb 0x409e8e
cmp edx, esi
jae 0x409e8e
inc edi
add ecx, 0x48
cmp edi, 0x38d
jb 0x409e6e
push 1
pop eax
pop edi
pop esi
ret
xor eax, eax
jmp 0x409e8b
Function at 0x40a23f
Capabilities:
Hook routines via microsoft detours

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
cmp esi, 0x7ff80000
jbe 0x40a25c
lea eax, [esi - 0x7ff80000]
mov dword [ebp + 8], eax
jmp 0x40a263
mov dword [ebp + 8], 0x10000
cmp esi, 0x80000000
jae 0x40a276
lea eax, [esi + 0x7ff80000]
mov dword [ebp - 4], eax
jmp 0x40a27d
mov dword [ebp - 4], 0xfff80000
mov eax, dword [0x438b88]
mov ecx, dword [0x438b84]
test eax, eax
jne 0x40a297
test ecx, ecx
je 0x40a2ac
mov eax, ecx
mov dword [0x438b88], eax
mov edx, dword [eax + 8]
test edx, edx
je 0x40a2ac
cmp edx, dword [ebp + 8]
jb 0x40a2ac
cmp edx, dword [ebp - 4]
jbe 0x40a3a3
mov eax, ecx
test ecx, ecx
mov dword [0x438b88], eax
je 0x40a2dc
test eax, eax
je 0x40a2d0
mov ecx, dword [eax + 8]
test ecx, ecx
je 0x40a2d0
cmp ecx, dword [ebp + 8]
jb 0x40a2d0
cmp ecx, dword [ebp - 4]
jbe 0x40a3a3
mov eax, dword [eax + 4]
test eax, eax
mov dword [0x438b88], eax
jne 0x40a2bb
mov eax, esi
mov ebx, 0x40000000
and eax, 0xffff
sub esi, eax
cmp esi, ebx
jbe 0x40a312
lea edi, [esi - 0x40000000]
push esi
push edi
call fcn.0040a3d1
pop ecx
test eax, eax
pop ecx
jne 0x40a354
push edi
push dword [ebp + 8]
call fcn.0040a47a
pop ecx
test eax, eax
pop ecx
jne 0x40a354
cmp esi, ebx
jae 0x40a336
lea edi, [esi + 0x40000000]
push edi
push esi
call fcn.0040a47a
pop ecx
test eax, eax
pop ecx
jne 0x40a354
push dword [ebp - 4]
push edi
call fcn.0040a3d1
pop ecx
test eax, eax
pop ecx
jne 0x40a354
push esi
push dword [ebp + 8]
call fcn.0040a47a
pop ecx
test eax, eax
pop ecx
jne 0x40a354
push dword [ebp - 4]
push esi
call fcn.0040a3d1
pop ecx
test eax, eax
pop ecx
je 0x40a3ca
mov dword [0x438b88], eax
mov dword [eax], 0x52727464
mov eax, dword [0x438b88]
xor ecx, ecx
mov dword [eax + 8], ecx
mov eax, dword [0x438b88]
mov edx, dword [0x438b84]
mov dword [eax + 4], edx
mov eax, dword [0x438b88]
mov dword [0x438b84], eax
add eax, 0xffa8
mov edx, 0x38b
mov dword [eax + 0x40], ecx
mov ecx, eax
sub eax, 0x48
dec edx
jne 0x40a38b
mov eax, dword [0x438b88]
mov dword [eax + 8], ecx
mov eax, dword [0x438b88]
mov esi, dword [eax + 8]
cmp esi, dword [ebp + 8]
jb 0x40a3ca
cmp esi, dword [ebp - 4]
ja 0x40a3ca
mov ecx, dword [esi + 0x40]
push 0x48
push 0xcc
push esi
mov dword [eax + 8], ecx
call sub.MSVCRT.dll_memset
add esp, 0xc
mov eax, esi
jmp 0x40a3cc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x40a3d1
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push esi
push edi
push dword [ebp + 8]
call fcn.0040a462
mov edi, eax
pop ecx
cmp edi, dword [ebp + 0xc]
jae 0x40a45c
mov esi, 0x10000
cmp edi, 0x50000000
jb 0x40a405
cmp edi, 0x80000000
ja 0x40a405
mov edi, 0x80010000
jmp 0x40a457
push 0x1c
lea eax, [ebp - 0x1c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a45c
cmp dword [ebp - 0xc], esi
mov eax, dword [ebp - 0x10]
jne 0x40a449
cmp eax, esi
jb 0x40a449
push 0x40
push 0x3000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x40a45e
add edi, esi
jmp 0x40a457
mov ecx, dword [ebp - 0x1c]
add ecx, eax
push ecx
call fcn.0040a462
pop ecx
mov edi, eax
cmp edi, dword [ebp + 0xc]
jb 0x40a3ee
xor eax, eax
pop edi
pop esi
leave
ret

Function at 0x40a47a
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push esi
add eax, 0xffff0000
push edi
push eax
call fcn.0040a512
mov edi, eax
pop ecx
cmp edi, dword [ebp + 8]
jbe 0x40a50c
mov esi, 0x10000
cmp edi, 0x50000000
jb 0x40a4b4
cmp edi, 0x80000000
ja 0x40a4b4
mov edi, 0x4fff0000
jmp 0x40a507
push 0x1c
lea eax, [ebp - 0x1c]
push 0
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
lea eax, [ebp - 0x1c]
push 0x1c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40a50c
cmp dword [ebp - 0xc], esi
jne 0x40a4f6
cmp dword [ebp - 0x10], esi
jb 0x40a4f6
push 0x40
push 0x3000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
test eax, eax
jne 0x40a50e
sub edi, esi
jmp 0x40a507
mov eax, dword [ebp - 0x18]
add eax, 0xffff0000
push eax
call fcn.0040a512
pop ecx
mov edi, eax
cmp edi, dword [ebp + 8]
ja 0x40a49d
xor eax, eax
pop edi
pop esi
leave
ret
Function at 0x40aad1
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
xor edi, edi
cmp dword [0x438bd0], edi
jne 0x40ac75
mov eax, dword [0x438bcc]
cmp eax, edi
jne 0x40ac77
push 0x24
mov ebx, 0x438ba8
push edi
push ebx
call sub.MSVCRT.dll_memset
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push edi
push edi
push str.dbghelp.dll
mov dword [0x438ba8], eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
cmp eax, edi
mov dword [0x438bac], eax
je 0x40ac36
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.ImagehlpApiVersionEx
push eax
call esi
push str.SymInitialize
mov dword [0x438bb0], eax
push dword [0x438bac]
call esi
push str.SymSetOptions
mov dword [0x438bb4], eax
push dword [0x438bac]
call esi
push str.SymGetOptions
mov dword [0x438bb8], eax
push dword [0x438bac]
call esi
push str.SymLoadModule64
mov dword [0x438bbc], eax
push dword [0x438bac]
call esi
push str.SymGetModuleInfo64
mov dword [0x438bc0], eax
push dword [0x438bac]
call esi
push 0x435860
mov dword [0x438bc4], eax
push dword [0x438bac]
call esi
mov dword [0x438bc8], eax
push 8
lea eax, [ebp - 8]
push edi
push eax
call sub.MSVCRT.dll_memset
mov eax, dword [0x438bb0]
add esp, 0xc
cmp eax, edi
mov word [ebp - 8], 9
pop esi
je 0x40ac31
cmp dword [0x438bb4], edi
je 0x40ac31
cmp dword [0x438bc0], edi
je 0x40ac31
cmp dword [0x438bc4], edi
je 0x40ac31
cmp dword [0x438bc8], edi
je 0x40ac31
lea ecx, [ebp - 8]
push ecx
call eax
cmp word [ebp - 8], 9
jb 0x40ac31
push edi
push edi
push dword [0x438ba8]
call dword [0x438bb4]
test eax, eax
je 0x40ac31
mov eax, dword [0x438bbc]
cmp eax, edi
je 0x40ac27
cmp dword [0x438bb8], edi
je 0x40ac27
call eax
and al, 0xfc
or ax, 0x2704
push eax
call dword [0x438bb8]
mov dword [0x438bcc], ebx
mov eax, ebx
jmp 0x40ac77
mov eax, dword [0x438bac]
cmp eax, edi
mov dword [0x438bd0], 1
je 0x40ac4b
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x438bb0], edi
mov dword [0x438bb4], edi
mov dword [0x438bb8], edi
mov dword [0x438bbc], edi
mov dword [0x438bc0], edi
mov dword [0x438bc4], edi
mov dword [0x438bc8], edi
xor eax, eax
pop edi
pop ebx
leave
ret
Function at 0x40ae8e
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ddc0
push 0x414e3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x30
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
test eax, eax
mov esi, 0x10000
je 0x40aec6
lea esi, [eax + 0x10000]
push 0x1c
push 0
lea eax, [ebp - 0x38]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0x1c
lea eax, [ebp - 0x38]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
ja 0x40aefa
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
cmp dword [ebp - 0x28], 0x1000
jne 0x40af4a
cmp byte [ebp - 0x24], 1
je 0x40af4a
test byte [ebp - 0x23], 1
jne 0x40af4a
and dword [ebp - 4], 0
mov dword [ebp - 0x3c], esi
cmp word [esi], 0x5a4d
jne 0x40af46
mov eax, dword [esi + 0x3c]
cmp eax, dword [ebp - 0x2c]
ja 0x40af46
cmp eax, 0x40
jb 0x40af46
add eax, esi
mov dword [ebp - 0x40], eax
cmp dword [eax], 0x4550
jne 0x40af46
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x40aee9
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x2c]
lea esi, [ecx + eax]
jmp 0x40aed6

Function at 0x40b0d6
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ddf0
push 0x414e3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2c
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
push 0x1c
xor esi, esi
push esi
lea eax, [ebp - 0x34]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov dword [ebp - 4], esi
push 0x1c
lea eax, [ebp - 0x34]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
jbe 0x40b17a
cmp dword [ebp - 0x24], 0x1000
jne 0x40b17a
cmp byte [ebp - 0x20], 1
je 0x40b17a
test byte [ebp - 0x1f], 1
jne 0x40b17a
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
cmp word [ecx], 0x5a4d
jne 0x40b17a
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
jne 0x40b188
cmp word [eax + 0x14], si
jne 0x40b16e
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
or dword [ebp - 4], 0xffffffff
jmp 0x40b199
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, dword [ebp - 0x38]
jmp 0x40b168
push 0xc1
jmp 0x40b18d
push 0xbf
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40b594
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42de30
push 0x414e3a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov eax, dword [ebp + 8]
mov dword [ebp - 0x1c], eax
xor ebx, ebx
cmp eax, ebx
jne 0x40b5d0
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
cmp word [eax], 0x5a4d
je 0x40b5e4
push 0xc1
jmp 0x40b693
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [ebp - 0x24], esi
cmp dword [esi], 0x4550
je 0x40b5fe
push 0xbf
jmp 0x40b693
mov ax, word [esi + 0x14]
cmp ax, bx
jne 0x40b61f
xor esi, esi
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x40b69f
movzx eax, ax
lea eax, [eax + esi + 0x18]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ebx
movzx eax, word [esi + 6]
cmp ebx, eax
jae 0x40b607
lea eax, [ebx + ebx*4]
mov ecx, dword [ebp - 0x20]
lea edi, [ecx + eax*8]
push str..detour
push edi
call sub.MSVCRT.dll_strcmp
pop ecx
pop ecx
test eax, eax
jne 0x40b684
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40b607
cmp dword [edi + 0x10], 0
je 0x40b607
mov ecx, dword [ebp - 0x1c]
lea esi, [eax + ecx]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x30], esi
mov eax, dword [esi]
cmp eax, 0x40
jb 0x40b607
cmp dword [esi + 4], 0x727444
jne 0x40b607
cmp dword [esi + 8], 0
jne 0x40b680
mov dword [esi + 8], eax
push 0
jmp 0x40b60e
inc ebx
jmp 0x40b629
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40b811
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
mov eax, 0x678
cmp dword [esi], eax
jne 0x40b8f1
cmp dword [ebp + 0xc], eax
jb 0x40b8f1
push ebx
lea eax, [ebp - 8]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
or dword [ebp - 8], 0xffffffff
or dword [ebp + 0xc], 0xffffffff
or dword [ebp + 8], 0xffffffff
push eax
push 0x40
xor ebx, ebx
push dword [esi + 4]
push dword [esi + 0x10]
call edi
test eax, eax
je 0x40b8eb
lea eax, [ebp + 0xc]
push eax
push 0x40
push dword [esi + 8]
push dword [esi + 0x14]
call edi
test eax, eax
je 0x40b8dc
push dword [esi + 4]
lea eax, [esi + 0x1c]
push eax
push dword [esi + 0x10]
call sub.MSVCRT.dll_memcpy
push dword [esi + 8]
lea eax, [esi + 0x5c]
push eax
push dword [esi + 0x14]
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 0x18]
add esp, 0x18
test eax, eax
je 0x40b8ca
lea ecx, [ebp + 8]
push ecx
push 0x40
push dword [esi + 0xc]
push eax
call edi
test eax, eax
je 0x40b8cd
push dword [esi + 0xc]
lea eax, [esi + 0x664]
push eax
push dword [esi + 0x18]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp - 4]
push eax
push dword [ebp + 8]
push dword [esi + 0xc]
push dword [esi + 0x18]
call edi
push 1
pop ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [esi + 8]
push dword [esi + 0x14]
call edi
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [esi + 4]
push dword [esi + 0x10]
call edi
mov eax, ebx
pop edi
pop ebx
jmp 0x40b8fe
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 8

Function at 0x40be5e
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
push esi
xor esi, esi
cmp eax, esi
jne 0x40be72
xor eax, eax
jmp 0x40bf25
mov dword [eax], esi
push ebx
movzx eax, word [ebp + 0xc]
push edi
push 0x435a04
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
cmp edi, esi
je 0x40bf21
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp ebx, esi
je 0x40bf21
cmp eax, esi
je 0x40bf21
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
cmp eax, esi
mov dword [ebp + 8], eax
je 0x40bf21
push ebx
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
cmp edi, esi
je 0x40bf21
push edi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
cmp eax, esi
je 0x40bf1a
push ebx
push dword [ebp + 8]
push eax
call sub.MSVCRT.dll_memcpy
add esp, 0xc
lea eax, [ebp + 8]
mov dword [ebp + 8], esi
push eax
push esi
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
cmp dword [ebp + 8], esi
je 0x40bf13
push esi
push dword [ebp + 8]
call fcn.0040cfa8
pop ecx
pop ecx
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
xor eax, eax
pop ebx
pop esi
pop ebp
ret
Function at 0x40c3c8
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
cmp dword [0x439800], 0
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetVersion]
push esi
push edi
jne 0x40c410
call ebx
test eax, 0x80000000
je 0x40c406
push str.___.___
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push str.Unicows.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x439804], eax
mov dword [0x439800], 1
mov eax, dword [0x439804]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40c42c
push dword [ebp + 0x10]
push eax
call esi
test eax, eax
mov dword [ebp - 4], eax
jne 0x40c45d
mov edi, dword [ebp + 0xc]
mov eax, dword [edi]
test eax, eax
jne 0x40c454
call ebx
test eax, 0x80000000
mov eax, dword [ebp + 8]
je 0x40c448
push dword [eax + 8]
call dword [eax]
jmp 0x40c44e
push dword [eax + 0xc]
call dword [eax + 4]
test eax, eax
je 0x40c45d
mov dword [edi], eax
push dword [ebp + 0x10]
push eax
call esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x40d4e1
Capabilities:
Check os version

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
lea eax, [ebp - 0x114]
mov dword [ebp - 0x114], 0x114
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
cmp dword [ebp - 0x104], 2
jne 0x40d518
cmp dword [ebp - 0x110], 6
jb 0x40d518
push 1
pop eax
leave
ret
xor eax, eax
leave
ret

Function at 0x40f5fc
Capabilities:
Parse pe header

Disassembly:
mov edx, dword [esp + 4]
mov eax, dword [esp + 8]
push edi
cmp eax, 0x400
lea edi, [edx + eax]
jbe 0x40f662
cmp word [edx], 0x5a4d
jne 0x40f662
mov eax, dword [edx + 0x3c]
lea ecx, [edi - 2]
add eax, edx
cmp eax, ecx
jae 0x40f662
cmp eax, edx
jbe 0x40f662
cmp word [eax], 0x4550
jne 0x40f662
lea ecx, [eax + 0x200]
cmp ecx, edi
jae 0x40f662
cmp ecx, edx
jbe 0x40f662
and dword [eax + 0x58], 0
and dword [eax + 0x9c], 0
lea ecx, [eax + 0x98]
push esi
add edi, 0xffffffa0
mov esi, dword [ecx]
and dword [ecx], 0
lea eax, [esi + edx - 0x60]
pop esi
cmp eax, edi
jae 0x40f662
cmp eax, edx
ja 0x40f664
xor eax, eax
pop edi
ret