joyce8/EMBER2024-capa huggingface dataset:
Function at 0x30015459
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x21c
mov eax, dword [0x300028e0]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov dword [ebp - 0x21c], eax
lea eax, [ebp - 0x214]
push eax
push 0x20019
xor ebx, ebx
push ebx
push 0x30002628
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x214], ebx
xor esi, esi
mov dword [ebp - 0x218], 0x208
mov word [ebp - 0x210], bx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x210]
push eax
push ebx
push ebx
push 0x300027ac
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp dword [ebp - 0x214], ebx
je 0x300154e4
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x218]
cmp eax, ebx
je 0x3001550f
cmp eax, 0x208
ja 0x3001550f
shr eax, 1
mov esi, eax
je 0x3001550f
lea eax, [ebp + esi*2 - 0x212]
cmp word [eax], 0x5c
je 0x3001550f
dec esi
dec eax
dec eax
cmp esi, ebx
jne 0x30015502
push dword [ebp - 0x21c]
lea eax, [ebp - 0x210]
push eax
mov word [ebp + esi*2 - 0x210], bx
call fcn.300153cb
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.30015724
leave
ret 4

Function at 0x30015539
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x300028e0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
lea eax, [ebp - 0x214]
push eax
push 0x20019
xor esi, esi
push esi
push 0x30002758
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x214], esi
mov dword [ebp - 0x218], 0x208
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x210]
push eax
push esi
push esi
push 0x30002738
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, dword [ebp - 0x218]
shr eax, 1
cmp dword [ebp - 0x214], esi
mov word [ebp + eax*2 - 0x210], si
je 0x300155c1
push dword [ebp - 0x214]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x105
lea eax, [ebp - 0x210]
push eax
push 0x300027c8
call fcn.300151f0
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
cmp eax, esi
pop esi
jne 0x300155f3
push 0x300027bc
call fcn.30015459
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.30015724
leave
ret
Function at 0x30015670
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
push 0x30002900
push 0x300028e4
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x300156a5
push 0
push 0
push 1
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call esi
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov esi, dword [ebp - 8]
xor esi, dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
xor esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor esi, eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor esi, eax
lea eax, [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, dword [ebp - 0x10]
xor eax, dword [ebp - 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
xor esi, eax
lea eax, [ebp - 4]
push eax
push 0x40
push 4
mov ebx, 0x300028e0
push ebx
call edi
test esi, esi
mov dword [0x300028e0], esi
jne 0x30015709
mov dword [0x300028e0], 0xbb40e64e
lea eax, [ebp - 4]
push eax
push dword [ebp - 4]
push 4
push ebx
call edi
pop edi
pop esi
mov dword [0x3001d384], 0x44bf19b1
pop ebx
leave
ret

Function at 0x30015724
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x300028e0]
jne 0x3001636b
ret
push ebp
mov ebp, esp
sub esp, 0x328
mov dword [0x3001da58], eax
mov dword [0x3001da54], ecx
mov dword [0x3001da50], edx
mov dword [0x3001da4c], ebx
mov dword [0x3001da48], esi
mov dword [0x3001da44], edi
mov word [0x3001da70], ss
mov word [0x3001da64], cs
mov word [0x3001da40], ds
mov word [0x3001da3c], es
mov word [0x3001da38], fs
mov word [0x3001da34], gs
pushfd
pop dword [0x3001da68]
mov eax, dword [ebp]
mov dword [0x3001da5c], eax
mov eax, dword [ebp + 4]
mov dword [0x3001da60], eax
lea eax, [ebp + 8]
mov dword [0x3001da6c], eax
mov eax, dword [ebp - 0x320]
mov dword [0x3001d9a8], 0x10001
mov eax, dword [0x3001da60]
mov dword [0x3001d95c], eax
mov dword [0x3001d950], 0xc0000409
mov dword [0x3001d954], 1
mov eax, dword [0x300028e0]
mov dword [ebp - 0x328], eax
mov eax, dword [0x3001d384]
mov dword [ebp - 0x324], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
mov dword [0x3001d9a0], eax
push 1
call sub.MSVCR80.dll__crt_debugger_hook
pop ecx
push 0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 0x30002c58
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
cmp dword [0x3001d9a0], 0
jne 0x3001645b
push 1
call sub.MSVCR80.dll__crt_debugger_hook
pop ecx
push 0xc0000409
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
leave
ret
Function at 0x30015731
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
lea eax, [ebp - 4]
push eax
push 0x20019
push 0
push 0x3000292c
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x30015789
mov eax, dword [ebp + 0xc]
push edi
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
push dword [ebp + 8]
push 0
push 0
push 0x30002924
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push dword [ebp - 4]
mov edi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test edi, edi
pop edi
jne 0x30015789
mov al, 1
jmp 0x3001578b
xor al, al
leave
ret 8
Function at 0x30015fc2
Capabilities:
Terminate process

Disassembly:
push 0x5c
push 0x30018a58
call fcn.300161b0
xor ebx, ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], ebx
lea eax, [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_GetStartupInfoW]
mov dword [ebp - 4], 0xfffffffe
mov dword [ebp - 4], 1
mov eax, dword fs:[0x18]
mov esi, dword [eax + 4]
mov dword [ebp - 0x20], ebx
mov edi, 0x3001dc9c
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp eax, ebx
je 0x30015d65
cmp eax, esi
jne 0x30015d58
xor esi, esi
inc esi
mov dword [ebp - 0x20], esi
jmp 0x30015d68
push 0x3e8
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x30015d3f
xor esi, esi
inc esi
mov eax, dword [0x3001dc98]
cmp eax, esi
jne 0x30015d7b
push 0x1f
call sub.MSVCR80.dll__amsg_exit
pop ecx
jmp 0x30015daa
mov eax, dword [0x3001dc98]
test eax, eax
jne 0x30015da4
mov dword [0x3001dc98], esi
push 0x300013d8
push 0x300013d0
call sub.MSVCR80.dll__initterm_e
pop ecx
pop ecx
test eax, eax
je 0x30015daa
jmp 0x30015ece
mov dword [0x3001d94c], esi
mov eax, dword [0x3001dc98]
cmp eax, esi
jne 0x30015dce
push 0x300013cc
push 0x30001308
call sub.MSVCR80.dll__initterm
pop ecx
pop ecx
mov dword [0x3001dc98], 2
cmp dword [ebp - 0x20], ebx
jne 0x30015ddb
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
cmp dword [0x3001dca8], ebx
je 0x30015dfc
push 0x3001dca8
call fcn.3001652e
pop ecx
test eax, eax
je 0x30015dfc
push ebx
push 2
push ebx
call dword [0x3001dca8]
mov eax, dword [sym.imp.MSVCR80.dll__wcmdln]
cmp dword [eax], ebx
je 0x30015ece
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
movzx ecx, word [eax]
cmp cx, 0x20
ja 0x30015e66
cmp cx, bx
je 0x30015e21
cmp dword [ebp - 0x1c], ebx
jne 0x30015e66
movzx ecx, word [eax]
cmp cx, bx
je 0x30015e36
cmp cx, 0x20
ja 0x30015e36
inc eax
inc eax
mov dword [ebp - 0x24], eax
jmp 0x30015e21
test byte [ebp - 0x40], 1
je 0x30015e42
movzx ecx, word [ebp - 0x3c]
jmp 0x30015e45
push 0xa
pop ecx
push ecx
push eax
push ebx
push 0x30000000
call main
mov dword [0x3001d948], eax
cmp dword [0x3001d93c], ebx
jne 0x30015eab
push eax
call dword [sym.imp.MSVCR80.dll_exit]
cmp cx, 0x22
jne 0x30015e77
xor ecx, ecx
cmp dword [ebp - 0x1c], ebx
sete cl
mov dword [ebp - 0x1c], ecx
inc eax
inc eax
jmp 0x30015e0b
cmp dword [0x3001d94c], ebx
jne 0x30015eb9
call dword [sym.imp.MSVCR80.dll__cexit]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [0x3001d948]
jmp 0x30015eda
mov dword [ebp - 4], 0xfffffffe
mov eax, 0xff
call fcn.300161f5
ret
call fcn.30015670
jmp 0x30015d02

Function at 0x430006
Capabilities:
Encode data using xor

Disassembly:
call 0x43000c
nop
nop
nop
pop eax
nop
nop
add eax, 0x403d6f
nop
sub eax, 0x403d15
nop
nop
nop
nop
mov ebx, dword [eax]
nop
nop
mov ecx, dword [eax + 4]
nop
nop
mov edx, dword [eax + 8]
nop
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
nop
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x430030
nop
nop
nop
add eax, 0xc
nop
nop
nop
nop
nop
cmp dword [eax], 0
jne 0x43001e
nop
nop
nop
nop
popal
nop
nop
nop
nop
nop
jmp loc.00401219
Function at 0x10001080
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
mov dword [ebp - 4], 0x3000
mov eax, dword [0x1000638c]
mov dword [0x10006400], eax
push str.VirtualAlloc
push str.kernel32
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x10006404], eax
mov dword [ebp - 0x24], 1
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x3c], 1
mov dword [ebp - 0x14], 1
mov dword [ebp - 0x20], 1
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x38], 1
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x1c], 1
mov dword [ebp - 0x30], 1
mov dword [ebp - 0x18], 1
mov dword [ebp - 0x34], 1
mov dword [ebp - 8], 1
mov dword [ebp - 0xc], 1
push str.LOcfSJpdtk
call dword [sym.imp.GDI32.dll_AddFontResourceW]
push 0x40
mov ecx, dword [ebp - 4]
push ecx
push dword [0x10006400]
push dword [0x100063d8]
push dword [0x10006404]
pop ecx
mov ecx, dword [0x10006404]
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
mov eax, eax
push 0x10001168
push ecx
ret
Function at 0x402a3d
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
mov eax, dword [0x42e490]
or al, 8
xor ebx, ebx
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x402ad1
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x402a8e
cmp dword [ebp + 0x10], ebx
jne 0x402ac5
lea eax, [ebp - 0x10c]
push ebx
push eax
push dword [ebp - 4]
call fcn.00402a3d
test eax, eax
jne 0x402aa0
lea eax, [ebp - 0x10c]
push edi
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x402a75
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.0040603e
cmp eax, ebx
je 0x402ad8
push ebx
push dword [0x42e490]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x402ad1
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x42e490], ebx
jne 0x402ace
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x402ace
jmp 0x402ad1
Function at 0x402f41
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 esi
xor esi, esi
push edi
cmp eax, esi
jl 0x402f6d
mov ecx, dword [0x42e438]
push esi
add eax, ecx
push esi
push eax
mov dword [0x42040c], eax
push dword [0x40901c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.0040305c
cmp eax, esi
jl 0x403056
lea eax, [ebp + 8]
push 4
push eax
push dword [0x40901c]
call fcn.00405a1c
test eax, eax
je 0x403042
push dword [ebp + 8]
add dword [0x42040c], 4
call fcn.0040305c
cmp eax, esi
mov dword [ebp - 8], eax
jl 0x403056
cmp dword [ebp + 0x10], esi
jne 0x40301e
cmp dword [ebp + 8], esi
jle 0x403053
mov esi, 0x41c408
cmp dword [ebp + 8], 0x4000
mov edi, dword [ebp + 8]
jl 0x402fd3
mov edi, 0x4000
push edi
push esi
push dword [0x40901c]
mov dword [ebp - 4], edi
call fcn.00405a1c
test eax, eax
je 0x403042
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 0x40301a
cmp dword [ebp + 0x14], edi
jne 0x40301a
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x42040c], eax
cmp dword [ebp + 8], 0
jg 0x402fc2
jmp 0x403053
push 0xfffffffffffffffe
jmp 0x403044
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403029
mov eax, dword [ebp + 0x14]
lea ecx, [ebp - 4]
push esi
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40901c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403047
push 0xfffffffffffffffd
pop eax
jmp 0x403056
mov eax, dword [ebp - 4]
add dword [0x42040c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
pop edi
pop esi
leave
ret 0x10
Function at 0x40305c
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x42040c]
sub esi, dword [0x40a840]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
xor ebx, ebx
add eax, 0x1f4
cmp esi, ebx
mov dword [0x42e3ec], eax
jle 0x4031c6
push dword [0x42841c]
call fcn.004031ee
push ebx
push ebx
push dword [0x40a840]
push dword [0x40901c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x428418], esi
mov dword [0x420408], ebx
mov ebp, 0x414408
mov eax, dword [0x420410]
mov edi, 0x4000
sub eax, dword [0x42841c]
cmp eax, edi
jg 0x4030d1
mov edi, eax
mov esi, 0x41c408
push edi
push esi
call fcn.004031d8
test eax, eax
je 0x4031b8
add dword [0x42841c], edi
mov dword [0x40a848], esi
mov dword [0x40a84c], edi
cmp dword [0x42e3f0], ebx
je 0x403128
cmp dword [0x42e480], ebx
jne 0x403128
mov eax, dword [0x428418]
push ebx
sub eax, dword [0x42040c]
sub eax, dword [esp + 0x1c]
add eax, dword [0x40a840]
mov dword [0x420408], eax
call fcn.00402bda
pop ecx
push 0x40a848
mov dword [0x40a850], ebp
mov dword [0x40a854], 0x8000
call fcn.0040611e
test eax, eax
jl 0x4031c1
mov esi, dword [0x40a850]
sub esi, ebp
je 0x403182
lea eax, [esp + 0x10]
push ebx
push eax
push esi
push ebp
push dword [0x40901c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4031bd
cmp esi, dword [esp + 0x10]
jne 0x4031bd
add dword [0x40a840], esi
cmp dword [0x40a84c], ebx
jne 0x4030f7
jmp 0x40318e
cmp dword [0x40a84c], ebx
jne 0x4031c1
cmp edi, ebx
je 0x4031c1
mov eax, dword [0x42040c]
mov ecx, eax
sub ecx, dword [0x40a840]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x4030bb
push ebx
push ebx
push eax
push dword [0x40901c]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
jmp 0x4031c6
or eax, 0xffffffff
jmp 0x4031d0
push 0xfffffffffffffffe
jmp 0x4031c3
push 0xfffffffffffffffd
pop eax
jmp 0x4031d0
push 1
call fcn.00402bda
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
Function at 0x4054c6
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x42b068], 0x44
push eax
xor eax, eax
push 0x42b068
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x405501
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x40558b
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.0040597f
mov edi, eax
cmp edi, 0xffffffff
je 0x4055cc
test byte [esp + 0x10], 1
push esi
je 0x4055ae
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
jmp 0x4055b4
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
je 0x4055bd
xor eax, eax
inc eax
jmp 0x4055ce
test byte [esp + 0x10], 4
jne 0x4055cc
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop esi
ret 8
Function at 0x4055d3
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push edi
mov dword [ebp - 4], eax
call fcn.00405891
test bl, 8
mov dword [ebp - 0xc], eax
je 0x405612
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42e468], eax
jmp 0x40579c
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
je 0x40562c
test eax, eax
je 0x40574a
test bl, 2
je 0x40574a
mov esi, 0x42a868
push edi
push esi
call fcn.00405d13
cmp dword [ebp + 8], 0
je 0x40564b
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x405651
push edi
call fcn.004057ea
cmp byte [edi], 0
jne 0x40565f
cmp byte [0x42a868], 0x5c
jne 0x40566a
push 0x409014
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x14c]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp - 8], eax
je 0x405740
lea eax, [ebp - 0x120]
push 0x3f
push eax
lea esi, [ebp - 0x120]
call fcn.004057ce
cmp byte [eax], 0
je 0x4056b0
cmp byte [ebp - 0x1c], 0
je 0x4056b0
lea esi, [ebp - 0x1c]
cmp byte [esi], 0x2e
jne 0x4056c6
mov al, byte [esi + 1]
test al, al
je 0x40571f
cmp al, 0x2e
jne 0x4056c6
cmp byte [esi + 2], 0
je 0x40571f
push esi
push ebx
call fcn.00405d13
test byte [ebp - 0x14c], 0x10
je 0x4056eb
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x40571f
push dword [ebp + 0xc]
push edi
call fcn.004055d3
jmp 0x40571f
push dword [ebp - 4]
push edi
call fcn.0040558b
test eax, eax
jne 0x405717
cmp dword [ebp - 4], eax
je 0x40570f
push edi
push 0xfffffffffffffff1
call fcn.00404ffe
push 0
push edi
call fcn.00405bc7
jmp 0x40571f
inc dword [0x42e468]
jmp 0x40571f
push edi
push 0xfffffffffffffff2
call fcn.00404ffe
lea eax, [ebp - 0x14c]
push eax
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x40568e
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x40574a
and byte [ebx - 1], 0
xor esi, esi
cmp dword [ebp + 8], esi
je 0x40579c
cmp dword [ebp - 0xc], esi
jne 0x40575e
inc dword [0x42e468]
jmp 0x40579c
push edi
call fcn.00406017
test eax, eax
je 0x40579c
push edi
call fcn.004057a3
mov eax, dword [ebp - 4]
or al, 1
push eax
push edi
call fcn.0040558b
test eax, eax
jne 0x405794
cmp dword [ebp - 4], esi
je 0x405756
push edi
push 0xfffffffffffffff1
call fcn.00404ffe
push esi
push edi
call fcn.00405bc7
jmp 0x40579c
push edi
push 0xffffffffffffffe5
call fcn.00404ffe
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x405891
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42ac68
push esi
call fcn.00405d13
push esi
call fcn.0040583c
mov edi, eax
test edi, edi
jne 0x4058b2
xor eax, eax
jmp 0x405904
push edi
call fcn.00405f7e
test byte [0x42e3f8], 0x80
je 0x4058cb
mov al, byte [edi]
test al, al
je 0x4058ae
cmp al, 0x5c
je 0x4058ae
sub edi, esi
jmp 0x4058e3
call fcn.00406017
test eax, eax
je 0x4058dd
test byte [eax], 0x10
je 0x4058ae
push esi
call fcn.004057ea
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x4058cf
call fcn.004057a3
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 0x40597f
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40599e
and al, 0xfe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, esi
pop esi
ret 4

Function at 0x4059a4
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 0x4059d3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x40939c]
dec edi
mov dword [ebp + 8], eax
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 0x405a18
test edi, edi
jne 0x4059de
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405a12
Function at 0x405a4b
Capabilities:
Get file size
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, 0x42b5f0
push 0x4093b8
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov esi, dword [esp + 0x1c]
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
test esi, esi
mov ebx, 0x400
je 0x405a9a
push 1
push 0
push esi
call fcn.004059a4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push edi
push esi
call ebp
test eax, eax
je 0x405bc1
cmp eax, ebx
jg 0x405bc1
mov esi, 0x42b9f0
push ebx
push esi
push dword [esp + 0x20]
call ebp
test eax, eax
je 0x405bc1
cmp eax, ebx
jg 0x405bc1
push esi
push edi
push str._s_s_r_n
push 0x42b1f0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x42e3f0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405d35
push 4
push 0xc0000000
push esi
call fcn.004059a4
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x1c], ebp
je 0x405bc1
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405bba
push edi
push esi
push ebp
call fcn.00405a1c
test eax, eax
je 0x405bba
push str._Rename__r_n
push esi
call fcn.00405909
test eax, eax
jne 0x405b50
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x405b85
add eax, 0xa
push 0x4093a0
push eax
call fcn.00405909
mov ebp, eax
test ebp, ebp
je 0x405b81
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x405b72
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x405b6c
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x1c]
jmp 0x405b87
mov ebp, dword [esp + 0x1c]
mov eax, edi
push ebx
add eax, esi
push 0x42b1f0
push eax
call fcn.0040595f
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x10]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x405bfa
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405c6b
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405c5a
cmp dword [ebp + 0x14], 1
je 0x405c5c
cmp dword [ebp + 0x14], 2
je 0x405c5c
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14