joyce8/EMBER2024-capa huggingface dataset:
Function at 0x54d328
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd0
push ebx
push esi
push edi
mov eax, dword [ebp + 0x18]
mov ebx, dword [ebp + 8]
cmp al, 0x20
jb 0x54d33f
cmp al, 0x7f
jb 0x54d34a
mov eax, dword [ebp + 0x10]
add dword [eax], 6
jmp 0x54d49b
mov dword [ebp - 0x18], 1
mov edx, dword [ebx]
mov dword [ebp - 0x1c], edx
mov ecx, dword [ebx + 8]
mov dword [ebp - 4], ecx
mov ecx, dword [ebx + 4]
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp + 0x10]
mov edx, dword [edx]
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0xfffffff4
jle 0x54d49b
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [ebp - 0x14]
jge 0x54d49b
cmp dword [ebp + 0x14], 0xfffffff4
jle 0x54d49b
mov edx, dword [ebp + 0x14]
cmp edx, dword [ebp - 0x10]
jge 0x54d49b
and eax, 0xff
mov ecx, eax
shl ecx, 2
lea ecx, [ecx + ecx*2]
add ecx, 0xfffffe80
mov eax, ecx
test eax, eax
jb 0x54d3b9
cmp eax, 0x474
jb 0x54d3c4
mov eax, dword [ebp + 0x10]
add dword [eax], 6
jmp 0x54d49b
push 0xc
mov edx, dword [ebp + 0xc]
add edx, eax
push edx
lea ecx, [ebp - 0x30]
push ecx
call fcn.0054e0d4
add esp, 0xc
xor eax, eax
lea edx, [ebp - 0x30]
xor byte [edx], 0x58
inc eax
inc edx
cmp eax, 0xc
jl 0x54d3dd
mov eax, dword [ebx + 8]
mov ecx, 0xa
cdq
idiv ecx
mov edx, dword [ebp + 0x10]
mov ecx, dword [edx]
test ecx, ecx
jns 0x54d3fe
add ecx, 7
sar ecx, 3
add eax, ecx
and eax, reloc.WSOCK32.DLL_closesocket
jns 0x54d40f
dec eax
or eax, 0xfffffffc
inc eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x30]
add dword [ebp - 0x20], 4
xor edx, edx
mov dword [ebp - 0x24], eax
mov eax, dword [ebp + 0x14]
add eax, edx
test eax, eax
jl 0x54d48c
cmp eax, dword [ebp - 0x10]
jge 0x54d48c
mov cl, 1
cmp byte [ebp + 0x1c], 0
mov eax, edx
je 0x54d441
add eax, dword [ebp - 0x20]
cmp eax, 0xc
jl 0x54d441
sub eax, 0xc
add eax, dword [ebp + 0x14]
imul eax, dword [ebp - 0x1c]
add eax, dword [ebp - 4]
mov ebx, dword [ebp - 0xc]
imul ebx, dword [ebp - 0x18]
add eax, ebx
mov dword [ebp - 8], eax
xor eax, eax
mov ebx, dword [ebp - 0x24]
mov esi, ebx
mov ebx, 8
sub ebx, eax
add ebx, dword [ebp - 0xc]
cmp ebx, dword [ebp - 0x14]
jge 0x54d484
cmp eax, 2
jl 0x54d484
test byte [esi], cl
jbe 0x54d484
mov ebx, 8
sub ebx, eax
mov edi, dword [ebp - 8]
mov byte [edi + ebx], 0
add ecx, ecx
inc eax
cmp eax, 8
jl 0x54d45e
inc edx
inc dword [ebp - 0x24]
cmp edx, 0xc
jl 0x54d41e
mov eax, dword [ebp + 0x10]
add dword [eax], 6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x54f428
call fcn.00550928
pop ebx
pop ebp
ret
test byte [ebp + 0xc], 2
je 0x54f444
test bl, 1
je 0x54f444
call fcn.00557000
mov dword [eax], 5
or eax, 0xffffffff
pop ebx
pop ebp
ret
xor eax, eax
pop ebx
pop ebp
ret
Function at 0x54f628
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
call fcn.005504c4
test byte [ebp + 0xd], 0xc0
jne 0x54f64c
mov eax, dword [0x59d580]
mov edx, dword [eax]
and edx, 0xc000
or dword [ebp + 0xc], edx
test byte [ebp + 0xd], 0x80
jne 0x54f659
or dword [ebp + 0xc], 0x4000
mov ecx, dword [ebp + 0xc]
and ecx, 0x700
cmp ecx, 0x500
jg 0x54f686
je 0x54f698
sub ecx, 0x100
je 0x54f6a6
sub ecx, 0x100
je 0x54f6ad
sub ecx, 0x100
je 0x54f69f
jmp 0x54f6b4
sub ecx, 0x600
je 0x54f6ad
sub ecx, 0x100
je 0x54f698
jmp 0x54f6b4
mov edi, 1
jmp 0x54f6b9
mov edi, 2
jmp 0x54f6b9
mov edi, 4
jmp 0x54f6b9
mov edi, 5
jmp 0x54f6b9
mov edi, 3
test byte [ebp + 0xd], 1
je 0x54f6e0
lea eax, [ebp + 0x10]
add eax, 4
mov eax, dword [eax - 4]
and eax, dword [0x59cff8]
test al, 0x80
je 0x54f6d9
mov ebx, 0x80
jmp 0x54f6f2
mov ebx, 1
jmp 0x54f6f2
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_GetFileAttributesA
mov ebx, eax
cmp eax, 0xffffffff
jne 0x54f6f2
xor ebx, ebx
mov eax, dword [ebp + 0xc]
and eax, 3
sub eax, 1
jb 0x54f704
je 0x54f70d
dec eax
je 0x54f716
jmp 0x54f71f
mov dword [ebp - 4], bind
jmp 0x54f72e
mov dword [ebp - 4], 0x40000000
jmp 0x54f72e
mov dword [ebp - 4], 0xc0000000
jmp 0x54f72e
push 1
call fcn.005508bc
pop ecx
mov ebx, eax
jmp 0x54f81e
mov eax, dword [ebp + 0xc]
and eax, 0x70
sub eax, 0x10
je 0x54f74a
sub eax, 0x10
je 0x54f751
sub eax, 0x10
je 0x54f75a
sub eax, 0x10
je 0x54f763
jmp 0x54f763
xor edx, edx
mov dword [ebp - 8], edx
jmp 0x54f76a
mov dword [ebp - 8], 1
jmp 0x54f76a
mov dword [ebp - 8], 2
jmp 0x54f76a
mov dword [ebp - 8], 3
mov dword [ebp - 0x14], 0xc
xor ecx, ecx
mov dword [ebp - 0x10], ecx
lea ecx, [ebp - 0x14]
mov eax, dword [ebp + 0xc]
and eax, 0x80
cmp eax, 1
sbb edx, edx
neg edx
mov dword [ebp - 0xc], edx
push 0
push ebx
push edi
push ecx
mov eax, dword [ebp - 8]
push eax
mov edx, dword [ebp - 4]
push edx
mov ecx, dword [ebp + 8]
push ecx
call sub.KERNEL32.DLL_CreateFileA
mov esi, eax
cmp eax, 0xffffffff
jne 0x54f7d7
call sub.KERNEL32.DLL_GetLastError
mov ebx, eax
and ebx, 0xffff
cmp ebx, 0x6e
jne 0x54f7cc
test byte [ebp + 0xd], 1
je 0x54f7c7
mov ebx, 0x50
jmp 0x54f7cc
mov ebx, 2
push ebx
call fcn.005508bc
pop ecx
mov ebx, eax
jmp 0x54f81e
mov edi, esi
push edi
call fcn.0054f58c
pop ecx
test eax, eax
je 0x54f7eb
or dword [ebp + 0xc], 0x2000
test bl, 1
jne 0x54f7f7
or dword [ebp + 0xc], 0x100
and dword [ebp + 0xc], 0xfffff8ff
mov eax, dword [ebp + 0xc]
push eax
push edi
call fcn.005505e4
add esp, 8
mov ebx, eax
inc eax
jne 0x54f81e
push 4
call fcn.005508bc
pop ecx
push esi
call sub.KERNEL32.DLL_CloseHandle
call fcn.005504f8
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x553d04
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe00
push ebx
push esi
push edi
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea eax, [ebp - 0x200]
push eax
push 0x1001
mov edx, dword [ebx + 4]
push edx
call sub.KERNEL32.DLL_GetLocaleInfoA
push str._._n
lea ecx, [ebp - 0x200]
push ecx
call fcn.0054e1e8
add esp, 8
lea eax, [ebp - 0x200]
push eax
call fcn.0054e278
pop ecx
mov edx, pe_nt_image_headers32
sub edx, eax
push edx
lea ecx, [ebp - 0x200]
push ecx
call fcn.0054e278
pop ecx
lea edx, [ebp - 0x200]
add eax, edx
push eax
push 0x1002
mov eax, dword [ebx + 4]
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA
push 0x59e1a1
lea ecx, [ebp - 0x200]
push ecx
call fcn.0054e1e8
add esp, 8
push 0xa
lea eax, [ebp - 0x200]
push eax
call fcn.0054e278
pop ecx
lea edx, [ebp - 0x200]
add eax, edx
push eax
mov ecx, dword [ebx]
push ecx
call fcn.00554ea0
add esp, 0xc
cmp dword [ebx + 0x24], 0
jne 0x553e15
push esi
call fcn.0054e278
pop ecx
mov edi, eax
lea eax, [ebp - 0x200]
push eax
call fcn.0054e278
pop ecx
add edi, eax
add edi, 3
push edi
call fcn.0054dc64
pop ecx
mov edi, eax
mov dword [ebx + 0x24], edi
test edi, edi
jne 0x553dec
xor eax, eax
jmp 0x553e9c
push esi
call fcn.0054e278
pop ecx
push eax
lea edx, [ebp - 0x200]
push edx
call fcn.0054e278
pop ecx
pop ecx
add ecx, eax
add ecx, 3
push ecx
push 0
push edi
call fcn.0054e144
add esp, 0xc
jmp 0x553e55
mov edi, dword [ebx + 0x24]
push edi
call fcn.0054e278
pop ecx
push eax
push esi
call fcn.0054e278
pop ecx
pop edx
add edx, eax
push edx
lea eax, [ebp - 0x200]
push eax
call fcn.0054e278
pop ecx
pop ecx
add ecx, eax
add ecx, 3
push ecx
push edi
call fcn.0054dc84
add esp, 8
mov dword [ebx + 0x24], eax
cmp dword [ebx + 0x24], 0
jne 0x553e55
xor eax, eax
jmp 0x553e9c
push esi
mov edx, dword [ebx + 0x24]
push edx
call fcn.0054e1e8
add esp, 8
push 0x59e1a3
mov ecx, dword [ebx + 0x24]
push ecx
call fcn.0054e1e8
add esp, 8
lea eax, [ebp - 0x200]
push eax
mov edx, dword [ebx + 0x24]
push edx
call fcn.0054e1e8
add esp, 8
push 0x59e1a5
mov ecx, dword [ebx + 0x24]
push ecx
call fcn.0054e1e8
add esp, 8
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x556f98
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 0xc]
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp + 8]
push eax
call sub.KERNEL32.DLL_CreateFileA
mov ebx, eax
test eax, eax
je 0x556ffa
call fcn.00556f48
mov esi, eax
lea eax, [ebp - 4]
push 0
push eax
push esi
call fcn.0054e278
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push edi
call fcn.0054e278
pop ecx
push eax
push edi
push ebx
call sub.KERNEL32.DLL_WriteFile
push ebx
call sub.KERNEL32.DLL_CloseHandle
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x557078
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff7c
cmp dword [0x59e834], 0
push ebx
push esi
mov esi, dword [ebp + 8]
jne 0x557152
cmp dword [0x59e830], 0
jne 0x557152
cmp dword [0x59ea34], 0
je 0x55710c
push 0x80
lea eax, [ebp - 0x84]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA
push 0x5c
lea edx, [ebp - 0x84]
push edx
call fcn.00556e48
add esp, 8
mov ebx, eax
test eax, eax
jne 0x5570f2
push 0x3a
lea edx, [ebp - 0x84]
push edx
call fcn.00556e48
add esp, 8
mov ebx, eax
test eax, eax
jne 0x5570f2
lea ebx, [ebp - 0x84]
jmp 0x5570f3
inc ebx
call fcn.00557034
or eax, 0x10010
push eax
push ebx
push esi
push 0
call sub.USER32.DLL_MessageBoxA
jmp 0x55718d
push 0xfffffffffffffff4
call sub.KERNEL32.DLL_GetStdHandle
mov ebx, eax
lea eax, [ebp - 4]
push 0
push eax
push 2
push 0x59e838
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea edx, [ebp - 4]
push edx
push esi
call fcn.0054e278
pop ecx
push eax
push esi
push ebx
call sub.KERNEL32.DLL_WriteFile
push 0
lea ecx, [ebp - 4]
push ecx
push 2
push 0x59e83b
push ebx
call sub.KERNEL32.DLL_WriteFile
jmp 0x55718d
cmp dword [0x59e830], 0
je 0x55716c
cmp dword [0x59e830], 0xffffffff
je 0x55718d
push esi
call dword [0x59e830]
pop ecx
mov eax, dword [0x59e834]
test eax, eax
je 0x55718d
cmp dword [0x59e834], 0xffffffff
je 0x55718d
cmp byte [eax], 0
je 0x55718d
push esi
push eax
call fcn.00556f98
add esp, 8
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x55ef28
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
mov ebx, eax
cmp dword [ebx + 0x10], 0xca
jne 0x55ef56
mov eax, ebx
call fcn.0055f9cc
cmp dword [ebx + 0x3c], 0
je 0x55ef4f
mov dword [ebx + 0x10], 0xcf
mov eax, 1
pop ebx
ret
mov dword [ebx + 0x10], 0xcb
cmp dword [ebx + 0x10], 0xcb
jne 0x55efc7
mov edx, dword [ebx + 0x1a6]
cmp dword [edx + 0x10], 0
je 0x55efb9
cmp dword [ebx + 8], 0
je 0x55ef78
mov eax, ebx
mov edx, dword [eax + 8]
call dword [edx]
mov eax, ebx
mov edx, dword [eax + 0x1a6]
call dword [edx]
test eax, eax
jne 0x55ef8a
xor eax, eax
pop ebx
ret
cmp eax, 2
je 0x55efb9
cmp dword [ebx + 8], 0
je 0x55ef6b
cmp eax, 3
je 0x55ef9d
dec eax
jne 0x55ef6b
mov edx, dword [ebx + 8]
inc dword [edx + 4]
mov ecx, dword [edx + 4]
mov eax, dword [ebx + 8]
cmp ecx, dword [eax + 8]
jl 0x55ef6b
mov edx, dword [ebx + 0x132]
add dword [eax + 8], edx
jmp 0x55ef6b
mov ecx, dword [ebx + 0x8c]
mov dword [ebx + 0x94], ecx
jmp 0x55efe5
cmp dword [ebx + 0x10], 0xcc
je 0x55efe5
mov eax, dword [ebx]
mov dword [eax + 0x14], 0x12
mov edx, dword [ebx + 0x10]
mov dword [eax + 0x18], edx
mov eax, ebx
mov edx, dword [eax]
call dword [edx]
mov eax, ebx
call fcn.0055eff0
pop ebx
ret
Function at 0x401018
Capabilities:
Get common file path

Disassembly:
push edi
sub esp, 0x200
mov edi, esp
push 0x78
push edi
call sub.KERNEL32.dll_GetSystemDirectoryA
lea edx, [edi + 0x7c]
xor ecx, ecx
push ecx
push ecx
push ecx
push edx
push ecx
push edi
add edi, eax
mov eax, 0x69636d5c
stosd dword es:[edi], eax
mov eax, 0x33697661
stosd dword es:[edi], eax
mov eax, 0x6c642e32
stosd dword es:[edi], eax
mov eax, 0x6c
stosd dword es:[edi], eax
call sub.KERNEL32.dll_FindFirstFileExA
add esp, 0x200
pop edi
cmp eax, 1
jg 0x401060
ret
pushal
jmp fcn.00401310

Function at 0x401360
Capabilities:
Encode data using xor

Disassembly:
mov edi, edi
push ebp
mov eax, 0x4031f4
push eax
push ebp
mov ecx, esp
push ecx
mov esi, 0x2b
push esi
add dword [esp], 0x15
mov ecx, 0xfffffe6c
push ecx
add dword [esp], 0xaec
mov ebx, section..data
push ebx
sub edx, edx
sub edx, sym.imp.KERNEL32.dll_VirtualProtect
neg edx
call dword [edx]
pop ebx
pop eax
mov ebx, 0x403400
mov dword [eax - 0x34], ebx
mov edi, ebx
add edi, 0x7b
lea ebx, [0x4020f9]
xor edx, edx
add edx, 0x558
mov esi, dword [ebx]
add ebx, 3
inc ebx
mov dword [edi - 0x7b], esi
add edi, 4
xor dword [edi - 0x7f], 0x7369a3c7
sub dword [edi - 0x7f], 0x4eac6723
sub edx, 4
test edx, edx
jne 0x4013b3
push eax
call sub.USER32.dll_GetFocus
pop eax
pop ebp
ret 8

Function at 0x401508
Capabilities:
Delete directory

Disassembly:
mov edi, edi
push ebp
push esi
push ebx
push edx
push eax
push edi
call fcn.00401128
pop esi
mov ecx, 0
push ecx
call sub.KERNEL32.dll_RemoveDirectoryA
mov ecx, 0x1b
push ecx
call sub.KERNEL32.dll_Sleep
pop ebp
ret 8
Function at 0x40153d
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x423cd0]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
cmp eax, ebx
jne 0x4015d2
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov edi, 0x105
jmp 0x40158f
cmp dword [ebp + 0x10], ebx
jne 0x4015c6
push ebx
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.0040153d
test eax, eax
jne 0x4015a1
push edi
lea eax, [ebp - 0x10c]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x401576
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 2
call fcn.00405c24
cmp eax, ebx
je 0x4015d9
push ebx
push dword [0x423cd0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x4015d2
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 [0x423cd0], ebx
jne 0x4015cf
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x4015cf
jmp 0x4015d2
Function at 0x402e3e
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, dword [0x41ad7c]
sub esi, dword [0x41ed88]
push edi
add esi, dword [esp + 0x18]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
add eax, 0x1f4
xor ebx, ebx
cmp esi, ebx
mov dword [0x423c40], eax
jle 0x402f9c
push dword [0x41ed84]
call fcn.00402e27
push ebx
push ebx
push dword [0x41ed88]
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [0x41ad78], esi
mov dword [0x40acec], ebx
mov ebp, 0x412d78
mov eax, dword [0x41ed80]
sub eax, dword [0x41ed84]
mov edi, 0x4000
cmp eax, edi
jg 0x402eb3
mov edi, eax
push edi
mov esi, 0x41ad80
push esi
call fcn.00402df5
test eax, eax
je 0x402fae
add dword [0x41ed84], edi
mov dword [0x412d08], esi
mov dword [0x412d0c], edi
cmp dword [0x423bec], ebx
je 0x402f0a
cmp dword [0x423cc0], ebx
jne 0x402f0a
mov eax, dword [0x41ad78]
sub eax, dword [0x41ad7c]
push ebx
sub eax, dword [esp + 0x1c]
add eax, dword [0x41ed88]
mov dword [0x40acec], eax
call fcn.00402d56
pop ecx
mov ecx, 0x412cf0
mov dword [0x412d10], ebp
mov dword [0x412d14], 0x8000
call fcn.0040640a
test eax, eax
jl 0x402fb3
mov esi, dword [0x412d10]
sub esi, ebp
je 0x402f68
push ebx
lea eax, [esp + 0x14]
push eax
push esi
push ebp
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x402fb8
cmp esi, dword [esp + 0x10]
jne 0x402fb8
add dword [0x41ed88], esi
cmp dword [0x412d0c], ebx
jne 0x402ed9
jmp 0x402f74
cmp dword [0x412d0c], ebx
jne 0x402fb3
cmp edi, ebx
je 0x402fb3
mov eax, dword [0x41ad7c]
mov ecx, eax
sub ecx, dword [0x41ed88]
add ecx, dword [esp + 0x18]
test ecx, ecx
jg 0x402e9d
push ebx
push ebx
push eax
push dword [0x409014]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 1
call fcn.00402d56
pop ecx
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 4
or eax, 0xffffffff
jmp 0x402fa6
push 0xfffffffffffffffd
pop eax
jmp 0x402fa6
push 0xfffffffffffffffe
jmp 0x402fb5
Function at 0x402fbc
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
push edi
xor edi, edi
cmp eax, edi
jl 0x402fe8
mov ecx, dword [0x423c38]
push edi
add eax, ecx
push edi
push eax
push dword [0x409014]
mov dword [0x41ad7c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
pop esi
push esi
call fcn.00402e3e
cmp eax, edi
jl 0x4030e1
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp + 8]
push eax
push dword [0x409014]
call ebx
test eax, eax
je 0x4030dd
cmp dword [ebp - 4], esi
jne 0x4030dd
push dword [ebp + 8]
add dword [0x41ad7c], esi
call fcn.00402e3e
cmp eax, edi
mov dword [ebp - 8], eax
jl 0x4030e0
cmp dword [ebp + 0x10], edi
jne 0x4030ac
cmp dword [ebp + 8], edi
jle 0x4030d8
mov esi, 0x41ad80
mov edi, 0x4000
cmp dword [ebp + 8], edi
jge 0x40305c
mov edi, dword [ebp + 8]
push 0
lea eax, [ebp - 4]
push eax
push edi
push esi
push dword [0x409014]
call ebx
test eax, eax
je 0x4030dd
cmp edi, dword [ebp - 4]
jne 0x4030dd
push 0
lea eax, [ebp + 0x14]
push eax
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4030a8
cmp dword [ebp + 0x14], edi
jne 0x4030a8
mov eax, dword [ebp - 4]
add dword [ebp - 8], eax
sub dword [ebp + 8], eax
add dword [0x41ad7c], eax
cmp dword [ebp + 8], 0
jg 0x40304f
jmp 0x4030d8
push 0xfffffffffffffffe
jmp 0x4030df
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x4030b7
mov eax, dword [ebp + 0x14]
push edi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x409014]
call ebx
test eax, eax
je 0x4030dd
mov eax, dword [ebp - 4]
add dword [0x41ad7c], eax
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
jmp 0x4030e0
push 0xfffffffffffffffd
pop eax
pop ebx
pop edi
pop esi
leave
ret 0x10
Function at 0x404ab2
Capabilities:
Accept command line arguments
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3fc
push esi
lea eax, [ebp - 0xc]
xor esi, esi
push eax
mov dword [ebp - 8], esi
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov dword [ebp - 0x10], eax
cmp eax, esi
jne 0x404ae9
push str.CommandLine_Failed
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
jmp 0x404b8f
cmp dword [ebp - 0xc], esi
mov dword [ebp - 4], esi
jle 0x404b86
mov esi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push ebx
push edi
mov ebx, 0xfde9
mov edi, 0x3e8
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
lea eax, [eax + ecx*4]
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push 0xffffffffffffffff
push dword [eax]
mov dword [ebp - 0x14], eax
push ecx
push ebx
call esi
cmp eax, edi
jge 0x404b66
xor eax, eax
push eax
push eax
push edi
lea ecx, [ebp - 0x3fc]
push ecx
mov ecx, dword [ebp - 0x14]
push 0xffffffffffffffff
push dword [ecx]
push eax
push ebx
call esi
cmp dword [ebp - 8], 0
jne 0x404b60
push dword [ebp + 0xc]
lea eax, [ebp - 0x3fc]
push eax
call fcn.00404a6b
pop ecx
pop ecx
test eax, eax
je 0x404b66
mov dword [ebp - 8], 1
jmp 0x404b66
cmp dword [ebp - 8], 1
je 0x404b73
inc dword [ebp - 4]
mov eax, dword [ebp - 4]
cmp eax, dword [ebp - 0xc]
jl 0x404b07
jmp 0x404b84
lea eax, [ebp - 0x3fc]
push eax
call fcn.00405ab8
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
pop edi
pop ebx
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LocalFree]
pop esi
leave
ret
Function at 0x40580f
Capabilities:
Create process on windows

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

Function at 0x405991
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4059ae
and eax, 0xfffffffe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x4059b1
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
inc ecx
push 0
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 0x4059e0
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
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405a24
test edi, edi
jne 0x4059eb
mov byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x405a1e

Function at 0x405a28
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
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 0x405a99
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x400
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405a88
cmp dword [ebp + 0x14], 1
je 0x405a8a
cmp dword [ebp + 0x14], 2
je 0x405a8a
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
Function at 0x405ce2
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x421220
push esi
call fcn.00405b41
push esi
call fcn.0040591a
mov edi, eax
test edi, edi
jne 0x405d03
xor eax, eax
jmp 0x405d5b
push edi
call fcn.00405b63
test byte [0x423c48], 0x80
je 0x405d1c
mov al, byte [edi]
test al, al
je 0x405cff
cmp al, 0x5c
je 0x405cff
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenA]
sub edi, esi
jmp 0x405d3c
push esi
call fcn.00405bfd
test eax, eax
je 0x405d36
test byte [eax], 0x10
je 0x405d60
push esi
call fcn.00405cbb
push esi
call ebx
cmp eax, edi
jg 0x405d27
push esi
call fcn.00405c8e
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x405d5a