joyce8/EMBER2024-capa huggingface dataset:
Function at 0x51b930
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575ba8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5c524c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
push 0x202
push dword [0x5c6940]
lea ecx, [ebp - 0x20]
mov dword [ebp - 4], 0
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.0051b660
test eax, eax
je 0x51ba58
mov esi, dword [ebp - 0x18]
mov edi, dword [0x5c6940]
mov dword [ebp - 0x10], 0
test esi, esi
je 0x51ba03
cmp dword [esi], 0
je 0x51b9f6
push str.Advapi32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
jne 0x51b9c3
mov eax, 1
jmp 0x51ba24
push str.RegCreateKeyTransactedW
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x51b9fc
push 0
push dword [esi]
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 0x10]
push ecx
push 0
push 0x20206
push 0
push 0
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call eax
jmp 0x51ba24
cmp dword [esi + 4], 0
jne 0x51ba03
mov eax, 1
jmp 0x51ba24
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x10]
push eax
push 0
push 0x20206
push 0
push 0
push 0
push edi
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x51ba4e
mov ecx, dword [ebp - 0x20]
test ecx, ecx
je 0x51ba36
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x1c], 0x200
test eax, eax
je 0x51ba5b
xor ebx, ebx
jmp 0x51baff
mov esi, dword [ebp - 0x20]
xor ebx, ebx
jmp 0x51baff
mov esi, dword [ebp - 0x20]
mov edi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov eax, dword [edi]
cmp dword [eax - 0xc], 0
je 0x51bab8
mov ecx, dword [ebx]
test ecx, ecx
je 0x51bb1e
push ecx
push eax
call fcn.00529409
add esp, 8
test eax, eax
je 0x51bab8
mov edx, dword [edi]
test edx, edx
je 0x51bab8
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51ba90
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push str.m2_old
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [ebx]
test edx, edx
jne 0x51bac3
lea eax, [edx + 0xd]
jmp 0x51baf8
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x51bad0
sub ecx, edi
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push 0x596768
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ebx, ebx
test eax, eax
sete bl
test esi, esi
je 0x51bb0a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040e3e0
int3
Function at 0x51d1b0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 0x10]
mov eax, dword [edi]
add eax, eax
mov dword [edi], 0
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
push dword [ecx]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x51d221
mov eax, dword [ebp + 0xc]
cmp eax, 1
je 0x51d1ef
cmp eax, 2
jne 0x51d20b
mov ecx, dword [ebp + 0x10]
test esi, esi
je 0x51d21b
test ecx, ecx
je 0x51d216
test cl, 1
jne 0x51d20b
mov eax, ecx
shr eax, 1
cmp word [esi + eax*2 - 2], 0
je 0x51d21b
pop edi
mov eax, 0xd
pop esi
pop ebp
ret 0xc
xor eax, eax
mov word [esi], ax
shr ecx, 1
xor eax, eax
mov dword [edi], ecx
pop edi
pop esi
pop ebp
ret 0xc
Function at 0x540e4b
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00540cca

Function at 0x543c00
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.005438c0

Function at 0x54e91c
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0x1c]
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateThread]
pop ebp
ret
Function at 0x404bd8
Capabilities:
Hash data using sha256

Disassembly:
push esi
push edi
mov edi, eax
mov esi, ecx
call fcn.00404b6d
xor eax, eax
mov edx, dword [eax + 0x427480]
mov ecx, dword [esi + 0xf4]
mov dword [eax + ecx], edx
add eax, 4
cmp eax, 0x20
jl 0x404be5
mov eax, dword [esi + 0xf4]
xor dword [eax], 0x2080020
mov eax, dword [esi + 0xf4]
mov ecx, dword [esp + 0xc]
xor dword [eax + 8], ecx
mov esi, dword [esi + 0xf4]
or edi, 0x2000
shl edi, 0x10
xor dword [esi + 0xc], edi
pop edi
pop esi
ret 4
Function at 0x4058b6
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0x10]
push edi
test esi, esi
jbe 0x4058e3
test cl, 7
je 0x4058e3
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x42d2a8]
dec esi
inc ecx
jmp 0x4058c4
cmp esi, 8
jb 0x405986
mov edx, esi
shr edx, 3
mov dword [ebp + 8], edx
push ebx
mov edx, dword [ecx + 4]
xor eax, dword [ecx]
mov ebx, edx
shr ebx, 0x10
movzx edi, bl
mov edi, dword [edi*4 + 0x42d6a8]
mov ebx, edx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x42d2a8]
mov ebx, edx
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x42daa8]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x42e2a8]
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
xor edi, dword [ebx*4 + 0x42e6a8]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x42eaa8]
movzx edx, dl
xor edi, dword [edx*4 + 0x42dea8]
movzx eax, al
xor edi, dword [eax*4 + 0x42eea8]
sub esi, 8
add ecx, 8
dec dword [ebp + 8]
mov eax, edi
jne 0x4058f5
pop ebx
jmp 0x405986
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x42d2a8]
dec esi
inc ecx
test esi, esi
ja 0x405972
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x405cad
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1d0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push 0x40
pop ebx
cmp esi, ebx
jbe 0x405cf7
lea eax, [ebp - 0x1d0]
push eax
call fcn.004108d4
push esi
push dword [ebp + 8]
lea eax, [ebp - 0x1d0]
push eax
call fcn.00410bd6
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x1d0]
push eax
call fcn.00410c4f
lea eax, [ebp - 0x80]
push 0x20
mov dword [ebp + 8], eax
pop esi
xor ecx, ecx
push edi
test esi, esi
jbe 0x405d17
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x36
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x405d06
cmp esi, ebx
jae 0x405d2f
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x36
push eax
call fcn.0041a470
add esp, 0xc
lea eax, [ebp - 0xf0]
push eax
call fcn.004108d4
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00410bd6
push dword [ebp + 0x14]
lea eax, [ebp - 0xf0]
push dword [ebp + 0x10]
push eax
call fcn.00410bd6
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00410c4f
lea eax, [ebp - 0x160]
push eax
call fcn.004108d4
xor ecx, ecx
test esi, esi
jbe 0x405d99
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x40]
sub edi, eax
lea eax, [ebp + ecx - 0x40]
mov dl, byte [edi + eax]
xor dl, 0x5c
inc ecx
mov byte [eax], dl
cmp ecx, esi
jb 0x405d88
pop edi
cmp esi, ebx
jae 0x405db2
mov ecx, ebx
sub ecx, esi
push ecx
lea eax, [ebp + esi - 0x40]
push 0x5c
push eax
call fcn.0041a470
add esp, 0xc
push ebx
lea eax, [ebp - 0x40]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00410bd6
push 0x20
lea eax, [ebp - 0x60]
push eax
lea eax, [ebp - 0x160]
push eax
call fcn.00410bd6
push dword [ebp + 0x18]
lea eax, [ebp - 0x160]
push eax
call fcn.00410c4f
pop esi
pop ebx
leave
ret 0x14
Function at 0x405dea
Capabilities:
Encode data using xor

Disassembly:
push ebp
lea ebp, [esp - 0x58]
sub esp, 0xbc
push esi
mov esi, dword [ebp + 0x6c]
push edi
push 0x40
pop eax
cmp esi, eax
jae 0x405e03
mov eax, esi
push eax
push dword [ebp + 0x68]
lea eax, [ebp - 0x44]
push eax
call fcn.0041bee0
add esp, 0xc
lea eax, [ebp + 0x20]
push eax
mov byte [ebp + esi - 0x44], 0
mov byte [ebp + esi - 0x43], 0
mov byte [ebp + esi - 0x42], 0
mov byte [ebp + esi - 0x41], 1
add esi, 4
push esi
lea eax, [ebp - 0x44]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00405cad
push 0x20
pop esi
push esi
lea eax, [ebp + 0x20]
push eax
lea eax, [ebp]
push eax
call fcn.0041bee0
mov eax, dword [ebp + 0x7c]
add esp, 0xc
dec eax
mov dword [ebp + 0x4c], eax
push 0x10
pop eax
mov dword [ebp + 0x50], eax
mov dword [ebp + 0x54], eax
mov eax, dword [ebp + 0x70]
mov dword [ebp + 0x40], eax
mov eax, dword [ebp + 0x74]
mov dword [ebp + 0x44], eax
mov eax, dword [ebp + 0x78]
mov dword [ebp + 0x48], eax
xor edi, edi
mov eax, dword [ebp + edi + 0x4c]
test eax, eax
jbe 0x405eba
mov dword [ebp + 0x6c], eax
lea eax, [ebp - 0x64]
push eax
push esi
lea eax, [ebp + 0x20]
push eax
push dword [ebp + 0x64]
push dword [ebp + 0x60]
call fcn.00405cad
push esi
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp + 0x20]
push eax
call fcn.0041bee0
add esp, 0xc
xor eax, eax
mov cl, byte [ebp + eax + 0x20]
xor byte [ebp + eax], cl
inc eax
cmp eax, esi
jb 0x405ea8
dec dword [ebp + 0x6c]
jne 0x405e81
push esi
lea eax, [ebp]
push eax
push dword [ebp + edi + 0x40]
call fcn.0041bee0
add edi, 4
add esp, 0xc
cmp edi, 0xc
jb 0x405e76
push 0x44
lea eax, [ebp - 0x44]
push eax
call fcn.0040d0e3
push esi
lea eax, [ebp]
push eax
call fcn.0040d0e3
push esi
lea eax, [ebp + 0x20]
push eax
call fcn.0040d0e3
push esi
lea eax, [ebp - 0x64]
push eax
call fcn.0040d0e3
pop edi
pop esi
add ebp, 0x58
leave
ret 0x20
Function at 0x405f05
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x264
push ebx
push edi
mov edi, dword [ebp + 0x1c]
mov ebx, ecx
mov dword [ebp - 4], ebx
cmp edi, 0x18
ja 0x4060ae
and dword [ebp + 0x1c], 0
push esi
lea esi, [ebx + 0x102]
cmp dword [esi + 0x12], edi
jne 0x405f55
push dword [ebp + 0xc]
mov ecx, ebx
call fcn.0040d1b2
test al, al
je 0x405f55
push 0x10
push dword [ebp + 0x14]
push esi
call fcn.0041a854
add esp, 0xc
test eax, eax
je 0x4060b4
inc dword [ebp + 0x1c]
add ebx, 0x178
cmp dword [ebp + 0x1c], 4
jb 0x405f26
mov esi, 0x200
push esi
lea eax, [ebp - 0x264]
push eax
push dword [ebp + 0x10]
call fcn.00411874
xor eax, eax
inc eax
mov ecx, edi
shl eax, cl
push eax
lea eax, [ebp - 0x44]
push eax
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x10
push dword [ebp + 0x14]
lea eax, [ebp - 0x264]
push eax
call fcn.0041a6b0
pop ecx
push eax
lea eax, [ebp - 0x264]
push eax
call fcn.00405dea
push esi
lea eax, [ebp - 0x264]
push eax
call fcn.0040d0e3
mov edx, dword [ebp - 4]
mov esi, dword [ebp + 0xc]
lea eax, [edx + 0x5e0]
mov ecx, dword [eax]
mov ebx, ecx
and ebx, 3
imul ebx, ebx, 0x178
add ebx, edx
inc ecx
mov dword [eax], ecx
push 0x40
mov dword [ebx + 0x114], edi
pop ecx
mov edi, ebx
rep movsd dword es:[edi], dword [esi]
push 0x10
push dword [ebp + 0x14]
lea eax, [ebx + 0x102]
push eax
movsw word es:[edi], word [esi]
call fcn.0041bee0
push 0x20
pop esi
push esi
lea eax, [ebp - 0x24]
push eax
lea edi, [ebx + 0x118]
push edi
call fcn.0041bee0
push esi
lea eax, [ebp - 0x44]
push eax
lea eax, [ebx + 0x138]
push eax
call fcn.0041bee0
push esi
lea eax, [ebp - 0x64]
push eax
add ebx, 0x158
push ebx
call fcn.0041bee0
add esp, 0x30
push 1
push esi
push edi
call fcn.0040d03d
xor ebx, ebx
cmp dword [ebp + 0x20], ebx
je 0x406050
push esi
lea eax, [ebp - 0x64]
push eax
push dword [ebp + 0x20]
call fcn.0041bee0
add esp, 0xc
mov edi, dword [ebp + 0x24]
cmp edi, ebx
je 0x406081
push 8
push ebx
push edi
call fcn.0041a470
add esp, 0xc
xor ecx, ecx
mov dl, byte [ebp + ecx - 0x44]
mov eax, ecx
and eax, 7
add eax, edi
xor byte [eax], dl
inc ecx
cmp ecx, esi
jb 0x406065
push esi
lea eax, [ebp - 0x44]
push eax
call fcn.0040d0e3
cmp dword [ebp + 0x18], ebx
je 0x4060a3
push dword [ebp + 0x18]
mov ecx, dword [ebp - 4]
push 0x100
lea eax, [ebp - 0x24]
push eax
push dword [ebp + 8]
add ecx, 0x5e8
call fcn.0040ce90
push esi
lea eax, [ebp - 0x24]
push eax
call fcn.0040d0e3
pop esi
pop edi
pop ebx
leave
ret 0x20
push 0
push 0x20
pop esi
push esi
lea edi, [ebx + 0x118]
push edi
call fcn.0040d03d
push esi
lea eax, [ebp - 0x24]
push edi
push eax
call fcn.0041bee0
add esp, 0xc
push 1
push esi
push edi
call fcn.0040d03d
push esi
lea eax, [ebx + 0x138]
push eax
lea eax, [ebp - 0x44]
push eax
call fcn.0041bee0
push esi
add ebx, 0x158
lea eax, [ebp - 0x64]
push ebx
push eax
call fcn.0041bee0
add esp, 0x18
jmp 0x406039
Function at 0x406181
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push esi
mov esi, dword [ebp + 8]
cmp dword [esi], 2
jne 0x4061d3
lea eax, [ebp + 8]
push eax
push dword [esi + 4]
call fcn.00404bb5
lea eax, [ebp - 0x20]
push eax
push 4
lea eax, [ebp + 8]
push eax
push 0x20
push dword [ebp + 0xc]
call fcn.00405cad
xor edx, edx
mov dword [esi + 4], edx
xor eax, eax
push ebx
movzx ebx, byte [ebp + eax - 0x20]
mov ecx, eax
and ecx, 3
shl ecx, 3
shl ebx, cl
xor edx, ebx
inc eax
cmp eax, 0x20
jb 0x4061b8
mov dword [esi + 4], edx
pop ebx
cmp dword [esi], 3
jne 0x4061fb
lea eax, [ebp - 0x20]
push eax
push 0x20
add esi, 4
push esi
push 0x20
push dword [ebp + 0xc]
call fcn.00405cad
push 0x20
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.0041bee0
add esp, 0xc
pop esi
leave
ret 8

Function at 0x406558
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a740
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x4065ce
push esi
push dword [ebp + 8]
call fcn.0041a3ff
pop ecx
push dword [ebp + 8]
mov esi, eax
call fcn.0040aa8b
test al, al
jne 0x4065ab
lea eax, [ebp - 0x1000]
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x1000]
push eax
call fcn.0041a3ff
pop ecx
lea esi, [esi + eax + 1]
mov eax, 0x104
cmp esi, eax
pop esi
jbe 0x4065ce
push eax
push 0xc3
call fcn.0040c5e1
push eax
push 0x427548
call fcn.0040e50d
add esp, 0xc
leave
ret 4
Function at 0x408747
Capabilities:
Move file

Disassembly:
mov eax, 0x426225
call fcn.0041a12c
mov eax, 0x5028
call fcn.0041a740
push ebx
mov ebx, dword [ebp + 8]
push esi
push edi
mov esi, 0x800
push esi
lea eax, [ebp - 0x5034]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetLongPathNameW]
test eax, eax
je 0x408904
cmp eax, esi
jae 0x408904
push esi
lea eax, [ebp - 0x4034]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
test eax, eax
je 0x408904
cmp eax, esi
jae 0x408904
lea eax, [ebp - 0x5034]
push eax
call fcn.0040a69b
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x4034]
push eax
call fcn.0040a69b
mov edi, eax
cmp word [edi], 0
je 0x408904
push edi
push dword [ebp - 0x10]
call fcn.00411aed
test eax, eax
je 0x408904
push edi
push ebx
call fcn.0040a69b
push eax
call fcn.00411aed
test eax, eax
jne 0x408904
mov word [ebp - 0x1010], ax
xor edi, edi
cmp word [ebp - 0x1010], 0
jne 0x408860
push esi
push ebx
lea eax, [ebp - 0x1010]
push eax
call fcn.00410dc2
push edi
push str.rtmp_d
push esi
lea eax, [ebp - 0x1010]
push eax
call fcn.0040a69b
push eax
call fcn.0040d9d7
add esp, 0x10
lea eax, [ebp - 0x1010]
push eax
call fcn.004095ff
test al, al
je 0x408847
xor eax, eax
mov word [ebp - 0x1010], ax
add edi, 0x7b
cmp edi, 0x2710
jl 0x4087fa
cmp word [ebp - 0x1010], 0
je 0x408904
push esi
push ebx
lea eax, [ebp - 0x3034]
push eax
call fcn.00410dc2
push esi
push dword [ebp - 0x10]
lea eax, [ebp - 0x3034]
push eax
call fcn.0040a805
mov esi, dword [sym.imp.KERNEL32.dll_MoveFileW]
lea eax, [ebp - 0x1010]
push eax
lea eax, [ebp - 0x3034]
push eax
call esi
test eax, eax
je 0x408904
lea ecx, [ebp - 0x2034]
call fcn.00408aff
push dword [ebp + 8]
and dword [ebp - 4], 0
xor bl, bl
call fcn.004095ff
test al, al
jne 0x4088c7
push 9
push dword [ebp + 8]
lea ecx, [ebp - 0x2034]
call fcn.00408c9d
mov bl, al
lea eax, [ebp - 0x3034]
push eax
lea eax, [ebp - 0x1010]
push eax
call esi
test bl, bl
je 0x4088f1
lea ecx, [ebp - 0x2034]
call fcn.00408d97
lea ecx, [ebp - 0x2034]
call fcn.00408de5
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2034]
call fcn.00408fd2
mov al, 1
jmp 0x408906
xor al, al
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
leave
ret 4
Function at 0x408e0e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
mov esi, ecx
cmp dword [ebp + 0xc], ebx
je 0x408efd
cmp dword [esi + 0xc], 1
jne 0x408e32
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push edi
mov dword [ebp - 4], ebx
cmp dword [esi + 0xc], ebx
je 0x408e7d
xor edi, edi
cmp dword [ebp + 0xc], ebx
jbe 0x408e9c
mov ecx, dword [ebp + 0xc]
sub ecx, edi
mov eax, 0x4000
cmp ecx, eax
jae 0x408e52
mov eax, ecx
push ebx
lea ecx, [ebp - 4]
push ecx
push eax
mov eax, dword [ebp + 8]
add eax, edi
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
je 0x408e9c
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x408e42
jmp 0x408e98
push ebx
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WriteFile]
dec eax
neg eax
sbb al, al
inc al
cmp al, bl
jne 0x408ef8
cmp byte [esi + 0x14], bl
je 0x408ef8
cmp dword [esi + 0xc], ebx
jne 0x408ef8
push ebx
lea eax, [esi + 0x1e]
mov edi, 0x42f774
push eax
mov ecx, edi
call fcn.00406690
test al, al
je 0x408eec
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x408e33
cmp eax, ebx
jbe 0x408e33
mov edi, dword [esi]
push ebx
mov ecx, esi
call dword [edi + 0xc]
mov ecx, dword [ebp - 4]
xor ebx, ebx
sub eax, ecx
sbb edx, ebx
push edx
push eax
mov ecx, esi
call dword [edi + 8]
jmp 0x408e33
lea eax, [esi + 0x1e]
push eax
push ebx
mov ecx, edi
call fcn.004067f8
mov byte [esi + 8], 1
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x408ff5
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, ecx
cmp dword [esi + 0xc], 1
push edi
mov edi, 0x4e20
jne 0x40901c
cmp dword [ebp + 0xc], edi
jbe 0x409011
mov dword [ebp + 0xc], edi
push 0xfffffffffffffff6
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov dword [esi + 4], eax
push 0
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x409085
mov ecx, esi
call fcn.00408faf
test al, al
je 0x409052
cmp dword [ebp + 0xc], edi
jbe 0x409052
push edi
push dword [ebp + 8]
mov ecx, esi
call fcn.00408ff5
jmp 0x409088
cmp dword [esi + 0xc], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x409069
call ebx
cmp eax, 0x6d
jne 0x409069
xor eax, eax
jmp 0x409088
cmp dword [esi + 0xc], 0
jne 0x409080
mov edi, 0x8000
cmp dword [ebp + 0xc], edi
jbe 0x409080
call ebx
cmp eax, 0x21
je 0x409045
or eax, 0xffffffff
jmp 0x409088
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8

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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a740
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
push edi
push dword [ebp + 8]
call esi
mov edi, eax
cmp edi, 0xffffffff
jne 0x4093df
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040ab4f
test al, al
je 0x4093df
lea eax, [ebp - 0x1000]
push eax
call esi
mov edi, eax
mov eax, edi
pop edi
pop esi
leave
ret 4
Function at 0x4093e7
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a740
push ebx
push esi
push dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [ebp + 8]
call esi
test eax, eax
setne bl
test bl, bl
jne 0x409436
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040ab4f
test al, al
je 0x409436
push dword [ebp + 0xc]
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
setne bl
pop esi
mov al, bl
pop ebx
leave
ret 8

Function at 0x409623
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0041a740
push esi
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push edi
mov edi, dword [ebp + 8]
push 0
push edi
call esi
test eax, eax
jne 0x409673
push edi
call fcn.004095ff
test al, al
jne 0x409686
push 0x800
lea eax, [ebp - 0x1000]
push eax
push edi
call fcn.0040ab4f
test al, al
je 0x409686
push 0
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
je 0x409686
cmp byte [ebp + 0xc], 0
je 0x409682
push dword [ebp + 0x10]
push edi
call fcn.004093e7
xor eax, eax
jmp 0x40969e
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40969b
cmp eax, 3
je 0x40969b
xor eax, eax
inc eax
jmp 0x40969e
push 2
pop eax
pop edi
pop esi
leave
ret 0xc
Function at 0x4097bc
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1250
call fcn.0041a740
cmp dword [ebp + 8], 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
lea eax, [ebp - 0x250]
mov edi, 0x800
push eax
jne 0x40984b
push dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
call ebx
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
jne 0x409878
push edi
lea eax, [ebp - 0x1250]
push eax
push dword [ebp + 0xc]
call fcn.0040ab4f
test al, al
je 0x409824
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x1250]
push eax
call ebx
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
jne 0x409878
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x40983e
cmp eax, 3
je 0x40983e
cmp eax, 0x12
je 0x40983e
xor eax, eax
inc eax
jmp 0x409840
xor eax, eax
mov byte [esi + 0x1044], al
jmp 0x409943
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x40986e
or dword [ebp + 8], 0xffffffff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x12
setne al
mov byte [esi + 0x1044], al
cmp dword [ebp + 8], 0xffffffff
je 0x409943
push edi
push dword [ebp + 0xc]
push esi
call fcn.00410dc2
push edi
lea eax, [ebp - 0x224]
push eax
push esi
call fcn.0040a805
push 1
push 0
push 0
push dword [ebp - 0x234]
call fcn.0041a820
mov ecx, dword [ebp - 0x230]
xor edi, edi
add eax, ecx
mov dword [esi + 0x1000], eax
mov eax, dword [ebp - 0x250]
mov dword [esi + 0x1008], eax
mov eax, dword [ebp - 0x24c]
mov dword [esi + 0x1028], eax
mov eax, dword [ebp - 0x248]
mov dword [esi + 0x102c], eax
mov eax, dword [ebp - 0x244]
mov dword [esi + 0x1030], eax
mov eax, dword [ebp - 0x240]
mov dword [esi + 0x1034], eax
mov eax, dword [ebp - 0x23c]
mov dword [esi + 0x1038], eax
mov eax, dword [ebp - 0x238]
mov dword [esi + 0x103c], eax
lea eax, [ebp - 0x23c]
adc edx, edi
push eax
lea ecx, [esi + 0x1010]
mov dword [esi + 0x1004], edx
call fcn.004114dd
lea eax, [ebp - 0x24c]
push eax
lea ecx, [esi + 0x1018]
call fcn.004114dd
lea eax, [ebp - 0x244]
push eax
lea ecx, [esi + 0x1020]
call fcn.004114dd
and dword [esi + 0x1040], 0
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 0xc