joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47cef0
Capabilities:
Get socket status

Disassembly:
sub esp, 0x10c
mov eax, dword [ecx]
lea ecx, [esp]
push ecx
push 0
lea edx, [esp + 0x10]
push 0
push edx
push 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], 1
call sub.WS2_32.dll_select
cmp eax, 0xffffffff
jne 0x47cf39
xor eax, eax
add esp, 0x10c
ret 4
mov edx, dword [esp + 0x110]
xor ecx, ecx
test eax, eax
setne cl
mov dword [edx], ecx
mov eax, 1
add esp, 0x10c
ret 4

Function at 0x47d3b0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a7370
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.0047cf60
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.0047cfe0
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.0047cfe0
lea ecx, [esi + 0xc]
call fcn.00497a26
lea ecx, [esi + 0x10]
call fcn.00497a26
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0047e570
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0047e570
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0047e570
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.00497a9b
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00497a9b
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x47e760
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0xa0
push ebx
push ebp
mov ebp, dword [esp + 0xac]
push esi
push edi
push ebp
call sub.RASAPI32.dll_RasHangUpA
mov esi, dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, 0x28
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov dword [esp + 0x10], 0xa0
call esi
mov edi, eax
call esi
sub eax, edi
cmp eax, 0xbb8
jae 0x47e7c6
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [esp + 0x10]
push eax
push ebp
call sub.RASAPI32.dll_RasGetConnectStatusA
cmp eax, 6
je 0x47e7c6
push 0
call ebx
call esi
sub eax, edi
cmp eax, 0xbb8
jb 0x47e7a7
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xa0
ret

Function at 0x499e69
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x499ea1
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00497ef6
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00497ece
jmp 0x499ead
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x49b55a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x49b59c
call fcn.004a1318
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x49b59c
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x49b593
xor eax, eax
jmp 0x49b5a4
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0049b5aa
pop edi
pop esi
pop ebx
ret 4

Function at 0x4a1848
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4a1876
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4a1894
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004a17ae
jmp 0x4a1894
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a1894
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004a17ae
test edi, edi
mov eax, edi
jne 0x4a187e
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x437492
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x50
push ebp
lea eax, [esp + 0x28]
push edi
push eax
call fcn.00437642
mov ecx, dword [esp + 0x5c]
xor edx, edx
xor ebp, ebp
mov dword [esp + 0xc], 1
mov edi, dword [ecx]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 4
mov dx, word [edi + 0x14]
cmp word [edi + 6], bp
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x20], 0x80
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0x40
lea eax, [edx + edi + 0x18]
jbe 0x437590
push ebx
push esi
lea ebx, [eax + 0x24]
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x437533
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x1c]
push 0x4000
push eax
push ecx
call dword [esp + 0x4c]
jmp 0x437576
lea edx, [edx + ecx*2]
test eax, 0x4000000
lea ecx, [esi + edx*2]
mov esi, dword [esp + ecx*4 + 0x14]
je 0x43754a
or esi, 0x200
mov edx, dword [ebx - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x437565
test al, 0x40
je 0x43755c
mov ecx, dword [edi + 0x20]
jmp 0x437563
test al, 0x80
je 0x437576
mov ecx, dword [edi + 0x24]
test ecx, ecx
jbe 0x437576
mov ecx, dword [ebx - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [esp + 0x44]
mov edx, dword [esp + 0x64]
xor eax, eax
inc ebp
add ebx, 0x28
mov edi, dword [edx]
mov ax, word [edi + 6]
cmp ebp, eax
jl 0x437502
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x50
ret
Function at 0x401c5d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x4093e4], 0
push esi
jne 0x401c94
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 0x401c6e
mov dword [ecx*4 + 0x4093e0], eax
inc ecx
cmp ecx, 0x100
jl 0x401c69
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x401cc5
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 + 0x4093e0]
xor eax, esi
inc ecx
dec edx
jne 0x401ca7
pop edi
not eax
pop esi
ret 0xc
Function at 0x403439
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 8
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x4034ab
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x403484
cmp dword [ebp + 0x10], ebx
jne 0x4034b2
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00403439
test eax, eax
jne 0x403496
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x40346b
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 0x4034ab
Function at 0x4038b6
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor edi, edi
cmp eax, edi
jl 0x4038e3
mov ecx, dword [0x424398]
push edi
add eax, ecx
push edi
push eax
mov dword [0x4174fc], eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.004039e1
cmp eax, edi
jl 0x4039da
lea eax, [ebp - 4]
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
push eax
lea eax, [ebp + 8]
push esi
push eax
push dword [0x409018]
call ebx
test eax, eax
je 0x4039d7
cmp dword [ebp - 4], esi
jne 0x4039d7
push dword [ebp + 8]
add dword [0x4174fc], esi
call fcn.004039e1
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x4039da
cmp dword [ebp + 0x10], edi
jne 0x4039a6
cmp dword [ebp + 8], edi
jle 0x4039d2
mov esi, 0x4134b8
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x403956
mov edi, dword [ebp + 8]
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push dword [0x409018]
call ebx
test eax, eax
je 0x4039d7
cmp edi, dword [ebp - 4]
jne 0x4039d7
lea eax, [ebp + 0x14]
push 0
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4039a2
cmp dword [ebp + 0x14], edi
jne 0x4039a2
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x4174fc], eax
cmp dword [ebp + 8], 0
jg 0x403949
jmp 0x4039d2
push 0xfffffffffffffffe
jmp 0x4039d9
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x4039b1
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push edi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409018]
call ebx
test eax, eax
je 0x4039d7
mov eax, dword [ebp - 4]
add dword [0x4174fc], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x4039da
push 0xfffffffffffffffd
pop eax
pop edi
pop esi
pop ebx
leave
ret 0x10
Function at 0x4039e1
Capabilities:
Check for time delay via gettickcount
Write file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
push edi
xor edi, edi
mov dword [esp + 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [0x4174fc]
mov ebx, eax
sub esi, dword [0x40b42c]
add ebx, 0x1f4
add esi, dword [esp + 0x38]
cmp esi, edi
jle 0x403bc2
push dword [0x41f50c]
call fcn.00403c00
push edi
push edi
push dword [0x40b42c]
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41f508], esi
mov dword [0x4174f8], edi
mov eax, dword [0x417500]
mov ebp, 0x4000
sub eax, dword [0x41f50c]
cmp eax, ebp
jg 0x403a55
mov ebp, eax
mov esi, 0x4134b8
push ebp
push esi
call fcn.00403bce
test eax, eax
je 0x403ba4
add dword [0x41f50c], ebp
mov dword [0x40b448], esi
mov dword [0x40b44c], ebp
cmp dword [0x424348], edi
je 0x403b07
cmp dword [0x4243e0], edi
jne 0x403b07
cmp dword [esp + 0x10], edi
je 0x403ad4
mov eax, dword [0x41f508]
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
sub eax, dword [0x4174fc]
sub eax, dword [esp + 0x38]
add eax, dword [0x40b42c]
mov dword [0x4174f8], eax
jmp 0x403ac2
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 1
push edi
push edi
lea eax, [esp + 0x24]
push edi
push eax
call esi
test eax, eax
jne 0x403ab7
jmp 0x403b07
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, ebx
jbe 0x403b07
mov eax, dword [0x424344]
neg eax
sbb eax, eax
not eax
and eax, str.unpacking_data:__d__
push eax
push 0x4034ef
push edi
push 0x6f
push dword [0x424340]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
mov dword [esp + 0x10], eax
mov ecx, 0x40b430
mov dword [0x40b450], 0x40b4b8
mov dword [0x40b454], 0x8000
call fcn.00401020
test eax, eax
jl 0x403bad
mov esi, dword [0x40b450]
mov eax, 0x40b4b8
sub esi, eax
je 0x403b6e
lea ecx, [esp + 0x14]
push edi
push ecx
push esi
push eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403ba9
cmp esi, dword [esp + 0x14]
jne 0x403ba9
add dword [0x40b42c], esi
cmp dword [0x40b44c], edi
jne 0x403a7b
jmp 0x403b7a
cmp dword [0x40b44c], edi
jne 0x403bad
cmp ebp, edi
je 0x403bad
mov eax, dword [0x4174fc]
mov ecx, eax
sub ecx, dword [0x40b42c]
add ecx, dword [esp + 0x38]
test ecx, ecx
jg 0x403a3f
push edi
push edi
push eax
push dword [0x409018]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x403bb2
or eax, 0xffffffff
jmp 0x403bc4
push 0xfffffffffffffffe
jmp 0x403baf
push 0xfffffffffffffffd
pop eax
jmp 0x403bc4
cmp dword [esp + 0x10], edi
je 0x403bc2
push dword [esp + 0x10]
call dword [sym.imp.USER32.dll_DestroyWindow]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 4
Function at 0x404297
Capabilities:
Identify system language via api

Disassembly:
cmp byte [0x42b000], 0
push ebx
push ebp
push esi
push edi
mov edi, pe_overlay
mov ebx, 0x42b000
je 0x4042b6
push ebx
call fcn.0040668c
jmp 0x4042bc
call dword [sym.imp.KERNEL32.dll_GetUserDefaultLangID]
xor ecx, ecx
mov esi, dword [0x424384]
test esi, esi
je 0x40430f
mov ecx, dword [0x424348]
mov ecx, dword [ecx + 0x64]
mov edx, ecx
imul ecx, esi
neg edx
add ecx, dword [0x424380]
add ecx, edx
dec esi
mov bp, word [ecx]
xor bp, ax
and ebp, edi
test bp, bp
je 0x4042f4
test esi, esi
jne 0x4042de
jmp 0x40430f
mov edx, dword [ecx + 2]
mov dword [0x423b20], edx
mov edx, dword [ecx + 6]
mov dword [0x4243e8], edx
lea edx, [ecx + 0xa]
mov dword [0x423b1c], edx
cmp dword [0x423b1c], 0
jne 0x40432a
cmp di, 0xffff
jne 0x404326
mov edi, 0x3ff
jmp 0x4042be
xor edi, edi
jmp 0x4042be
movzx eax, word [ecx]
push eax
push ebx
call fcn.00406673
push 0xfffffffffffffffe
push 0x423b40
call fcn.00406721
push eax
push dword [0x420920]
call dword [sym.imp.USER32.dll_SetWindowTextA]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x405fd6
Capabilities:
Check if file exists
Create process on windows
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push dword [ebp + 0xc]
mov dword [0x422548], 0x44
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
je 0x405ffa
test al, 0x10
jne 0x405ffd
mov dword [ebp + 0xc], ecx
lea eax, [ebp - 0x10]
push eax
push 0x422548
push dword [ebp + 0xc]
push ecx
push ecx
push ecx
push ecx
push ecx
push dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x406028
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x40609f
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x144
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
push ebx
call fcn.004062fc
mov edi, dword [ebp + 0xc]
mov dword [ebp - 4], eax
and edi, 1
mov dword [ebp + 8], edi
je 0x4060d4
test eax, eax
je 0x406214
test byte [ebp + 0xc], 2
je 0x4061d0
mov esi, 0x421d48
push ebx
push esi
call sub.KERNEL32.dll_lstrcpyA
test edi, edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcatA]
je 0x4060f4
push str..
push esi
call edi
jmp 0x4060fa
push ebx
call fcn.00406263
push 0x409004
push ebx
call edi
push ebx
call sub.KERNEL32.dll_lstrlenA
mov edi, eax
lea eax, [ebp - 0x144]
push eax
push esi
add edi, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x4061c6
cmp byte [ebp - 0x118], 0x2e
jne 0x406140
cmp byte [ebp - 0x117], 0x2e
je 0x4061a9
cmp byte [ebp - 0x117], 0
je 0x4061a9
lea eax, [ebp - 0x118]
push eax
push edi
call sub.KERNEL32.dll_lstrcpyA
mov eax, dword [ebp - 0x144]
test al, 0x10
je 0x40616c
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x4061a9
push dword [ebp + 0xc]
push ebx
call fcn.0040609f
jmp 0x4061a9
and al, 0xfe
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
push ebx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4061a1
test byte [ebp + 0xc], 4
je 0x406199
push ebx
push 0xfffffffffffffff1
call fcn.00405b03
push 0
push ebx
call fcn.00406452
jmp 0x4061a9
inc dword [0x4243c8]
jmp 0x4061a9
push ebx
push 0xfffffffffffffff2
call fcn.00405b03
lea eax, [ebp - 0x144]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x406125
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x4061d0
and byte [edi - 1], 0
xor esi, esi
cmp dword [ebp - 4], esi
je 0x406214
cmp dword [ebp + 8], esi
je 0x406214
push ebx
call fcn.0040621b
push ebx
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x40620c
test byte [ebp + 0xc], 4
je 0x406204
push ebx
push 0xfffffffffffffff1
call fcn.00405b03
push esi
push ebx
call fcn.00406452
jmp 0x406214
inc dword [0x4243c8]
jmp 0x406214
push ebx
push 0xffffffffffffffe5
call fcn.00405b03
pop edi
pop esi
pop ebx
leave
ret 8

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

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x422148
push esi
call sub.KERNEL32.dll_lstrcpyA
push esi
call fcn.004062af
test eax, eax
jne 0x40631b
xor eax, eax
jmp 0x40636a
test byte [0x424350], 0x80
je 0x40632f
mov cl, byte [eax]
test cl, cl
je 0x406317
cmp cl, 0x5c
je 0x406317
mov edi, eax
sub edi, esi
jmp 0x406349
call fcn.004069f7
test eax, eax
je 0x406343
test byte [eax], 0x10
je 0x406317
push esi
call fcn.00406263
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x406335
call fcn.0040621b
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4
Function at 0x4063db
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x40640a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x40644e
test edi, edi
jne 0x406415
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x406448
Function at 0x406452
Capabilities:
Get common file path
Get file size

Disassembly:
push ebx
push ebp
push esi
push edi
push str.KERNEL32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
mov esi, dword [esp + 0x18]
je 0x40648a
push str.MoveFileExA
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40648a
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4065cf
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x422ed0], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x422ed0
je 0x4064ce
push 1
push 0
push esi
call fcn.004063db
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4065d5
cmp eax, edi
jg 0x4065d5
mov esi, 0x422ad0
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4065d5
cmp eax, edi
jg 0x4065d5
push esi
push ebp
push str._s_s_r_n
push 0x4226d0
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebp, 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]
xor edi, edi
push edi
push 0x8000080
push 4
push edi
push edi
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4065cf
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push edi
lea eax, [esi + ebp + 0xa]
push eax
push edi
push 4
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
cmp eax, edi
mov dword [esp + 0x14], eax
je 0x4065b7
push edi
push edi
push edi
push 2
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov edi, eax
test edi, edi
je 0x4065ab
push str._Rename__r_n
push edi
call fcn.0040636f
test eax, eax
jne 0x4065dc
lea eax, [edi + esi]
push str._Rename__r_n
push eax
call sub.KERNEL32.dll_lstrcpyA
add esi, 0xa
mov eax, esi
push ebp
add eax, edi
push 0x4226d0
push eax
call fcn.004063bb
push edi
add esi, ebp
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
push edi
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x4243d0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409310
push eax
call fcn.0040636f
test eax, eax
je 0x406592
inc eax
lea edx, [edi + esi]
cmp eax, edx
mov ecx, eax
jae 0x406605
mov dl, byte [ecx]
mov byte [ecx + ebp], dl
inc ecx
lea edx, [edi + esi]
cmp ecx, edx
jb 0x4065f8
sub eax, edi
jmp 0x406594
Function at 0x406609
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0xc]
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 0x40666d
lea eax, [ebp + 8]
mov dword [ebp + 8], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x40665c
cmp dword [ebp + 0x14], 1
je 0x40665e
cmp dword [ebp + 0x14], 2
je 0x40665e
mov byte [esi], bl
push dword [ebp + 0xc]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x10
Function at 0x401a89
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x50
push ebp
lea eax, [esp + 0x28]
push edi
push eax
call fcn.00401c39
mov ecx, dword [esp + 0x5c]
xor edx, edx
xor ebp, ebp
mov dword [esp + 0xc], 1
mov edi, dword [ecx]
mov dword [esp + 0x10], 8
mov dword [esp + 0x14], 2
mov dword [esp + 0x18], 4
mov dx, word [edi + 0x14]
cmp word [edi + 6], bp
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x20], 0x80
mov dword [esp + 0x24], 0x20
mov dword [esp + 0x28], 0x40
lea eax, [edx + edi + 0x18]
jbe 0x401b87
push ebx
push esi
lea ebx, [eax + 0x24]
mov eax, dword [ebx]
mov ecx, eax
mov edx, eax
shr ecx, 0x1d
shr edx, 0x1e
mov esi, eax
and ecx, 1
and edx, 1
shr esi, 0x1f
test eax, 0x2000000
je 0x401b2a
mov eax, dword [ebx - 0x14]
mov ecx, dword [ebx - 0x1c]
push 0x4000
push eax
push ecx
call dword [esp + 0x4c]
jmp 0x401b6d
lea edx, [edx + ecx*2]
test eax, 0x4000000
lea ecx, [esi + edx*2]
mov esi, dword [esp + ecx*4 + 0x14]
je 0x401b41
or esi, 0x200
mov edx, dword [ebx - 0x14]
mov ecx, edx
test ecx, ecx
jne 0x401b5c
test al, 0x40
je 0x401b53
mov ecx, dword [edi + 0x20]
jmp 0x401b5a
test al, 0x80
je 0x401b6d
mov ecx, dword [edi + 0x24]
test ecx, ecx
jbe 0x401b6d
mov ecx, dword [ebx - 0x1c]
lea eax, [esp + 0x10]
push eax
push esi
push edx
push ecx
call dword [esp + 0x44]
mov edx, dword [esp + 0x64]
xor eax, eax
inc ebp
add ebx, 0x28
mov edi, dword [edx]
mov ax, word [edi + 6]
cmp ebp, eax
jl 0x401af9
pop esi
pop ebx
pop edi
pop ebp
add esp, 0x50
ret