joyce8/EMBER2024-capa huggingface dataset:
Function at 0x77931f47
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x77931f69
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x77931f69
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x77931f69
ret
cmp word [ebx + 4], 0x14c
jne 0x77931f69
test word [ebx + 0x16], 2
je 0x77931f69
test word [ebx + 0x16], 0x100
je 0x77931f69
cmp word [ebx + 0x18], 0x10b
jne 0x77931f69
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x77931f69
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x77931ff5
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x77931f89
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.77918ed4
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x77931f69
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8

Function at 0x77931ff5
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push ebx
push ecx
lea esp, [esp - 0x10]
mov dword [esp + 0xc], edx
lea esp, [esp + 0xc]
sub esp, 4
mov dword [esp], 0x8b92e34e
mov dword [esp], edi
push esi
mov eax, dword [ebp + 8]
and ax, 0xf001
dec eax
cmp word [eax], 0x5a4d
jne 0x77931f69
mov ebx, dword [eax + 0x3c]
cmp ebx, 0xf08
ja 0x77931f69
add ebx, eax
cmp dword [ebx], 0x4550
jne 0x77931f69
ret
cmp word [ebx + 4], 0x14c
jne 0x77931f69
test word [ebx + 0x16], 2
je 0x77931f69
test word [ebx + 0x16], 0x100
je 0x77931f69
cmp word [ebx + 0x18], 0x10b
jne 0x77931f69
mov edx, dword [ebx + 0x78]
cmp edx, 0
je 0x77931f69
lea edx, [eax + edx]
mov edx, dword [edx + 0xc]
push 0xe1641d81
call 0x77931ff5
adc al, 0xbd
mov dl, 3
cmp byte [ecx + 0x75ac5ffe], 0xa
jnp 0x77931f89
int1
salc
push edi
inc esp
add esp, 8
lea edx, [edx + eax]
mov ebx, eax
push edx
call fcn.77918ed4
xchg ebx, eax
cmp ebx, dword [ebp + 0xc]
jne 0x77931f69
sub esp, 0x3e
mov esi, dword [esp + 0x3e]
add esp, 0x42
pop edi
mov edx, dword [esp]
add esp, 4
pop ecx
pop ebx
leave
ret 8
Function at 0x779320ac
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x77932105
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x779320ac
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x779320bb
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x77d37d5e
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x7793210c
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.77918f82
cmp eax, dword [ebp + 0xc]
pop eax
je 0x779321ab
add edi, 4
add eax, 2
dec ecx
jne 0x779320f1
call 0x77932158
loope 0x7793214e
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x779321a8
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x779321b9
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x7793216c
cmp eax, ecx
ja 0x7793216c
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x779321f6
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x779321ec
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.77919461
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x779320bb
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0
push ecx
xor ecx, ecx
jne 0x77932105
mov ecx, esp
xor dword [ecx - 0x55], edi
pop ecx
call 0x779320ac
dec esp
adc eax, 0x91b81b2a
div bh
int 0x82
xchg ebx, eax
ror cl, 1
into
out dx, eax
call 0x779320bb
cld
test edx, ebx
or ebp, eax
add dword [esi - 0x7cc26b19], esp
les ecx, [eax]
or dword [esp], ebp
mov ebp, esp
sub esp, 0x100
push ebx
push edx
push ecx
push edi
push esi
mov ebx, dword [ebp + 8]
mov edx, ebx
add ebx, dword [ebx + 0x3c]
mov ebx, dword [ebx + 0x78]
lea ebx, [ebx + edx]
mov eax, dword [ebx + 0x24]
add eax, edx
xor edi, edi
jne 0x77d37d5e
or edi, dword [ebx + 0x20]
add edi, edx
mov ecx, dword [ebx + 0x18]
mov esi, dword [edi]
add esi, edx
push 0
push ecx
mov ecx, esp
push 0x55d34c8a
call 0x7793210c
sti
sbb byte [ecx + 0x56], dh
xlatb
les ebp, [ebp + 0x8c483e2]
xchg dword [ecx + 4], eax
xor eax, edx
shl eax, 3
xor ecx, 0
shl eax, 0x1d
add eax, dword [ecx + 4]
pop ecx
push esi
call fcn.77918f82
cmp eax, dword [ebp + 0xc]
pop eax
je 0x779321ab
add edi, 4
add eax, 2
dec ecx
jne 0x779320f1
call 0x77932158
loope 0x7793214e
invalid
sbb esi, ebx
mov edi, 0xdbead58c
js 0x779321a8
mov dh, 0xe8
or byte [eax], al
add byte [eax], al
mov bh, 0x24
lea eax, [edx + 0x53]
nop
mov dword [esi + 0x2308c483], ecx
sal byte [ecx], 0xc0
fsub st(7)
int 0xf
mov bh, 0
movzx eax, word [eax]
jmp 0x779321b9
shl eax, 2
add eax, dword [ebx + 0x1c]
add eax, edx
mov eax, dword [eax]
add eax, edx
mov ebx, edx
add ebx, dword [edx + 0x3c]
mov ecx, dword [ebx + 0x7c]
mov ebx, dword [ebx + 0x78]
add ebx, edx
add ecx, ebx
cmp eax, ebx
jb 0x7793216c
cmp eax, ecx
ja 0x7793216c
mov esi, eax
lea edi, [ebp - 0x100]
mov al, byte [esi]
mov byte [edi], al
inc edi
inc esi
js 0x779321f6
or ecx, ecx
xor dword [esp - 0x6b], eax
cmp al, 0x2e
jne 0x779321ec
lea edi, [ebp - 0x100]
push 0x100
push edi
push esi
call fcn.77919461
lea esp, [esp - 0x60]
mov dword [esp + 0x5c], edi
lea esp, [esp + 0x5c]
Function at 0x4090c0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
pushal
call 0x4090cf
pop dword [ebp - 0x40]
mov eax, 0x6a4dd405
add eax, 0x95f2bcca
sub dword [ebp - 0x40], eax
mov dword [ebp - 0x50], 0x23efe061
add dword [ebp - 0x50], 0x2a6264ea
mov dword [ebp - 0x4c], 0x8487b6f
sub dword [ebp - 0x4c], 0xd6152f2a
mov dword [ebp - 0x48], 0x4d3dbba0
add dword [ebp - 0x48], 0xff0e888e
mov dword [ebp - 0x44], 0xddbad7fb
add dword [ebp - 0x44], 0x22452805
lea eax, [ebp - 0x50]
push eax
mov eax, 0xf8d620a3
sub eax, 0xf894e013
add eax, dword [ebp - 0x40]
call dword [eax]
mov dword [ebp - 0x50], 0x2fddd503
sub dword [ebp - 0x50], 0xbb6b6bad
mov dword [ebp - 0x4c], 0xd9447ee3
sub dword [ebp - 0x4c], 0x97d81d6e
mov dword [ebp - 0x48], 0x4345a5a9
sub dword [ebp - 0x48], 0xdfd6393d
mov dword [ebp - 0x44], 0x5f99e2ad
add dword [ebp - 0x44], 0xa0661d53
lea ebx, [ebp - 0x50]
push ebx
push eax
mov eax, 0x25ad646e
sub eax, 0x256c2432
add eax, dword [ebp - 0x40]
call dword [eax]
push 0x40
push 0x1000
push 0x3dfaf
push 0
call eax
mov ecx, 0x544c
mov edi, eax
mov edx, 0x7080e2b4
sub edx, 0x703f22b4
add edx, dword [ebp - 0x40]
mov esi, 0xcb3bb725
xor dword [ebp - 4], edi
mov ebx, dword [edx]
sub ebx, esi
add dword [ebp - 0x24], edi
mov dword [edi], ebx
sub dword [ebp - 0x14], 0xb3617169
add edi, 4
add edx, 0xb1140256
sub edx, 0xb1140252
loop 0x4091e5
add eax, 0x14403
xor ebx, ebx
add ebx, eax
add eax, 0x1090bbbb
add eax, 0xef6f444a
mov ecx, 0x400000
add ecx, dword [ebp - 0x40]
call ebx
leave
ret

Function at 0x410b90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 4
mov esi, ecx
call main
pop ecx
xor ecx, ecx
mov dword [ebp - 4], eax
test eax, eax
je 0x410bac
mov dword [eax], ecx
jmp 0x410bae
mov eax, ecx
push ecx
push ecx
push esi
push 0x410c20
push ecx
push ecx
mov dword [esi + 0x10], eax
call dword [sym.imp.kernel32.dll_CreateThread]
mov ecx, dword [esi + 0x10]
pop esi
mov dword [ecx], eax
leave
ret
Function at 0x4021f4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x40a6b4], 0
push esi
jne 0x40222b
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x402205
mov dword [ecx*4 + 0x40a6b0], eax
inc ecx
cmp ecx, 0x100
jl 0x402200
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x40225c
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x40a6b0]
xor eax, esi
inc ecx
dec edx
jne 0x40223e
pop edi
not eax
pop esi
ret 0xc
Function at 0x403c2a
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
lea eax, [ebp - 4]
push edi
push eax
xor ebx, ebx
push 0xf003f
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x403c9f
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x403c78
cmp dword [ebp + 0x10], ebx
jne 0x403ca6
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00403c2a
test eax, eax
jne 0x403c8a
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x403c5f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
pop edi
pop esi
pop ebx
leave
ret 0xc
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
jmp 0x403c9f
Function at 0x403e17
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov edi, dword [ebp + 0x14]
test esi, esi
mov dword [ebp - 8], edi
jne 0x403e34
mov dword [ebp - 8], reloc.ADVAPI32.dll_RegEnumKeyA
and dword [ebp - 4], 0
mov ebx, esi
test esi, esi
jne 0x403e43
mov ebx, 0x41a028
mov eax, dword [ebp + 8]
test eax, eax
jl 0x403e5a
mov ecx, dword [0x422028]
push 0
add ecx, eax
push ecx
call fcn.00403fe1
lea eax, [ebp + 0x14]
push 4
push eax
call fcn.00403faf
test eax, eax
je 0x403f9d
test byte [ebp + 0x17], 0x80
je 0x403f3a
push 0x40c468
call fcn.00401000
and dword [ebp + 0x14], 0x7fffffff
jle 0x403fa5
mov edi, 0x416028
mov esi, 0x4000
cmp dword [ebp + 0x14], esi
jge 0x403ea0
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00403faf
test eax, eax
je 0x403f9d
sub dword [ebp + 0x14], esi
mov dword [0x40c468], edi
mov dword [0x40c46c], esi
mov eax, dword [ebp - 8]
push 0x40c468
mov dword [0x40c470], ebx
mov dword [0x40c474], eax
call fcn.00401031
xor ecx, ecx
mov dword [ebp - 0xc], eax
cmp eax, ecx
jl 0x403f32
mov eax, dword [0x40c470]
mov esi, eax
sub esi, ebx
je 0x403f27
cmp dword [ebp + 0x10], ecx
jne 0x403f0d
lea eax, [ebp + 8]
push ecx
push eax
push esi
push ebx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403f36
cmp dword [ebp + 8], esi
jne 0x403f36
add dword [ebp - 4], esi
jmp 0x403f1f
sub dword [ebp - 8], esi
add dword [ebp - 4], esi
cmp dword [ebp - 8], 1
mov ebx, eax
jl 0x403fa5
cmp dword [ebp - 0xc], 1
jne 0x403ebe
jmp 0x403fa5
cmp dword [ebp + 0x14], ecx
jg 0x403e93
jmp 0x403fa5
push 0xfffffffffffffffc
jmp 0x403f9f
push 0xfffffffffffffffe
jmp 0x403f9f
test esi, esi
jne 0x403f86
cmp dword [ebp + 0x14], esi
jle 0x403fa5
mov edi, 0x416028
mov esi, dword [ebp - 8]
cmp dword [ebp + 0x14], esi
jge 0x403f53
mov esi, dword [ebp + 0x14]
push esi
push edi
call fcn.00403faf
test eax, eax
je 0x403f9d
lea eax, [ebp + 0x10]
push 0
push eax
push esi
push edi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403f36
cmp esi, dword [ebp + 0x10]
jne 0x403f36
add dword [ebp - 4], esi
sub dword [ebp + 0x14], esi
cmp dword [ebp + 0x14], 0
jg 0x403f48
jmp 0x403fa5
cmp dword [ebp + 0x14], edi
mov esi, dword [ebp + 0x14]
jl 0x403f90
mov esi, edi
push esi
push dword [ebp + 0x10]
call fcn.00403faf
test eax, eax
jne 0x403fa2
push 0xfffffffffffffffd
pop eax
jmp 0x403fa8
mov dword [ebp - 4], esi
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4064de
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
push esi
push edi
xor esi, esi
xor eax, eax
lea edi, [ebp - 0xc]
mov dword [ebp - 0x10], esi
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x10
stosd dword es:[edi], eax
pop ecx
xor eax, eax
push dword [ebp + 0xc]
lea edi, [ebp - 0x50]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x54], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x406516
test al, 0x10
jne 0x406519
mov dword [ebp + 0xc], esi
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x54]
push eax
push dword [ebp + 0xc]
push esi
push esi
push esi
push esi
push esi
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x406548
cmp dword [ebp - 0xc], esi
je 0x406545
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
pop edi
pop esi
leave
ret 8

Function at 0x40657e
Capabilities:
Get graphical window text

Disassembly:
push dword [esp + 8]
push dword [esp + 0x10]
push 0xd
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_SendMessageA]
ret 0xc

Function at 0x4065df
Capabilities:
Delete directory
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004066f6
test eax, eax
je 0x40662e
cmp dword [ebp + 0xc], 0
push esi
je 0x406628
and dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 3
call sub.KERNEL32.dll_lstrlenA
and byte [eax + esi + 1], 0
and dword [ebp - 0x14], 0
lea eax, [ebp - 0x20]
mov dword [ebp - 0x18], esi
push eax
mov word [ebp - 0x10], 0x414
call dword [sym.imp.SHELL32.dll_SHFileOperationA]
jmp 0x40662e
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
push esi
push 0xffffffffffffffef
call fcn.00405f2c
pop esi
leave
ret 8
Function at 0x4067c4
Capabilities:
Get common file path
Get file size

Disassembly:
sub esp, 0xc
push ebx
push ebp
push esi
push edi
xor ebp, ebp
push str.kernel32.dll
mov dword [esp + 0x14], ebp
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov esi, eax
cmp esi, ebp
je 0x406813
push str.MoveFileExA
push esi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, ebp
je 0x406802
push 5
push dword [esp + 0x28]
push dword [esp + 0x28]
call eax
mov dword [esp + 0x10], eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
cmp dword [esp + 0x10], ebp
jne 0x406942
cmp dword [esp + 0x24], ebp
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov esi, 0x400
mov ebx, 0x424f58
je 0x406833
push esi
push ebx
push dword [esp + 0x2c]
call edi
jmp 0x40683d
mov dword [0x424f58], 0x4c554e
push esi
mov esi, 0x424b58
push esi
push dword [esp + 0x28]
call edi
push esi
push ebx
push str._s_s_r_n
push 0x424758
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov dword [esp + 0x24], eax
push 0x3f0
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.wininit.ini
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push ebp
push 0x8000080
push 4
push ebp
push ebp
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
je 0x406942
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
push ebp
mov eax, dword [esp + 0x28]
lea eax, [ebx + eax + 0xa]
push eax
push ebp
push 4
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, ebp
mov dword [esp + 0x18], eax
je 0x40692a
push ebp
push ebp
push ebp
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebp, eax
test ebp, ebp
je 0x40691e
mov esi, str._Rename__r_n
push 0xffffffffffffffff
push esi
push ebp
call fcn.004069a4
test eax, eax
jne 0x406950
lea eax, [ebx + ebp]
push esi
push eax
call sub.KERNEL32.dll_lstrcpyA
add ebx, 0xa
mov esi, ebx
push dword [esp + 0x24]
add esi, ebp
push 0x424758
push esi
call fcn.00406784
push ebp
add ebx, dword [esp + 0x28]
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [esp + 0x10], 1
push dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ebp, ebp
push ebp
push ebp
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret 8
push 0xffffffffffffffff
add eax, 0xa
push 0x409344
push eax
call fcn.004069a4
mov esi, eax
test esi, esi
je 0x4068f8
mov edi, ebp
sub edi, esi
add edi, ebx
push edi
call fcn.004065d0
push edi
push esi
push eax
mov dword [esp + 0x2c], eax
call fcn.00406784
push edi
mov eax, dword [esp + 0x28]
push dword [esp + 0x24]
add eax, esi
push eax
call fcn.00406784
push dword [esp + 0x20]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
sub esi, ebp
mov edi, dword [esp + 0x14]
jmp 0x4068fa
Function at 0x4069ff
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x14]
xor ebx, ebx
push eax
push 0x20019
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406a5d
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 8]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406a4c
cmp dword [ebp + 8], 1
je 0x406a4e
mov byte [esi], bl
push dword [ebp + 0x14]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10

Function at 0x406b38
Capabilities:
Check if file exists
Get common file path
Get file attributes
Persist via run registry key

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x18]
mov dword [esp + 0x14], esi
mov al, byte [edi]
test al, al
je 0x406c89
mov ebp, 0x400
mov ecx, esi
sub ecx, dword [esp + 0x14]
cmp ecx, ebp
jge 0x406c89
movzx ebx, al
inc edi
cmp ebx, 0xdb
jge 0x406b79
mov byte [esi], bl
inc esi
jmp 0x406c7f
cmp ebx, 0xff
jne 0x406b8c
mov al, byte [edi]
mov byte [esi], al
inc esi
inc edi
jmp 0x406c7f
lea eax, [ebx - 0xdb]
cmp eax, 0x23
ja case.default.0x406ba2
movzx eax, byte [eax + 0x406cb7]
jmp dword [eax*4 + 0x406c97]
push dword [0x42cbe8]
push esi
call fcn.00406a8a
jmp case.default.0x406ba2
lea eax, [ebx - 0xdc]
shl eax, 0xa
add eax, 0x425360
push eax
jmp 0x406c44
and byte [0x4092d1], 0
push esi
push str.ProgramFilesDir
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
push 0x80000002
call fcn.004069ff
cmp byte [esi], 0
jne 0x406c4c
push str.C:Program_Files
jmp 0x406c44
push esi
push dword [ebx*4 + 0x408f28]
call fcn.00406cdb
cmp ebx, 0xfa
jne case.default.0x406ba2
push str.MicrosoftInternet_ExplorerQuick_Launch
push esi
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je case.0x406ba2.251
test al, 0x10
jne case.default.0x406ba2
push 0x42bf80
jmp 0x406c44
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
jmp case.default.0x406ba2
push ebp
push esi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
jmp case.default.0x406ba2
push 0x40c060
push esi
call sub.KERNEL32.dll_lstrcpyA
jmp case.default.0x406ba2
push esi
call dword [sym.imp.USER32.dll_CharNextA]
cmp byte [eax], 0
je 0x406c5e
inc esi
cmp byte [esi], 0
jne 0x406c4c
cmp ebx, 0xf0
jle 0x406c76
cmp ebx, 0xf4
je 0x406c76
cmp byte [esi], 0x5c
jne 0x406c76
and byte [esi], 0
push esi
call dword [sym.imp.USER32.dll_CharNextA]
mov esi, eax
mov al, byte [edi]
test al, al
jne 0x406b57
and byte [esi], 0
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
ret 8
Function at 0x406cdb
Capabilities:
Persist via run registry key

Disassembly:
push ebx
push esi
push dword [esp + 0xc]
push 0x4092f3
call sub.KERNEL32.dll_lstrcpyA
mov bl, byte [0x42b760]
mov esi, dword [esp + 0x10]
test bl, bl
mov byte [0x4092d1], 0x5c
mov eax, str.Common
jne 0x406d09
mov eax, dword [esp + 0xc]
push esi
push eax
xor eax, eax
push str.SoftwareMicrosoftWindowsCurrentVersionExplorerShell_Folders
test bl, bl
setne al
add eax, 0x80000001
push eax
call fcn.004069ff
cmp byte [esi], 0
jne 0x406d3a
test bl, bl
je 0x406d2f
xor bl, bl
jmp 0x406cf5
push 0x42bf80
push esi
call sub.KERNEL32.dll_lstrcpyA
pop esi
pop ebx
ret 8
Function at 0x512872
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
test edi, edi
je 0x512947
mov ebx, dword [esp + 0x20]
test ebx, ebx
je 0x512947
mov eax, dword [edi + 0x3c]
cmp dword [eax + edi + 0x7c], 0
je 0x512947
mov eax, dword [eax + edi + 0x78]
add eax, edi
mov ecx, ebx
mov esi, dword [eax + 0x1c]
sub ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
add esi, edi
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], edx
cmp ecx, edx
ja 0x5128cd
mov eax, dword [esi + ecx*4]
add eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
mov edx, dword [eax + 0x20]
mov ecx, dword [eax + 0x24]
mov ebp, dword [eax + 0x18]
add edx, edi
add ecx, edi
xor esi, esi
mov dword [esp + 0x10], edx
mov dword [esp + 0x1c], ecx
test ebp, ebp
je 0x512947
mov eax, dword [edx + esi*4]
add eax, edi
mov ecx, ebx
lea ecx, [ecx]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x512912
test dl, dl
je 0x51290e
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x512912
add ecx, 2
add eax, 2
test dl, dl
jne 0x5128f2
xor eax, eax
jmp 0x512917
sbb eax, eax
or eax, 1
test eax, eax
jne 0x512929
mov eax, dword [esp + 0x1c]
movzx eax, word [eax + esi*2]
cmp eax, dword [esp + 0x20]
jbe 0x512934
inc esi
cmp esi, ebp
jae 0x512947
mov edx, dword [esp + 0x10]
jmp 0x5128e8
mov ecx, dword [esp + 0x14]
mov eax, dword [ecx + eax*4]
add eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 8
ret 8

Function at 0x512bab
Capabilities:
Parse pe header

Disassembly:
mov ecx, dword [esp + 4]
test ecx, ecx
jne 0x512bb6
xor eax, eax
ret
push esi
mov esi, dword [esp + 0xc]
cmp esi, 0x40
jb 0x512bca
mov eax, 0x5a4d
cmp word [ecx], ax
je 0x512bce
xor eax, eax
pop esi
ret
push edi
mov edi, dword [ecx + 0x3c]
lea eax, [edi + 0xf8]
cmp esi, eax
jb 0x512c07
cmp dword [edi + ecx], 0x4550
jne 0x512c07
mov eax, 0x14c
cmp word [edi + ecx + 4], ax
jne 0x512c07
test byte [edi + ecx + 0x16], 2
je 0x512c07
movzx eax, word [edi + ecx + 0x14]
mov edx, 0xe0
cmp ax, dx
jae 0x512c0c
pop edi
xor eax, eax
pop esi
ret
push ebx
add eax, 0xffffff20
movzx ebx, ax
add ebx, edi
movzx edi, word [edi + ecx + 6]
add ebx, ecx
xor edx, edx
test edi, edi
jle 0x512c48
xor eax, eax
jmp 0x512c2b
lea eax, [eax + eax*4]
mov ecx, dword [ebx + eax*8 + 0x10c]
add ecx, dword [ebx + eax*8 + 0x108]
cmp ecx, esi
ja 0x512c51
inc edx
movzx eax, dx
cmp eax, edi
jl 0x512c2b
pop ebx
pop edi
mov eax, 1
pop esi
ret
pop ebx
pop edi
xor eax, eax
pop esi
ret