joyce8/EMBER2024-capa huggingface dataset:
Function at 0x405016
Capabilities:
Create thread

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
push edi
push ebx
push dword [0x441cd4]
xor ebp, ebp
mov edi, ebp
mov dword [esp + 0x18], ebp
call fcn.0041862e
mov esi, eax
test esi, esi
je 0x4051ab
mov ecx, dword [esi]
mov dword [esp + 0x18], ecx
cmp dword [esi + 0x14], ebp
je 0x4050c0
push ebx
call fcn.00405386
jmp 0x405058
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp byte [esi + 0x1d], 0
jne 0x405050
push dword [esi + 0x14]
call fcn.004054f8
mov eax, dword [esp + 0x1c]
push ebp
push esi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x20], eax
call fcn.00404fa1
pop ecx
pop ecx
lea eax, [esp + 0x1c]
push eax
push ebp
push esi
push 0x4051c5
push 0x2000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x40509d
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x20], 0xffffffff
je 0x4050ae
push dword [esp + 0x20]
push ebx
call fcn.0040545a
mov eax, dword [esi]
push ebp
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [esi]
push 1
jmp 0x405160
test byte [esp + 0x1c], 1
je 0x4050cf
mov dword [esp + 0x10], 1
test byte [esp + 0x1c], 2
je 0x40516a
push esi
call fcn.00404e76
lea eax, [esi + 4]
push 0x10
push eax
call fcn.00418dc5
pop ecx
pop ecx
mov ecx, dword [0x441f28]
mov edi, eax
lea eax, [esp + 0x18]
push eax
push dword [esp + 0x1c]
mov edx, dword [ecx]
push ecx
call dword [edx + 0x14]
test eax, eax
jne 0x4051ab
mov eax, dword [esp + 0x18]
mov dword [edi], eax
mov eax, dword [esp + 0x10]
mov byte [edi + 5], al
mov byte [edi + 4], 1
mov eax, dword [esp + 0x18]
push dword [esi + 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x44]
mov eax, dword [esp + 0x18]
push dword [esi + 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x40]
cmp dword [esp + 0x20], 0xffffffff
je 0x40514b
push edi
push dword [esp + 0x24]
push ebx
call fcn.004053ba
jmp 0x405158
mov eax, dword [esp + 0x18]
push dword [esi + 0x10]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [esp + 0x18]
push dword [esp + 0x10]
mov ecx, dword [eax]
push ebp
push ebp
push eax
call dword [ecx + 0x30]
jmp 0x4051ab
mov eax, dword [ecx]
push ecx
call dword [eax + 0x48]
mov eax, dword [esp + 0x18]
push ebp
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
cmp dword [esp + 0x20], 0xffffffff
je 0x40518c
push dword [esp + 0x20]
push ebx
call fcn.0040545a
mov eax, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
push ebx
push ebp
mov ecx, dword [eax]
push ebp
push eax
call dword [ecx + 0x30]
test eax, eax
jne 0x4051ab
xor edi, edi
mov byte [esi + 0x1c], 1
inc edi
mov byte [esi + 0x1e], bl
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 0xc
Function at 0x405fe9
Capabilities:
Log keystrokes

Disassembly:
push 0
push dword [esp + 0xc]
call dword [sym.imp.USER32.DLL_MapVirtualKeyW]
mov ecx, dword [esp + 4]
mov byte [ecx + 0x4423d0], al
ret

Function at 0x406000
Capabilities:
Parse pe header

Disassembly:
cmp dword [0x441ce4], 0
jne 0x40611d
xor eax, eax
mov byte [eax + 0x4423d0], al
inc eax
cmp eax, 0x100
jl 0x40600f
push 0x41
push 0x1e
call fcn.00405fe9
push 0x42
push 0x30
call fcn.00405fe9
push 0x43
push 0x2e
call fcn.00405fe9
push 0x44
push 0x20
call fcn.00405fe9
push 0x45
push 0x12
call fcn.00405fe9
push 0x46
push 0x21
call fcn.00405fe9
push 0x47
push 0x22
call fcn.00405fe9
push 0x48
push 0x23
call fcn.00405fe9
add esp, 0x40
push 0x49
push 0x17
call fcn.00405fe9
push 0x4a
push 0x24
call fcn.00405fe9
push 0x4b
push 0x25
call fcn.00405fe9
push 0x4c
push 0x26
call fcn.00405fe9
push 0x4d
push 0x32
call fcn.00405fe9
push 0x4e
push 0x31
call fcn.00405fe9
push 0x4f
push 0x18
call fcn.00405fe9
push 0x50
push 0x19
call fcn.00405fe9
add esp, 0x40
push 0x51
push 0x10
call fcn.00405fe9
push 0x52
push 0x13
call fcn.00405fe9
push 0x53
push 0x1f
call fcn.00405fe9
push 0x54
push 0x14
call fcn.00405fe9
push 0x55
push 0x16
call fcn.00405fe9
push 0x56
push 0x2f
call fcn.00405fe9
push 0x57
push 0x11
call fcn.00405fe9
push 0x58
push 0x2d
call fcn.00405fe9
add esp, 0x40
push 0x59
push 0x15
call fcn.00405fe9
push 0x5a
push 0x2c
call fcn.00405fe9
add esp, 0x10
mov dword [0x441ce4], 1
mov eax, dword [esp + 4]
cmp dword [0x441cf0], eax
je 0x40616e
mov dword [0x441cf0], eax
not al
movsx eax, al
and eax, 2
shl eax, 3
or eax, 6
mov dword [0x44061c], eax
mov eax, dword [0x441ce8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x20]
mov eax, dword [0x441ce8]
push dword [0x44061c]
push dword [0x441f38]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x34]
mov eax, dword [0x441ce8]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
ret 4

Function at 0x407348
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, 0x3e8
mov ebp, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov eax, edi
cdq
idiv dword [0x441edc]
mov esi, eax
lea eax, [esp + 0x10]
push eax
call ebp
mov edx, dword [esp + 0x10]
sub edx, dword [0x442654]
mov ecx, dword [esp + 0x14]
sbb ecx, dword [0x442658]
push 0
push edi
push ecx
push edx
call fcn.00404160
push dword [0x442660]
push dword [0x44265c]
push edx
push eax
call fcn.004041a0
mov edi, eax
mov ecx, edx
mov eax, esi
cdq
sub eax, edi
sbb edx, ecx
mov dword [esp + 0x1c], edx
js 0x4073e2
jg 0x4073b5
cmp eax, 2
jbe 0x4073e2
sub esi, edi
sub esi, 2
push esi
call fcn.00409752
jmp 0x4073e2
mov eax, dword [0x442664]
mov ebx, esi
sub ebx, dword [0x442654]
mov ecx, edi
cdq
sbb ecx, dword [0x442658]
cmp ecx, edx
jg 0x4073f5
jl 0x4073e2
cmp ebx, eax
ja 0x4073f5
lea eax, [esp + 0x10]
push eax
call ebp
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x10]
test eax, eax
jne 0x4073c2
mov dword [0x442658], edi
pop edi
mov dword [0x442654], esi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
Function at 0x4074dc
Capabilities:
Get file size
Read file on windows

Disassembly:
push ecx
push ebx
push esi
push edi
xor edi, edi
push edi
push pe_nt_image_headers32
push 3
push edi
push 1
push 0x80000000
push dword [esp + 0x30]
mov ebx, edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x407568
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebp, eax
push ebp
push edi
push dword [0x441be0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x407560
push ebx
lea eax, [esp + 0x14]
push eax
push ebp
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x407551
cmp dword [esp + 0x10], ebp
jne 0x407551
push dword [esp + 0x1c]
push dword [esp + 0x24]
push edi
push dword [esp + 0x24]
call fcn.0040758a
mov ebx, eax
push edi
push 0
push dword [0x441be0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop edi
pop esi
mov eax, ebx
pop ebx
pop ecx
ret 0xc

Function at 0x409e34
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x409f7c
xor ecx, ecx
cmp word [eax], cx
je 0x409f7c
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x409e8d
cmp eax, 3
jne 0x409ec7
cmp word [esp + 0xa], 0x3a
jne 0x409ec7
cmp eax, 2
jne 0x409eab
lea eax, [esp + 8]
push 0x42f24c
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x409f7c
push 0xfffffffffffffffe
pop edi
jmp 0x409f7c
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x409edc
cmp ax, bx
jne 0x409ee6
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x409ecf
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x409f25
test byte [esp + 0x21c], 0x10
je 0x409f0c
push 0xfffffffffffffffe
pop edi
jmp 0x409f1c
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x409f7a
cmp word [esp + 0x10], bp
jne 0x409f33
cmp word [esp + 0x12], bp
je 0x409f52
cmp word [esp + 0x10], bx
jne 0x409f41
cmp word [esp + 0x12], bx
je 0x409f52
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x409f7a
cmp word [esp + 0x12], ax
jne 0x409f7a
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x409f67
test al, 0x10
je 0x409f7a
jmp 0x409f77
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x409f7a
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4
Function at 0x40a010
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x40a04c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x40a450
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x441be0]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x40a5d4
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x40a49e
test ebp, ebp
je 0x40a540
dec ebp
cmp dword [ebx + 4], 0
je 0x40a4b7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a900
mov dword [esp + 0x14], eax
jmp 0x40a4d1
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x40a540
test cl, cl
je 0x40a4e5
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x40a520
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x441be0]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x40a540
cmp dword [esp + 0x2c], 0
jne 0x40a490
cmp cl, 0xd
je 0x40a547
cmp cl, 0xa
jne 0x40a490
dec esi
jmp 0x40a5b7
cmp dword [esp + 0x2c], 0
jne 0x40a5b7
cmp cl, 0xa
jne 0x40a54f
dec esi
jmp 0x40a5b7
cmp cl, 0xd
jne 0x40a5b7
dec esi
cmp dword [ebx + 4], 0
je 0x40a56e
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.0040a900
mov dword [esp + 0x14], eax
jmp 0x40a584
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40a5b7
cmp dword [ebx + 4], 0
je 0x40a596
inc dword [ebx + 0xc]
jmp 0x40a5b7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x40a5e0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x18
push 0x1000
push 0
push dword [0x441be0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ecx, eax
mov dword [esp + 8], ecx
test ecx, ecx
je 0x40a78d
mov ax, word [esp]
push ebx
mov ebx, dword [esp + 0x20]
push ebp
mov ebp, dword [esp + 0x2c]
push esi
push edi
mov edi, ecx
mov dword [esp + 0x20], 0x1000
mov dword [esp + 0x1c], 0x7ff
cmp ebp, 0xffffffff
je 0x40a634
test ebp, ebp
je 0x40a6ed
dec ebp
cmp dword [ebx + 4], 0
je 0x40a64d
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0040a900
mov dword [esp + 0x14], eax
jmp 0x40a667
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
cmp eax, 2
mov ax, word [esp + 0x10]
jne 0x40a6ed
test ax, ax
je 0x40a681
mov word [edi], ax
add edi, 2
mov ax, word [esp + 0x10]
mov ecx, dword [esp + 0x18]
mov esi, edi
mov edx, dword [esp + 0x1c]
sub esi, ecx
sar esi, 1
cmp esi, edx
jle 0x40a6c8
mov eax, dword [esp + 0x20]
add edx, 0x800
add eax, 0x1000
mov dword [esp + 0x1c], edx
push eax
push ecx
push 8
push dword [0x441be0]
mov dword [esp + 0x30], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
mov ax, word [esp + 0x10]
mov dword [esp + 0x18], ecx
lea edi, [ecx + esi*2]
test ax, ax
je 0x40a6ed
cmp dword [esp + 0x30], 0
jne 0x40a626
cmp ax, 0xd
je 0x40a6f4
cmp ax, 0xa
jne 0x40a626
sub edi, 2
jmp 0x40a76c
cmp dword [esp + 0x30], 0
jne 0x40a76c
cmp ax, 0xa
jne 0x40a6ff
sub edi, 2
jmp 0x40a76c
cmp ax, 0xd
jne 0x40a76c
sub edi, 2
cmp dword [ebx + 4], 0
je 0x40a721
push 2
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.0040a900
mov dword [esp + 0x14], eax
jmp 0x40a737
push 0
lea eax, [esp + 0x18]
push eax
push 2
lea eax, [esp + 0x1c]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp word [esp + 0x10], 0xa
je 0x40a76c
cmp dword [ebx + 4], 0
je 0x40a74b
add dword [ebx + 0xc], 2
jmp 0x40a76c
push 1
lea eax, [esp + 0x28]
mov dword [esp + 0x24], 0xfffffffe
push eax
push 0xfffffffffffffffe
push dword [ebx]
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x38]
mov ecx, edi
sub ecx, dword [esp + 0x18]
sar ecx, 1
mov dword [eax], ecx
xor eax, eax
mov word [edi], ax
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 0x10
xor eax, eax
add esp, 0x18
ret 0x10
Function at 0x40a7a0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x441be0]
mov dword [esp + 0x10], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0xc], edx
test edx, edx
je 0x40a8f0
mov eax, dword [esp + 0x1c]
mov cl, byte [esp + 3]
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
push edi
mov edi, dword [esp + 0x30]
mov esi, edx
cmp edi, 0xffffffff
je 0x40a7ec
test edi, edi
je 0x40a85d
dec edi
push esi
push ebp
call fcn.0040aa20
mov dword [esp + 0x20], eax
test eax, eax
jne 0x40a7ff
xor cl, cl
jmp 0x40a801
mov cl, byte [esi]
mov edx, dword [esp + 0x1c]
add esi, eax
mov eax, dword [esp + 0x14]
mov ebx, esi
sub ebx, edx
mov byte [esp + 0x13], cl
add eax, 0xfffffffb
cmp ebx, eax
jle 0x40a844
mov eax, dword [esp + 0x14]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x441be0]
mov dword [esp + 0x24], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x1c], edx
lea esi, [ebx + edx]
mov eax, dword [esp + 0x2c]
test cl, cl
je 0x40a85d
test eax, eax
jne 0x40a7e2
cmp cl, 0xd
je 0x40a861
cmp cl, 0xa
jne 0x40a7e2
dec esi
jmp 0x40a8d3
test eax, eax
jne 0x40a8d3
cmp cl, 0xa
jne 0x40a869
dec esi
jmp 0x40a8d3
cmp cl, 0xd
jne 0x40a8d3
dec esi
cmp dword [ebp + 4], 0
je 0x40a888
push 1
lea eax, [esp + 0x17]
push eax
push ebp
call fcn.0040a900
mov dword [esp + 0x20], eax
jmp 0x40a89f
push 0
lea eax, [esp + 0x24]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x40a8d3
cmp dword [ebp + 4], 0
je 0x40a8b1
inc dword [ebp + 0xc]
jmp 0x40a8d3
push 1
lea eax, [esp + 0x1c]
mov dword [esp + 0x18], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebp]
mov dword [esp + 0x28], 0xffffffff
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x1c]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x18]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10
Function at 0x40a900
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x40a921
push esi
call fcn.0040a010
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x40a995
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x40a982
dec ecx
je 0x40a96d
sub ecx, 2
je 0x40a95a
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x40a9da
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x40a9fb
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x40aa20
Capabilities:
Read file on windows

Disassembly:
push ecx
push edi
mov edi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [edi + 4], 0
je 0x40aa47
push 1
lea eax, [esp + 0x10]
push eax
push edi
call fcn.0040a900
mov dword [esp + 4], eax
jmp 0x40aa61
push 0
lea eax, [esp + 8]
push eax
push 1
lea eax, [esp + 0x18]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 4]
cmp eax, 1
je 0x40aa6d
xor eax, eax
pop edi
pop ecx
ret 8
mov cl, byte [esp + 0xc]
test cl, cl
js 0x40aa89
mov eax, dword [esp + 0x10]
pop edi
mov byte [eax], cl
mov byte [eax + 1], 0
mov eax, 1
pop ecx
ret 8
mov al, cl
and al, 0xe0
push esi
cmp al, 0xc0
jne 0x40aa99
mov esi, 2
jmp 0x40aab5
mov al, cl
and al, 0xf0
cmp al, 0xe0
jne 0x40aaa8
mov esi, 3
jmp 0x40aab5
mov al, cl
and al, 0xf8
cmp al, 0xf0
jne 0x40ab12
mov esi, 4
mov edx, dword [esp + 0x14]
mov byte [edx], cl
cmp dword [edi + 4], 0
je 0x40aae4
lea eax, [esi - 1]
push eax
lea eax, [edx + 1]
push eax
push edi
call fcn.0040a900
mov edx, eax
lea ecx, [esi - 1]
xor eax, eax
cmp edx, ecx
setne al
dec eax
and eax, esi
pop esi
pop edi
pop ecx
ret 8
push 0
lea eax, [esp + 0xc]
push eax
lea eax, [esi - 1]
push eax
lea eax, [edx + 1]
push eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, dword [esp + 8]
lea ecx, [esi - 1]
xor eax, eax
cmp edx, ecx
setne al
dec eax
and eax, esi
pop esi
pop edi
pop ecx
ret 8
mov eax, dword [esp + 0x14]
pop esi
pop edi
mov word [eax], 0x3f
mov eax, 1
pop ecx
ret 8

Function at 0x40b10f
Capabilities:
Set thread local storage value

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
xor ebx, ebx
push edi
mov edi, ebx
test esi, esi
je 0x40b16c
push esi
call dword [esi + 0x58]
mov ecx, dword [esi + 0x80]
mov edi, eax
mov dword [esi + 0x94], ecx
mov ecx, dword [esi + 0x84]
mov dword [esi + 0x98], ecx
test edi, edi
jne 0x40b16c
mov eax, dword [esi + 0x70]
test eax, eax
je 0x40b14b
push ebx
push esi
call eax
push esi
push ebx
push dword [0x441be0]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push ebx
push dword [0x4426ec]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [0x4426f0], ebx
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x40b36e
Capabilities:
Set thread local storage value

Disassembly:
push esi
push 0x184
push 8
push dword [0x441be0]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
push esi
push dword [0x4426ec]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push dword [esp + 8]
mov dword [0x4426f0], esi
and dword [esi + 0xa8], 0
or dword [esi + 0xac], 0xffffffff
or dword [esi + 0xb0], 0xffffffff
push esi
mov dword [esi + 0xa4], 0xffffff
mov dword [esi + 0x74], 2
mov dword [esi + 0x78], 0x3f
call fcn.0040df6a
mov dword [esi + 0x58], 0x40bf81
mov eax, esi
mov dword [esi + 0x5c], 0x40bfcd
mov dword [esi + 0x10], fcn.0040bb22
mov dword [esi + 0x30], 0x40ba14
mov dword [esi + 0x64], 0x40c057
mov dword [esi + 0x60], 0x40c00f
mov dword [esi + 0x34], 0x40b6c4
mov dword [esi + 0x24], 0x40b69b
mov dword [esi + 0x28], 0x40b670
mov dword [esi + 0x2c], 0x40b5c2
mov dword [esi + 0x44], 0x40bd87
pop esi
ret 4
Function at 0x4111fe
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ecx
mov edx, dword [esp + 0x2c]
push esi
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xd4]
mov dword [esp + 4], eax
test edx, edx
je 0x4112b4
imul eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
imul ecx, dword [esp + 0x28]
push ebx
mov ebx, dword [esp + 0x24]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x1c]
neg eax
add ecx, dword [esp + 0x18]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x28]
push ebp
push edi
lea edi, [ecx + eax*4]
mov eax, dword [esp + 0x28]
mov ecx, dword [esi + 0xcc]
mov ebp, edi
imul ecx, ebx
add ecx, dword [esi + 0xc8]
add ecx, eax
cmp dword [esp + 0x38], 0
jle 0x411294
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x10]
mov al, byte [ebp + 2]
xor byte [ecx + 2], al
mov al, byte [ebp + 1]
xor byte [ecx + 1], al
mov al, byte [ebp]
lea ebp, [ebp + 4]
xor byte [ecx], al
add ecx, esi
dec edx
jne 0x41126f
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x28]
dec edx
inc ebx
cmp dword [esi + 0xe8], 0
mov dword [esp + 0x3c], edx
jne 0x4112a9
add edi, dword [esp + 0x14]
jmp 0x4112ad
add edi, dword [esp + 0x24]
test edx, edx
jne 0x41124d
pop edi
pop ebp
pop ebx
pop esi
pop ecx
pop ecx
ret 0x24

Function at 0x4115bf
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ecx
push ecx
imul edx, dword [esp + 0x28], 3
push ebx
mov ebx, dword [esp + 0x30]
mov dword [esp + 8], edx
test ebx, ebx
je 0x411699
imul eax, dword [esp + 0x1c], 3
mov ecx, dword [esp + 0x18]
push ebp
mov ebp, dword [esp + 0x24]
neg ecx
push esi
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x20]
imul eax, dword [esp + 0x30]
push edi
imul edi, dword [esp + 0x30], 3
mov dword [esp + 0x10], ecx
add eax, dword [esp + 0x20]
add edi, eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x38], edi
mov esi, dword [eax + 0xcc]
imul esi, ebp
mov dword [esp + 0x34], edi
add esi, dword [eax + 0xc8]
add esi, dword [esp + 0x28]
test edx, edx
jle 0x41166f
mov ebp, dword [esp + 0x34]
mov ebx, 0xff
sub ebx, dword [esp + 0x40]
mov edi, edx
movzx eax, byte [esi]
movzx ecx, byte [ebp]
imul ecx, dword [esp + 0x40]
imul eax, ebx
add eax, ecx
mov ecx, 0xff
cdq
idiv ecx
inc ebp
mov byte [esi], al
inc esi
dec edi
jne 0x411637
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov ebp, dword [esp + 0x2c]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
dec ebx
inc ebp
cmp dword [eax + 0xe8], 0
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x2c], ebp
jne 0x411686
add edi, ecx
jmp 0x41168a
add edi, dword [esp + 0x24]
mov dword [esp + 0x38], edi
test ebx, ebx
jne 0x41160d
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret 0x28