joyce8/EMBER2024-capa huggingface dataset:
Function at 0x446530
Capabilities:
Write file on windows

Disassembly:
push ebx
sub esp, 0x18
mov dword [esp], 2
lea ebx, [esp + 0x24]
call fcn.004472b0
mov dword [esp + 8], 0x1b
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str.Mingw_w64_runtime_failure:_n
call sub.msvcrt.dll_fwrite
mov dword [esp], 2
call fcn.004472b0
mov edx, dword [esp + 0x20]
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], edx
call sub.msvcrt.dll_vfprintf
call sub.msvcrt.dll_abort
lea esi, [esi]

Function at 0x446590
Capabilities:
Allocate or change rwx memory

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
sub esp, 0x30
mov esi, dword [0x65306c]
test esi, esi
jle 0x4466b0
mov eax, dword [0x653070]
xor ecx, ecx
add eax, 0xc
mov edx, dword [eax]
cmp ebx, edx
jb 0x4465c4
mov edi, dword [eax + 4]
add edx, dword [edi + 8]
cmp ebx, edx
jb 0x446647
add ecx, 1
add eax, 0x14
cmp ecx, esi
jne 0x4465b0
mov dword [esp], ebx
call fcn.00446f90
mov edi, eax
test eax, eax
je 0x4466d7
mov eax, dword [0x653070]
lea ebx, [esi + esi*4]
shl ebx, 2
add eax, ebx
mov dword [eax + 0x10], edi
mov dword [eax], 0
call fcn.004470d0
mov edx, dword [0x653070]
add eax, dword [edi + 0xc]
mov dword [edx + ebx + 0xc], eax
lea edx, [esp + 0x14]
mov dword [esp + 8], 0x1c
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x4466b7
mov eax, dword [esp + 0x28]
lea edx, [eax - 4]
and edx, 0xfffffffb
je 0x446640
lea edx, [eax - 0x40]
and edx, 0xffffffbf
jne 0x446650
add dword [0x65306c], 1
add esp, 0x30
pop ebx
pop esi
pop edi
ret
cmp eax, 2
mov edx, 4
mov eax, 0x40
mov ecx, dword [esp + 0x20]
cmove eax, edx
mov edx, dword [esp + 0x14]
add ebx, dword [0x653070]
mov dword [ebx + 8], ecx
mov dword [ebx + 4], edx
mov dword [esp + 0xc], ebx
mov dword [esp + 8], eax
mov dword [esp + 4], ecx
mov dword [esp], edx
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x446640
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.00446530
lea esi, cs:[esi]
nop
xor esi, esi
jmp 0x4465ce
mov eax, dword [0x653070]
mov eax, dword [eax + ebx + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.00446530
mov dword [esp + 4], ebx
mov dword [esp], str.Address__p_has_no_image_section
call fcn.00446530
lea esi, cs:[esi]
nop
Function at 0x446c00
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x1c
mov dword [esp], 0x653088
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov ebx, dword [0x653080]
sub esp, 4
test ebx, ebx
je 0x446c55
mov ebp, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
lea esi, [esi]
mov eax, dword [ebx]
mov dword [esp], eax
call ebp
mov esi, eax
sub esp, 4
call edi
test esi, esi
je 0x446c4e
test eax, eax
jne 0x446c4e
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x446c30
mov dword [esp], 0x653088
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
add esp, 0x1c
pop ebx
pop esi
pop edi
pop ebp
ret

Function at 0x446f90
Capabilities:
Parse pe header

Disassembly:
xor eax, eax
cmp word [0x400000], 0x5a4d
jne 0x446fb5
mov ecx, dword [0x40003c]
cmp dword [ecx + 0x400000], 0x4550
lea edx, [ecx + 0x400000]
je 0x446fc0
ret
cmp word [ecx + 0x400018], 0x10b
jne 0x446fb5
push esi
movzx eax, word [ecx + 0x400014]
push ebx
movzx esi, word [ecx + 0x400006]
mov ebx, dword [esp + 0xc]
lea eax, [edx + eax + 0x18]
sub ebx, 0x400000
test si, si
je 0x447008
xor ecx, ecx
mov edx, dword [eax + 0xc]
cmp ebx, edx
jb 0x446ffe
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x44700a
add ecx, 1
add eax, 0x28
cmp esi, ecx
jne 0x446ff0
xor eax, eax
pop ebx
pop esi
ret
Function at 0x10001a90
Capabilities:
Set global application hook

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [0x10021004]
sub esp, 0x1c
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
push edi
test eax, eax
je 0x10001aab
push eax
call esi
mov eax, dword [0x10021008]
test eax, eax
je 0x10001ab7
push eax
call esi
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualQuery]
push 0x1c
lea edx, [ebp - 0x1c]
push edx
push 0x100017f0
mov dword [0x10021010], eax
mov dword [section..SHARED], ecx
call esi
mov edi, dword [ebp + 8]
mov ebx, dword [sym.imp.USER32.dll_SetWindowsHookExW]
neg eax
sbb eax, eax
and eax, dword [ebp - 0x18]
push 0
push eax
push 0x100017f0
push edi
call ebx
mov dword [0x10021004], eax
push 0x1c
lea eax, [ebp - 0x1c]
push eax
push 0x10001a70
call esi
neg eax
sbb eax, eax
and eax, dword [ebp - 0x18]
push 0
push eax
push 0x10001a70
push 3
call ebx
cmp dword [0x10021004], 0
mov dword [0x1002100c], edi
pop edi
pop esi
mov dword [0x10021008], eax
pop ebx
jne 0x10001b3c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10004796
Capabilities:
Enumerate pe sections

Disassembly:
mov ecx, dword [esp + 8]
push esi
push edi
xor edi, edi
movzx eax, word [ecx + 0x14]
movzx esi, word [ecx + 6]
test esi, esi
lea eax, [eax + ecx + 0x18]
jbe 0x100047d1
mov ecx, dword [eax + 8]
test ecx, ecx
jne 0x100047b8
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0xc]
cmp dword [esp + 0xc], edx
jb 0x100047c9
add edx, ecx
cmp dword [esp + 0xc], edx
jb 0x100047d3
inc edi
add eax, 0x28
cmp edi, esi
jb 0x100047ae
xor eax, eax
pop edi
pop esi
ret
Function at 0x1000565f
Capabilities:
Contain obfuscated stackstrings

Disassembly:
add byte [edx + 0x40], ch
pop ecx
xor eax, eax
lea edi, [ebp - 0x503]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
call fcn.10004734
or byte [eax + 0x2ff845c6], ah
mov byte [ebp - 0x24], 0x34
and byte [ebp - 0x36c], 0
and byte [ebp - 0x36b], 0
mov byte [ebp - 0x36a], 0xaa
and byte [ebp - 0x369], 0
mov byte [ebp - 0x368], 0x12
mov byte [ebp - 0x367], 0x30
mov byte [ebp - 0x366], 0x21
mov byte [ebp - 0x365], 6
mov byte [ebp - 0x364], 0x2c
mov byte [ebp - 0x363], 0x26
mov byte [ebp - 0x362], 0x21
mov byte [ebp - 0x361], 0x30
mov byte [ebp - 0x360], 0x38
mov byte [ebp - 0x35f], 0x11
mov byte [ebp - 0x35e], 0x3c
mov byte [ebp - 0x35d], 0x27
mov byte [ebp - 0x35c], 0x30
mov byte [ebp - 0x35b], 0x36
mov byte [ebp - 0x35a], 0x21
mov byte [ebp - 0x359], 0x3a
mov byte [ebp - 0x358], 0x27
mov byte [ebp - 0x357], 0x2c
mov byte [ebp - 0x356], 0x14
invalid
invalid
stosd dword es:[edi], eax

Function at 0x10005bf4
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x723], 0x5c
mov byte [ebp - 0x722], 0x51
mov byte [ebp - 0x721], 0x6d
mov byte [ebp - 0x720], 0x4f
mov byte [ebp - 0x71f], 0x52
invalid
test edx, esp
clc
invalid
Function at 0x100120eb
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1001d3ec]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.1000a80c
and dword [ebp - 0x14], 0
cmp dword [0x1001f638], 0
mov dword [ebp - 0x18], eax
jne 0x1001219e
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x10012246
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x10012246
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x1001f638], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x1001f63c], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x1001f640], eax
call edi
push eax
call esi
mov dword [0x1001f648], eax
test eax, eax
je 0x1001219e
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x1001f644], eax
mov eax, dword [0x1001f644]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x100121f7
cmp dword [0x1001f648], ecx
je 0x100121f7
push eax
call esi
push dword [0x1001f648]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x100121f7
test ebx, ebx
je 0x100121f7
call edi
test eax, eax
je 0x100121ee
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x100121ee
test byte [ebp - 8], 1
jne 0x100121f7
or dword [ebp + 0x10], 0x200000
jmp 0x1001222a
mov eax, dword [0x1001f63c]
cmp eax, dword [ebp - 0x18]
je 0x1001222a
push eax
call esi
test eax, eax
je 0x1001222a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x1001222a
mov eax, dword [0x1001f640]
cmp eax, dword [ebp - 0x18]
je 0x1001222a
push eax
call esi
test eax, eax
je 0x1001222a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x1001f638]
call esi
test eax, eax
je 0x10012246
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x10012248
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100062d2
leave
ret
Function at 0x406730
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov edi, edx
mov ebx, ecx
mov eax, edi
shr eax, 4
inc eax
push 6
movzx eax, ax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x40675a
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x406772
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x406767
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x4067a3
cmp esi, ecx
jae 0x406767
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edi, 1
jne 0x406791
cmp esi, ecx
jae 0x406767
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x4067c0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
push dword [ebp + 8]
mov edi, edx
mov ebx, ecx
mov eax, edi
shr eax, 4
inc eax
movzx eax, ax
push eax
push 6
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov dword [ebp - 4], eax
test eax, eax
jne 0x4067ed
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push esi
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x406805
xor esi, esi
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x4067fa
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
lea ecx, [esi + eax]
and edi, 0xf
jbe 0x406836
cmp esi, ecx
jae 0x4067fa
movzx eax, word [esi]
lea esi, [esi + eax*2]
add esi, 2
sub edi, 1
jne 0x406824
cmp esi, ecx
jae 0x4067fa
xor eax, eax
cmp word [esi], ax
cmove esi, eax
mov eax, esi
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d050
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
test edx, edx
jne 0x40d05b
xor eax, eax
pop ebp
ret
push esi
mov esi, dword [ebp + 8]
not ecx
cmp esi, 8
jb 0x40d117
push edi
mov edi, esi
shr edi, 3
movzx eax, byte [edx]
sub esi, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 2]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 3]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 4]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 5]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 6]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
movzx eax, byte [edx + 7]
add edx, 8
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
sub edi, 1
jne 0x40d070
pop edi
test esi, esi
je 0x40d13a
nop dword [eax + eax]
movzx eax, byte [edx]
lea edx, [edx + 1]
xor eax, ecx
shr ecx, 8
movzx eax, al
xor ecx, dword [eax*4 + 0x6216e0]
sub esi, 1
jne 0x40d120
not ecx
mov eax, ecx
pop esi
pop ebp
ret

Function at 0x40d920
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, ecx
mov ebx, edx
push edi
mov dword [ebp - 8], ebx
mov edi, 1
cmp byte [esi], 0
je 0x40d95b
push 0
lea eax, [ebp - 8]
push eax
push edi
lea eax, [ebp - 1]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40d956
mov byte [esi + 8], 1
mov edi, dword [ebp - 8]
jmp 0x40d988
mov ebx, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
lea eax, [ebx + 1]
cmp eax, ecx
jbe 0x40d96c
mov edi, ecx
sub edi, ebx
mov eax, dword [esi + 0x10]
add eax, ebx
push edi
push eax
lea eax, [ebp - 1]
push eax
call fcn.004d0380
lea eax, [ebx + edi]
add esp, 0xc
mov ebx, dword [ebp - 8]
mov dword [esi + 0x18], eax
cmp edi, 1
jne 0x40d99c
movzx eax, byte [ebp - 1]
mov dword [ebx], eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
cmp byte [esi], 0
je 0x40d993
cmp byte [esi + 8], 0
je 0x40d993
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40da60
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
mov ebx, ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push edi
cmp byte [ebx], 0
je 0x40daa9
cmp byte [ebx + 1], 0
je 0x40dadc
push 2
push 0
push 0
push dword [ebx + 4]
call esi
cmp byte [ebx], 0
je 0x40daaf
cmp byte [ebx + 1], 0
je 0x40daa2
push 1
push 0
push 0
push dword [ebx + 4]
call esi
sub eax, dword [ebx + 0xc]
jmp 0x40dab2
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x40dac1
mov eax, dword [ebx + 0x14]
mov dword [ebx + 0x18], eax
mov eax, dword [ebx + 0x18]
mov esi, 0xffff
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], esi
cmp eax, esi
jae 0x40dac6
mov esi, eax
mov dword [ebp - 0xc], eax
push 0x404
call fcn.004d8656
mov edi, eax
add esp, 4
mov dword [ebp - 8], edi
test edi, edi
jne 0x40dae5
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 4
mov dword [ebp - 0x10], 0
cmp esi, eax
jbe 0x40dbfb
nop dword [eax]
mov edx, dword [ebp - 4]
add eax, 0x400
cmp eax, esi
mov ecx, esi
cmovbe ecx, eax
mov eax, 0x404
sub edx, ecx
mov dword [ebp - 0x20], ecx
cmp ecx, 0x404
mov dword [ebp - 0x1c], edx
mov esi, ecx
cmova esi, eax
cmp byte [ebx], 0
mov dword [ebp - 0x18], esi
je 0x40db71
cmp byte [ebx + 1], 0
je 0x40dbfb
mov eax, dword [ebx + 0xc]
push 0
push 0
add eax, edx
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp byte [ebx], 0
mov edx, esi
je 0x40db76
push 0
lea eax, [ebp - 0x14]
push eax
push esi
push edi
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40db6c
mov byte [ebx + 8], 1
mov eax, dword [ebp - 0x14]
jmp 0x40dba7
mov dword [ebx + 0x18], edx
mov edx, esi
mov edi, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x10]
lea eax, [edi + esi]
mov esi, dword [ebx + 0x14]
sub esi, edi
cmp eax, dword [ebx + 0x14]
cmovbe esi, edx
add ecx, edi
push esi
push ecx
push dword [ebp - 8]
call fcn.004d0380
lea ecx, [esi + edi]
mov eax, esi
mov esi, dword [ebp - 0x18]
add esp, 0xc
mov edi, dword [ebp - 8]
mov dword [ebx + 0x18], ecx
xor edx, edx
div esi
cmp eax, 1
jne 0x40dbfb
lea ecx, [esi - 3]
test ecx, ecx
jle 0x40dbed
lea eax, [edi + 3]
add eax, ecx
nop dword [eax]
mov edx, ecx
lea eax, [eax - 1]
dec ecx
cmp byte [eax - 3], 0x50
jne 0x40dbdd
cmp byte [edx + edi], 0x4b
jne 0x40dbdd
cmp byte [eax - 1], 5
jne 0x40dbdd
cmp byte [eax], 6
je 0x40dbe3
test ecx, ecx
jg 0x40dbc0
jmp 0x40dbed
mov eax, dword [ebp - 0x1c]
add eax, ecx
mov dword [ebp - 0x10], eax
jne 0x40dbfb
mov eax, dword [ebp - 0x20]
mov esi, dword [ebp - 0xc]
cmp eax, esi
jb 0x40db00
push edi
call fcn.004d2e43
mov eax, dword [ebp - 0x10]
add esp, 4
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40ec30
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx], 0
jne 0x40edcc
cmp dword [ebx + 4], 0xffffffff
jne 0x40edcc
lea edi, [ebx + 0x138]
push edi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
add edi, 0xfffffffe
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x40ec61
mov eax, dword [0x6294f0]
mov dword [edi], eax
mov edi, dword [ebp + 0x10]
cmp edi, 1
jne 0x40ec98
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, edi
je 0x40ecb3
mov eax, 0x2000000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp edi, 2
je 0x40ecb0
cmp edi, 3
je 0x40ecb0
mov eax, 0x10000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [ebp + 8]
mov dword [ebp - 4], 0
mov byte [ebp + 0x13], 0
cmp edi, 1
je 0x40ecf7
cmp edi, 2
jne 0x40ed39
push 0
push 0x80
push 3
push 0
push 1
push closesocket
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 4], eax
cmp eax, 0xffffffff
jne 0x40ed2b
mov eax, 0x200
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 4]
push 2
push 0
push 0
push eax
call esi
push eax
push dword [ebp + 8]
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
jne 0x40ed28
mov eax, 0x100
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
sete byte [ebp + 0x13]
push 0x1c
call fcn.004ce3fc
add esp, 4
mov esi, eax
cmp edi, 1
je 0x40ed85
cmp edi, 2
je 0x40ed85
mov eax, dword [ebp + 8]
mov ecx, esi
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0xc]
mov word [esi], 0x100
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], 0
mov dword [esi + 0xc], 0
call fcn.0040dc10
mov dword [ebx], eax
mov eax, dword [0x64c9dc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov cl, byte [ebp + 0x13]
mov byte [esi], 1
mov byte [esi + 1], cl
mov eax, dword [ebp - 4]
mov dword [esi + 4], eax
mov byte [esi + 8], 0
mov dword [esi + 0xc], 0
test cl, cl
je 0x40edb5
push 1
push 0
push 0
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esi + 0xc], eax
mov ecx, esi
call fcn.0040dc10
mov dword [ebx], eax
mov eax, dword [0x64c9dc]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
pop edi
pop esi
mov eax, 0x1000000
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x40feb0
Capabilities:
Encode data using xor
Encrypt data using aes
Reference aes constants

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x10]
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0040f9c0
add esp, 0xc
test eax, eax
js 0x4100c2
mov eax, dword [esi + 0xf0]
push ebx
push edi
xor ebx, ebx
lea edi, [eax*4]
test edi, edi
jle 0x40ff39
mov eax, dword [ebp + 0x10]
lea esi, [esi + edi*4]
add esi, 8
add eax, 8
nop
mov edx, dword [eax - 8]
lea eax, [eax + 0x10]
mov ecx, dword [esi - 8]
lea esi, [esi - 0x10]
mov dword [eax - 0x18], ecx
add ebx, 4
mov ecx, dword [esi + 0xc]
sub edi, 4
mov dword [esi + 8], edx
mov edx, dword [eax - 0x14]
mov dword [eax - 0x14], ecx
mov ecx, dword [esi + 0x10]
mov dword [esi + 0xc], edx
mov edx, dword [eax - 0x10]
mov dword [eax - 0x10], ecx
mov ecx, dword [esi + 0x14]
mov dword [esi + 0x10], edx
mov edx, dword [eax - 0xc]
mov dword [eax - 0xc], ecx
mov dword [esi + 0x14], edx
cmp ebx, edi
jl 0x40fef0
mov esi, dword [ebp + 0x10]
mov eax, dword [esi + 0xf0]
mov ebx, 1
cmp eax, ebx
jle 0x4100be
lea edi, [esi + 4]
nop dword [eax]
movzx eax, byte [edi + 0xd]
lea edi, [edi + 0x10]
mov edx, dword [edi - 4]
inc ebx
movzx ecx, byte [eax*4 + str.cc]
mov eax, edx
shr eax, 0x18
mov ecx, dword [ecx*4 + 0x622e78]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x623778]
movzx eax, byte [edi - 2]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x623278]
movzx eax, dl
mov edx, dword [edi]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x6247a0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [edi - 4], ecx
movzx ecx, byte [eax*4 + str.cc]
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x623278]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x622e78]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x623778]
movzx eax, dl
mov edx, dword [edi + 4]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x6247a0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [edi], ecx
movzx ecx, byte [eax*4 + str.cc]
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x623278]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x622e78]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x623778]
movzx eax, dl
mov edx, dword [edi + 8]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x6247a0]
mov eax, edx
shr eax, 0x10
movzx eax, al
mov dword [edi + 4], ecx
movzx ecx, byte [eax*4 + str.cc]
mov eax, edx
shr eax, 8
movzx eax, al
mov ecx, dword [ecx*4 + 0x623278]
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x622e78]
mov eax, edx
shr eax, 0x18
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x623778]
movzx eax, dl
movzx eax, byte [eax*4 + str.cc]
xor ecx, dword [eax*4 + 0x6247a0]
mov dword [edi + 8], ecx
cmp ebx, dword [esi + 0xf0]
jl 0x40ff50
pop edi
xor eax, eax
pop ebx
pop esi
pop ebp
ret