joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401fdc
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
mov dword [0x4065ac], eax
cmp byte [0x4065a8], 0
jne 0x402014
call fcn.00401760
test al, al
jne 0x402014
mov dword [0x4065ac], 8
mov dword [ebp - 4], 8
jmp 0x402175
xor ecx, ecx
push ebp
push 0x40216e
push dword fs:[ecx]
mov dword fs:[ecx], esp
cmp byte [0x406035], 0
je 0x402035
push 0x4065b0
call sub.KERNEL32.DLL_TerminateProcess
mov esi, ebx
sub esi, 4
mov ebx, dword [esi]
test bl, 2
jne 0x402050
mov dword [0x4065ac], 9
jmp 0x402145
dec dword [0x40659c]
mov eax, ebx
and eax, 0x7ffffffc
sub eax, 4
sub dword [0x4065a0], eax
test bl, 1
je 0x4020b0
mov eax, esi
sub eax, 0xc
mov edx, dword [eax + 8]
cmp edx, 0xc
jl 0x402080
test edx, 0x80000003
je 0x40208f
mov dword [0x4065ac], 0xa
jmp 0x402145
mov eax, esi
sub eax, edx
cmp edx, dword [eax + 8]
je 0x4020a7
mov dword [0x4065ac], 0xa
jmp 0x402145
add ebx, edx
mov esi, eax
call fcn.00401904
and ebx, 0x7ffffffc
mov eax, esi
add eax, ebx
mov edi, eax
cmp edi, dword [0x406604]
jne 0x4020f0
sub dword [0x406604], ebx
add dword [0x406600], ebx
cmp dword [0x406600], 0x3c00
jle 0x4020e1
call fcn.00401bf4
xor eax, eax
mov dword [ebp - 4], eax
call fcn.004029bc
jmp 0x402175
mov edx, dword [eax]
test dl, 2
je 0x402113
and edx, 0x7ffffffc
cmp edx, 4
jge 0x40210e
mov dword [0x4065ac], 0xb
jmp 0x402145
or dword [eax], 1
jmp 0x40213c
mov eax, edi
cmp dword [eax + 4], 0
je 0x402126
cmp dword [eax], 0
je 0x402126
cmp dword [eax + 8], 0xc
jge 0x402132
mov dword [0x4065ac], 0xb
jmp 0x402145
mov edx, dword [eax + 8]
add ebx, edx
call fcn.00401904
mov edx, ebx
mov eax, esi
call fcn.00401b6c
mov eax, dword [0x4065ac]
mov dword [ebp - 4], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402175
cmp byte [0x406035], 0
je 0x40216d
push 0x4065b0
call sub.KERNEL32.DLL_UnmapViewOfFile
ret
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret

Function at 0x402608
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x40500c]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4026a0
push 0x80000002
call sub.advapi32.dll_RegEnumKeyA
test eax, eax
jne 0x402680
xor eax, eax
push ebp
push 0x402679
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4026bc
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegEnumValueA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402680
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCreateKeyExA
ret
mov ax, word [0x40500c]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x40500c], ax
mov esp, ebp
pop ebp
ret
Function at 0x402ce8
Capabilities:
Get common file path

Disassembly:
push ecx
cmp byte [0x406034], 0
je 0x402d49
cmp word [0x406208], 0xd7b2
jne 0x402d11
cmp dword [0x406210], 0
jbe 0x402d11
mov eax, 0x406204
call dword [0x406220]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x40504c
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetCurrentThreadId
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x402d70
push 0xfffffffffffffff5
call sub.KERNEL32.DLL_GetCurrentThreadId
push eax
call sub.KERNEL32.DLL_GetSystemDirectoryA
pop edx
ret
cmp byte [0x405018], 0
jne 0x402d65
push 0
push 0x40506c
push 0x40504c
push 0
call sub.user32.dll_GetKeyboardType
pop edx
ret

Function at 0x402d74
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
push ebp
mov ebx, 0x40661c
mov esi, section.DATA
mov edi, 0x406030
cmp byte [ebx + 0x28], 0
jne 0x402da3
cmp dword [edi], 0
je 0x402da3
mov edx, dword [edi]
mov eax, edx
xor edx, edx
mov dword [edi], edx
mov ebp, eax
call ebp
cmp dword [edi], 0
jne 0x402d92
cmp dword [0x405004], 0
je 0x402dbd
call fcn.00402c5c
call fcn.00402ce8
xor eax, eax
mov dword [0x405004], eax
cmp byte [ebx + 0x28], 2
jne 0x402dcd
cmp dword [esi], 0
jne 0x402dcd
xor eax, eax
mov dword [ebx + 0xc], eax
call fcn.00402b5c
cmp byte [ebx + 0x28], 1
jbe 0x402ddd
cmp dword [esi], 0
je 0x402dfe
mov eax, dword [ebx + 0x10]
test eax, eax
je 0x402dfe
call fcn.004032dc
mov edx, dword [ebx + 0x10]
mov eax, dword [edx + 0x10]
cmp eax, dword [edx + 4]
je 0x402dfe
test eax, eax
je 0x402dfe
push eax
call sub.KERNEL32.DLL_LoadResource
call fcn.00402b34
cmp byte [ebx + 0x28], 1
jne 0x402e0c
call dword [ebx + 0x24]
cmp byte [ebx + 0x28], 0
je 0x402e17
call fcn.00402cb8
cmp dword [ebx], 0
jne 0x402e33
cmp dword [0x406018], 0
je 0x402e2b
call dword [0x406018]
mov eax, dword [esi]
push eax
call sub.KERNEL32.DLL_LoadLibraryA
mov eax, dword [ebx]
push esi
mov esi, eax
mov edi, ebx
mov ecx, 0xb
rep movsd dword es:[edi], dword [esi]
pop esi
jmp 0x402dbd

Function at 0x40416c
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff8
mov edi, edx
mov esi, eax
mov byte [esp], 0
push 0
call fcn.00403614
mov ebx, eax
push 0x40420c
push esi
push ebx
call fcn.004035f4
mov esi, eax
test esi, esi
je 0x4041ff
push esi
push ebx
call fcn.00403634
test eax, eax
je 0x4041ff
push eax
call fcn.0040363c
mov ebp, eax
test ebp, ebp
je 0x4041ff
push esi
push ebx
call sub.KERNEL32.DLL_GetCommandLineA
mov esi, eax
push 0
push edi
call sub.KERNEL32.DLL_UnhandledExceptionFilter
push 0
push 0
push 2
push 0
push 3
push 0x40000000
push edi
call fcn.004035bc
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4041ff
push 0
lea eax, [esp + 8]
push eax
push esi
push ebp
push ebx
call sub.KERNEL32.DLL_VirtualFree
test eax, eax
je 0x4041ff
push ebx
call fcn.004035ac
push 6
push edi
call sub.KERNEL32.DLL_UnhandledExceptionFilter
mov byte [esp], 1
mov al, byte [esp]
pop ecx
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x429237
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
pushal
call 0x429246
pop dword [ebp - 0x3c]
mov eax, 0x429246
sub dword [ebp - 0x3c], eax
mov dword [ebp - 0x4c], 0xb2699fab
sub dword [ebp - 0x4c], 0x64175a60
mov dword [ebp - 0x48], 0xe792e75a
sub dword [ebp - 0x48], 0xb55f9b15
mov dword [ebp - 0x44], 0xe7287c07
sub dword [ebp - 0x44], 0x9adc37d9
mov dword [ebp - 0x40], 0x923c53b
sub dword [ebp - 0x40], 0x923c53b
lea eax, [ebp - 0x4c]
push eax
mov eax, sym.imp.kernel32.dll_GetModuleHandleA
add eax, dword [ebp - 0x3c]
call dword [eax]
mov dword [ebp - 0x4c], 0xa7aa1620
sub dword [ebp - 0x4c], 0x3337acca
mov dword [ebp - 0x48], 0x71eb514e
add dword [ebp - 0x48], 0xcf811027
mov dword [ebp - 0x44], 0x2cd979d7
add dword [ebp - 0x44], 0x3695f295
mov dword [ebp - 0x40], 0xbef328ed
sub dword [ebp - 0x40], 0xbef328ed
lea ebx, [ebp - 0x4c]
push ebx
push eax
mov eax, 0xc34a6e5a
sub eax, 0xc306bbea
add eax, dword [ebp - 0x3c]
call dword [eax]
push 0x40
push 0x1000
push 0x466af
push 0
call eax
mov ecx, 0x8bd976f0
sub ecx, 0x8bd9264b
mov esi, eax
mov edx, 0xa9e1cf4e
sub edx, 0xa99b814e
add edx, dword [ebp - 0x3c]
mov edi, 0x8c63d2d5
add edi, 0x737751ac
sub dword [ebp - 4], eax
mov ebx, dword [edx]
sub dword [ebp - 0x18], ecx
xor ebx, edi
xor dword [ebp - 0x2c], ecx
mov dword [esi], ebx
mov dword [ebp - 4], 0x2bf7cb85
add esi, 0xde257ddf
add esi, 0x21da8225
add edx, 0x46a4ce1e
sub edx, 0x46a4ce1a
loop 0x42935e
add eax, 0x6dad4838
add eax, 0x9253ed2f
mov ebx, eax
add eax, 0x953b655
sub eax, 0x953b650
mov ecx, 0x400000
add ecx, dword [ebp - 0x3c]
call ebx
leave
ret
Function at 0x407668
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x412018]
jne 0x407672
repz ret
jmp fcn.00407bfa

Function at 0x4081a0
Capabilities:
Get disk information

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x438
mov eax, dword [0x412018]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
mov word [ebp - 0x430], ax
push 0x208
push 0
lea ecx, [ebp - 0x42e]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
xor edx, edx
mov word [ebp - 0x218], dx
push 0x208
push 0
lea eax, [ebp - 0x216]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
mov dword [ebp - 0x434], 0
mov dword [ebp - 0x21c], 0
mov dword [ebp - 0x438], 0
push 0x105
lea ecx, [ebp - 0x218]
push ecx
lea edx, [ebp - 0x438]
push edx
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x434]
push ecx
push 0x105
lea edx, [ebp - 0x430]
push edx
push 0x40d928
call dword [sym.imp.KERNEL32.dll_GetVolumeInformationW]
test eax, eax
je 0x408266
push 0xa
push 0x104
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x434]
push ecx
call dword [sym.imp.MSVCR90.dll__itow_s]
add esp, 0x10
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
cmp eax, 0x10
jge 0x408288
push str.thsnYaViMRAeBoda
push 0x104
mov eax, dword [ebp + 8]
push eax
call fcn.004063f0
cmp dword [ebp + 0xc], 0
je 0x4082a0
mov ecx, dword [ebp + 0xc]
push ecx
push 0x104
mov edx, dword [ebp + 8]
push edx
call fcn.004063f0
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00407668
mov esp, ebp
pop ebp
ret

Function at 0x408b20
Capabilities:
Contain obfuscated stackstrings

Disassembly:
lcall 0xc635, 0x9b45c633
inc ebp
pushfd
xor al, 0xc6
inc ebp
popfd
and dh, al
inc ebp
sahf
sub eax, 0x119f45c6
mov byte [ebp - 0x60], 0x33
mov byte [ebp - 0x5f], 0x2e
mov byte [ebp - 0x5e], 0x35
mov byte [ebp - 0x5d], 0x24
mov byte [ebp - 0x5c], 0x22
mov byte [ebp - 0x5b], 0x35
mov byte [ebp - 0x5a], 0x41
call fcn.0040875b
push eax
push esi
push dword [ebp + 8]
call fcn.00408710
mov dword [ebp - 0xbc], eax
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x2c], bl
push eax
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], 0xd4
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], 0x67
mov byte [ebp - 0x27], 0x44
mov byte [ebp - 0x26], 0x4a
mov byte [ebp - 0x25], 0x4f
mov byte [ebp - 0x24], 0x67
mov byte [ebp - 0x23], 0x42
mov byte [ebp - 0x22], 0x49
mov byte [ebp - 0x21], 0x59
mov byte [ebp - 0x20], 0x4a
mov byte [ebp - 0x1f], 0x59
mov byte [ebp - 0x1e], 0x52
mov byte [ebp - 0x1d], 0x6a
mov byte [ebp - 0x1c], 0x2b
call fcn.0040875b
push eax
push esi
push dword [ebp + 8]
call fcn.00408710
add esp, 0x30
mov dword [ebp - 0xb8], eax
call fcn.0040874b
outsb dx, byte [esi]
invalid
Function at 0x4093e0
Capabilities:
Contain obfuscated stackstrings

Disassembly:
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00408710
add esp, 0xc
mov dword [ebp - 0x33c], eax
call fcn.0040874b
sbb ebx, dword [eax + 0x46]
dec esp
push 0x104
lea eax, [ebp - 0x334]
push eax
push dword [ebp + 8]
call dword [ebp - 0x538]
mov dword [ebp - 0x398], eax
mov byte [ebp - 0x544], 1
cmp dword [ebp - 0x398], 0
je 0x40943f
cmp dword [ebp - 0x398], 0
je 0x409609
cmp dword [ebp + 0xc], 1
je 0x409609
cmp dword [ebp + 0xc], 8
jne 0x4095d1
and byte [ebp - 0x6b8], 0
and byte [ebp - 0x6b7], 0
mov byte [ebp - 0x6b6], 0x9b
and byte [ebp - 0x6b5], 0
mov byte [ebp - 0x6b4], 0x33
mov byte [ebp - 0x6b3], 0x16
mov byte [ebp - 0x6b2], 0xd
mov byte [ebp - 0x6b1], 0x10
mov byte [ebp - 0x6b0], 1
mov byte [ebp - 0x6af], 0x34
mov byte [ebp - 0x6ae], 0x16
mov byte [ebp - 0x6ad], 0xb
mov byte [ebp - 0x6ac], 7
mov byte [ebp - 0x6ab], 1
mov byte [ebp - 0x6aa], 0x17
mov byte [ebp - 0x6a9], 0x17
mov byte [ebp - 0x6a8], 0x29
mov byte [ebp - 0x6a7], 1
mov byte [ebp - 0x6a6], 9
mov byte [ebp - 0x6a5], 0xb
mov byte [ebp - 0x6a4], 0x16
mov byte [ebp - 0x6a3], 0x1d
mov byte [ebp - 0x6a2], 0x64
lea eax, [ebp - 0x6b8]
push eax
call fcn.0040875b
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00408710
add esp, 0xc
mov dword [ebp - 0x690], eax
mov byte [ebp - 0x6a0], 0x8b
or byte [ebp - 0x69f], 0xff
mov byte [ebp - 0x69e], 0x55
mov byte [ebp - 0x69d], 0x8b
mov byte [ebp - 0x69c], 0xec
lea eax, [ebp - 0x694]
push eax
push 5
lea eax, [ebp - 0x6a0]
push eax
push dword [ebp - 0x33c]
push 0xffffffffffffffff
call dword [ebp - 0x690]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x6c0], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x6bc], eax
push 0x1000
push 8
push dword [ebp - 0x674]
call dword [ebp - 0x67c]
mov dword [ebp - 0x698], eax
call fcn.0040874b
arpl word [esp + ecx], sp
pop eax
push dword [ebp - 0x698]
lea eax, [ebp - 0x6c0]
push eax
push dword [ebp + 8]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.00408927
add esp, 0x14
call fcn.0040874b
cwde
xchg ecx, eax
retf
call fcn.0040874b
daa
push edi
mov dh, 0x35
and byte [ebp - 0x544], 0
push 0
call dword [ebp - 0x340]
mov dword [ebp + 8], eax
push 0x104
lea eax, [ebp - 0x334]
push eax
push 0
call dword [ebp - 0x538]
call fcn.0040874b
call 0x80fe00ff
movsd dword es:[edi], dword [esi]
sar ch, 1
invalid
and byte [ebp - 0x230], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x22f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x12c], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x12b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x654], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x653]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
and byte [ebp - 0x504], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x503]
Function at 0x409660
Capabilities:
Contain obfuscated stackstrings

Disassembly:
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.00408729
or byte [eax + 0x2ff845c6], ah
mov byte [ebp - 0x24], 0x34
and byte [ebp - 0x36c], 0
and byte [ebp - 0x36b], 0
mov byte [ebp - 0x36a], 0xaa
and byte [ebp - 0x369], 0
mov byte [ebp - 0x368], 0x12
mov byte [ebp - 0x367], 0x30
mov byte [ebp - 0x366], 0x21
mov byte [ebp - 0x365], 6
mov byte [ebp - 0x364], 0x2c
mov byte [ebp - 0x363], 0x26
mov byte [ebp - 0x362], 0x21
mov byte [ebp - 0x361], 0x30
mov byte [ebp - 0x360], 0x38
mov byte [ebp - 0x35f], 0x11
mov byte [ebp - 0x35e], 0x3c
invalid
invalid
invalid

Function at 0x40ac90
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x25c
mov eax, dword [0x412018]
xor eax, ebp
mov dword [ebp - 8], eax
cmp dword [ebp + 8], 0
jne 0x40acb0
xor eax, eax
jmp 0x40ad66
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x40ad64
mov dword [ebp - 0x25c], 0
call fcn.00409bd0
test eax, eax
je 0x40ace0
mov eax, 1
jmp 0x40ad66
mov dword [ebp - 0x258], 0
push 0x24c
push 0
lea ecx, [ebp - 0x254]
push ecx
call sub.MSVCR90.dll_memset
add esp, 0xc
lea edx, [ebp - 0x258]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0xffffffff
je 0x40ad64
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 0xc], 0xffffffff
je 0x40ad3b
mov edx, dword [ebp - 0x238]
cmp edx, dword [ebp + 0xc]
je 0x40ad3b
xor eax, eax
jmp 0x40ad66
push 0
mov eax, dword [ebp + 8]
push eax
call fcn.0040a3e0
add esp, 8
test eax, eax
je 0x40ad64
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40ad5d
mov eax, dword [ebp - 0x238]
jmp 0x40ad66
mov eax, 1
jmp 0x40ad66
xor eax, eax
mov ecx, dword [ebp - 8]
xor ecx, ebp
call fcn.00407668
mov esp, ebp
pop ebp
ret
Function at 0x10001000
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f2b0
push 0x10026222
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 0x10001038
lea esi, [eax + 0x10000]
push 0x1c
push 0
lea eax, [ebp - 0x38]
push eax
call sub.VCRUNTIME140.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
jbe 0x100010b7
cmp dword [ebp - 0x28], 0x1000
jne 0x1000108a
test byte [ebp - 0x23], 1
jne 0x1000108a
and dword [ebp - 4], 0
mov dword [ebp - 0x3c], esi
cmp word [esi], 0x5a4d
jne 0x10001086
mov eax, dword [esi + 0x3c]
add eax, esi
mov dword [ebp - 0x40], eax
cmp dword [eax], 0x4550
je 0x10001095
or dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x38]
lea esi, [eax + ecx]
jmp 0x10001048
or dword [ebp - 4], 0xffffffff
mov eax, esi
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
leave
ret 4
xor eax, eax
jmp 0x1000109b

Function at 0x100010bb
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f2c0
push 0x10026222
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 0x100010f7
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 4], ebx
cmp word [eax], 0x5a4d
je 0x1000110b
push 0xc1
jmp 0x100011ba
mov esi, dword [eax + 0x3c]
add esi, eax
mov dword [ebp - 0x24], esi
cmp dword [esi], 0x4550
je 0x10001125
push 0xbf
jmp 0x100011ba
mov ax, word [esi + 0x14]
cmp ax, bx
jne 0x10001146
xor esi, esi
push 0xc0
call dword [sym.imp.KERNEL32.dll_SetLastError]
or dword [ebp - 4], 0xffffffff
mov eax, esi
jmp 0x100011c6
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 0x1000112e
lea eax, [ebx + ebx*4]
mov ecx, dword [ebp - 0x20]
lea edi, [ecx + eax*8]
push str..detour
push edi
call sub.api_ms_win_crt_string_l1_1_0.dll_strcmp
pop ecx
pop ecx
test eax, eax
jne 0x100011ab
mov eax, dword [edi + 0xc]
test eax, eax
je 0x1000112e
cmp dword [edi + 0x10], 0
je 0x1000112e
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 0x1000112e
cmp dword [esi + 4], 0x727444
jne 0x1000112e
cmp dword [esi + 8], 0
jne 0x100011a7
mov dword [esi + 8], eax
push 0
jmp 0x10001135
inc ebx
jmp 0x10001150
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 0x10001307
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
mov esi, dword [ebp + 8]
mov eax, 0x150
cmp dword [esi], eax
jne 0x100013e6
cmp dword [ebp + 0xc], eax
jb 0x100013e6
and dword [ebp - 4], 0
lea eax, [ebp + 0xc]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push eax
push 0x40
push 0x40
push dword [esi + 4]
call edi
test eax, eax
je 0x100013e0
lea eax, [ebp - 8]
push ebx
push eax
mov ebx, 0xf8
push 0x40
push ebx
push dword [esi + 8]
call edi
test eax, eax
je 0x100013d1
mov eax, dword [esi + 0xc]
test eax, eax
je 0x10001373
lea ecx, [ebp - 0xc]
push ecx
push 0x40
push 4
push eax
call edi
test eax, eax
je 0x100013c4
lea eax, [esi + 0x14]
push 0x40
push eax
push dword [esi + 4]
call sub.VCRUNTIME140.dll_memcpy
lea eax, [esi + 0x54]
push ebx
push eax
push dword [esi + 8]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esi + 0xc]
add esp, 0x18
test eax, eax
je 0x100013aa
lea ecx, [esi + 0x14c]
push 4
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov eax, dword [esi + 0xc]
mov dword [ebp - 4], 1
test eax, eax
je 0x100013c4
lea ecx, [ebp + 8]
push ecx
push dword [ebp + 0xc]
push 4
push eax
call edi
lea eax, [ebp + 8]
push eax
push dword [ebp - 8]
push ebx
push dword [esi + 8]
call edi
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
push 0x40
push dword [esi + 4]
call edi
pop ebx
mov eax, dword [ebp - 4]
pop edi
jmp 0x100013f3
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop esi
leave
ret 8

Function at 0x100014a6
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002f2e0
push 0x10026222
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 0x1000152c
mov eax, dword [ecx + 0x3c]
add eax, ecx
mov dword [ebp - 0x3c], eax
cmp dword [eax], 0x4550
je 0x10001504
xor al, al
or dword [ebp - 4], 0xffffffff
jmp 0x10001532
mov edx, dword [eax + 0xd8]
lea esi, [edx + ecx]
cmp dword [ebp + 0xc], esi
jb 0x100014fc
mov eax, dword [eax + 0xdc]
add eax, edx
add eax, ecx
cmp dword [ebp + 0xc], eax
jae 0x100014fc
mov al, 1
jmp 0x100014fe
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 0x10001591
Capabilities:
Allocate or change rwx memory

Disassembly:
push ecx
push esi
mov esi, dword [0x102b5a74]
test esi, esi
je 0x100015b5
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 0x10001599
pop esi
pop ecx
ret
Function at 0x100015b8
Capabilities:
Resume thread

Disassembly:
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp dword [0x102b5a80], eax
je 0x100015ce
mov eax, 0x10dd
pop ecx
ret
push ebx
push esi
mov esi, dword [0x102b5a90]
xor ebx, ebx
cmp esi, ebx
push edi
je 0x1000161b
lea eax, [esp + 0xc]
push eax
mov eax, dword [esi + 0x10]
push dword [esi + 0x14]
movzx eax, byte [eax + 0x17]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
cmp dword [esi + 4], ebx
jne 0x1000160c
mov eax, dword [esi + 0x10]
cmp eax, ebx
je 0x1000160c
push eax
call fcn.10001682
pop ecx
mov dword [esi + 0x10], ebx
mov edi, dword [esi]
push esi
call fcn.10025c9c
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x100015dd
mov dword [0x102b5a90], ebx
call fcn.1000165b
mov esi, dword [0x102b5a8c]
cmp esi, ebx
je 0x10001648
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
mov edi, dword [esi]
push esi
call fcn.10025c9c
cmp edi, ebx
pop ecx
mov esi, edi
jne 0x10001630
pop edi
mov dword [0x102b5a8c], ebx
mov dword [0x102b5a80], ebx
pop esi
xor eax, eax
pop ebx
pop ecx
ret
Function at 0x10001905
Capabilities:
Suspend thread

Disassembly:
mov eax, dword [0x102b5a84]
push esi
test eax, eax
push edi
jne 0x1000196f
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
mov edi, dword [esp + 0xc]
cmp edi, eax
je 0x1000196d
push 8
call fcn.100252b9
mov esi, eax
pop ecx
test esi, esi
jne 0x10001931
push 8
pop edi
jmp 0x1000194c
push edi
call dword [sym.imp.KERNEL32.dll_SuspendThread]
cmp eax, 0xffffffff
jne 0x1000195d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push esi
mov edi, eax
call fcn.10025c9c
pop ecx
and dword [0x102b5a88], 0
mov dword [0x102b5a84], edi
mov eax, edi
jmp 0x1000196f
mov dword [esi + 4], edi
mov eax, dword [0x102b5a8c]
mov dword [esi], eax
mov dword [0x102b5a8c], esi
xor eax, eax
pop edi
pop esi
ret 4