joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40aa5b
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x3c
mov eax, dword [0x41a004]
xor eax, esp
mov dword [esp + 0x38], eax
push esi
mov esi, dword [ebp + 8]
push 0x4074dc
push 0x4074f8
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40aa95
push 0x800
call eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
lea ecx, [esp + 0xc]
call fcn.00409cb0
push esi
lea ecx, [esp + 0x24]
call fcn.0040921b
lea ecx, [esp + 0x20]
call fcn.004095c7
mov esi, eax
test esi, esi
jns 0x40aae9
lea ecx, [esp + 8]
call fcn.0040a9d0
test al, al
je 0x40ab33
cmp esi, 0x80040b00
jne 0x40ab33
lea ecx, [esp + 0x20]
call fcn.00409683
mov esi, eax
test esi, esi
js 0x40ab33
mov esi, 0x80040b02
jmp 0x40ab33
cmp dword [esp + 0x1c], 8
lea esi, [esp + 8]
jb 0x40aaf8
mov esi, dword [esp + 8]
push 0x406f80
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x40ab2b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
je 0x40ab24
jle 0x40ab33
movzx esi, si
or esi, 0x80070000
jmp 0x40ab33
mov esi, 0x80004005
jmp 0x40ab33
push dword [ebp + 0x14]
push esi
call eax
mov esi, eax
lea ecx, [esp + 0x20]
call fcn.004092b7
lea ecx, [esp + 8]
call fcn.00409da9
mov ecx, dword [esp + 0x3c]
mov eax, esi
pop esi
xor ecx, esp
call fcn.0040b187
mov esp, ebp
pop ebp
ret 0x10

Function at 0x414fee
Capabilities:
Inspect section memory permissions

Disassembly:
and ecx, 0xfff
mov edx, esi
sub edx, dword [edi + 0x34]
add ecx, esi
add ecx, dword [eax]
add dword [ecx], edx
jmp 0x415009

Function at 0x41501a
Capabilities:
Inspect section memory permissions

Disassembly:
cmp dword [eax], ebx
je 0x41501c
mov edx, dword [eax + 4]
lea ecx, [eax + 8]
add edx, eax
mov dword [ebp + 8], ecx
cmp ecx, edx
jae 0x415017
mov ecx, dword [ebp + 8]
movzx ecx, word [ecx]
mov edx, ecx
and edx, 0xf000
cmp edx, 0x3000
jne 0x415001
cmp edx, ebx
jne 0x415157
mov ecx, dword [eax + 4]
add dword [ebp + 8], 2
add ecx, eax
cmp dword [ebp + 8], ecx
jb 0x414fd8
add eax, dword [eax + 4]
jmp 0x414fc5
mov dword [ebp + 0xc], ebx
jmp 0x415027
mov edi, dword [ebp - 0x88]
mov eax, dword [ebp + 0xc]
cmp ax, word [edi + 6]
jne 0x41503f
mov edx, dword [ebp - 0xb4]
xor ecx, ecx
mov edi, 0x60000000
jmp 0x41505d
movzx eax, ax
lea eax, [eax + eax*4]
mov ecx, dword [edi + eax*8 + 0x104]
invalid
Function at 0x10005c10
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
push esi
and esp, 0xfffffff8
sub esp, 0xa8
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov edx, dword [esp + 0x94]
mov dword [esp + 0x9c], 0
mov dword [esp + 0x98], 0x1553db4c
mov esi, dword [esp + 0x9c]
mov edi, dword [esp + 0x98]
mov ebx, edi
add ebx, 0x2d9b13c6
mov dword [esp + 0x38], eax
mov eax, esi
adc eax, 0
mov dword [esp + 0x6c], eax
mov dword [esp + 0x68], ebx
mov eax, dword [esp + 0x6c]
mov ebx, dword [esp + 0x68]
mov dword [esp + 0x34], esi
mov si, word [esp + 0x84]
not si
mov word [esp + 0x84], si
mov esi, edi
xor esi, 0x6f00706e
sub ebx, esi
mov esi, dword [esp + 0x34]
sbb eax, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x20], eax
jb 0x10005d20
jmp 0x10005cb0
lea eax, [esp + 0x78]
xor ecx, ecx
lea edx, [esp + 0x3c]
mov bl, 0x67
mov esi, dword [esp + 0x30]
mov dword [esp + 0x88], esi
mov edi, dword [esp + 0x34]
mov dword [esp + 0x8c], edi
mov dword [esp + 0x3c], 0
sub bl, byte [esp + 0x87]
mov byte [esp + 0x87], bl
mov esi, dword [esp + 0x64]
mov edi, dword [esp + 0x80]
mov dword [esp], edi
mov dword [esp + 4], eax
mov dword [esp + 8], 0
mov dword [esp + 0xc], edx
mov dword [esp + 0x1c], ecx
call esi
sub esp, 0x10
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x3c]
mov dword [esp + 0x40], eax
jmp 0x10005e33
lea eax, [esp + 0x44]
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x80], ecx
mov dword [esp], eax
call fcn.100059f0
lea ecx, [0x10025567]
mov edx, 0x18
lea esi, [esp + 0x44]
mov dword [esp], esi
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x18
mov byte [esp + 0x1b], al
mov dword [esp + 0x14], edx
call fcn.10005a50
lea ecx, [esp + 0x44]
mov dword [esp], ecx
call fcn.10005e60
mov dword [esp + 0x64], eax
cmp dword [esp + 0x64], 0
je 0x10005e23
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x88], 0xbb1fd1f
mov dword [esp + 0x8c], 0
mov dword [esp + 0x7c], eax
mov eax, dword [esp + 0x34]
not eax
mov ecx, dword [esp + 0x30]
not ecx
mov dword [esp + 0x88], ecx
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x7c]
mov ecx, esp
mov dword [ecx], eax
call fcn.10006830
mov dx, ax
mov dword [esp + 0x8c], 0xffffffff
mov dword [esp + 0x88], 0xd7a548c8
mov word [esp + 0x78], dx
mov word [esp + 0x7a], dx
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0x77ff733d
movzx eax, word [esp + 0x7a]
mov bl, byte [esp + 0x87]
add bl, 0x6d
mov byte [esp + 0x87], bl
cmp eax, 0
jne 0x10005cb0
mov dword [esp + 0x40], 0
jmp 0x10005e33
mov byte [esp + 0x87], 0x13
mov dword [esp + 0x40], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0x4967a9dd
mov eax, dword [esp + 0x40]
lea esp, [ebp - 0xc]
pop esi
pop ebx
pop edi
pop ebp
ret
Function at 0x40279c
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
imul edx, dword [0x40b02c], 0x8088405
inc edx
mov dword [0x40b02c], edx
mul edx
mov eax, edx
ret

Function at 0x4051a4
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff00
push ebx
push esi
mov esi, ecx
mov ebx, dword [ebp + 8]
push pe_nt_image_headers32
lea ecx, [ebp - 0x100]
push ecx
push edx
push eax
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x4051dd
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.00403278
jmp 0x4051e6
mov eax, ebx
mov edx, esi
call fcn.0040322c
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x4051f0
Capabilities:
Get geographical location

Disassembly:
push ebx
push esi
push edi
push ecx
mov ebx, ecx
mov esi, edx
mov edi, eax
push 2
lea eax, [esp + 4]
push eax
push esi
push edi
call sub.kernel32.dll_GetLocaleInfoA
test eax, eax
jle 0x405211
mov al, byte [esp]
jmp 0x405213
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x406728
Capabilities:
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0
push ebx
push esi
push edi
mov ebx, eax
xor eax, eax
push ebp
push 0x406770
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 4]
mov eax, ebx
call fcn.004066dc
mov eax, dword [ebp - 4]
call fcn.00403444
push eax
call sub.kernel32.dll_GetFileAttributesA
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406777
lea eax, [ebp - 4]
call fcn.00403198
ret

Function at 0x4067f4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
mov esi, eax
call sub.kernel32.dll_GetCommandLineA_1
mov ebx, eax
xor eax, eax
mov dl, byte [ebx]
sub dl, 1
jb 0x406820
sub dl, 0x1f
je 0x406818
sub dl, 2
je 0x406814
jmp 0x40681c
xor al, 1
jmp 0x40681c
test al, al
je 0x406820
inc ebx
jmp 0x406801
inc ebx
cmp byte [ebx], 0x20
je 0x40681f
mov eax, esi
mov edx, ebx
call fcn.004032c4
pop esi
pop ebx
ret

Function at 0x406a0c
Capabilities:
Get common file path

Disassembly:
push ebx
add esp, 0xfffffefc
mov ebx, eax
push 0x104
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetWindowsDirectoryA
mov edx, ebx
mov eax, esp
call fcn.00404d78
add esp, 0x104
pop ebx
ret
Function at 0x406b54
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
xor eax, eax
push ebp
push 0x406bfd
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 0xc]
push eax
push 0
lea eax, [ebp - 8]
push eax
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x406be7
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 0xc]
je 0x406ba0
mov eax, dword [ebp - 8]
cmp eax, dword [ebp + 8]
jne 0x406be7
cmp dword [ebp - 0xc], 2
jge 0x406bb2
mov eax, dword [ebp - 4]
call fcn.00403198
mov bl, 1
jmp 0x406be7
mov edx, dword [ebp - 0xc]
dec edx
lea eax, [ebp - 0x10]
call fcn.00403520
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
call fcn.00403450
push eax
push 0
push 0
push edi
push esi
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
jne 0x406be7
mov eax, dword [ebp - 4]
mov edx, dword [ebp - 0x10]
call fcn.004031e8
mov bl, 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x406c04
lea eax, [ebp - 0x10]
call fcn.00403198
ret

Function at 0x4073c8
Capabilities:
Hash data with crc32

Disassembly:
push esi
xor esi, esi
mov ecx, 0x40b55c
mov eax, esi
mov edx, 8
test al, 1
je 0x4073e4
shr eax, 1
xor eax, 0xedb88320
jmp 0x4073e6
shr eax, 1
dec edx
jne 0x4073d7
mov dword [ecx], eax
inc esi
add ecx, 4
cmp esi, 0x100
jne 0x4073d0
pop esi
ret

Function at 0x4073fc
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
push edi
mov esi, ecx
mov edi, edx
mov ebx, eax
cmp dword [0x40b558], 0
jne 0x40741f
call fcn.004073c8
push 1
push 0x40b558
call sub.kernel32.dll_InterlockedExchange
mov eax, edi
test esi, esi
je 0x40744a
mov edx, ebx
and dx, 0xff
xor ecx, ecx
mov cl, byte [eax]
xor dx, cx
movzx edx, dx
mov edx, dword [edx*4 + 0x40b55c]
shr ebx, 8
xor edx, ebx
mov ebx, edx
dec esi
inc eax
test esi, esi
jne 0x407425
mov eax, ebx
pop edi
pop esi
pop ebx
ret

Function at 0x408898
Capabilities:
Check for software breakpoints

Disassembly:
push ebx
push esi
push edi
push ebp
push ecx
mov edi, edx
mov esi, eax
cmp edi, 0x50
jle 0x4088b9
mov eax, esi
mov edx, 0x40a1c8
mov ecx, 0x40
call fcn.0040270c
je 0x4088be
call fcn.00408830
mov eax, esi
add eax, 0x40
mov ebx, eax
mov eax, dword [ebx + 4]
mov edx, dword [ebx + 8]
not edx
cmp eax, edx
jne 0x4088dd
cmp edi, eax
jne 0x4088dd
cmp dword [ebx], 0xcc
je 0x4088e2
call fcn.00408830
mov eax, ebx
add eax, 0x10
mov ebp, eax
add esi, dword [ebx + 4]
mov dword [esp], esi
mov edx, dword [esp]
sub edx, ebp
mov eax, ebp
call fcn.00407450
cmp eax, dword [ebx + 0xc]
jne 0x408909
mov eax, dword [esp]
cmp byte [eax - 1], 0
je 0x40890e
call fcn.00408830
mov bl, 0xcc
mov esi, 0x40b95c
cmp ebp, dword [esp]
jb 0x40891f
call fcn.00408830
mov eax, ebp
call fcn.00404cac
mov edi, eax
mov eax, esi
mov ecx, edi
mov edx, ebp
call fcn.00403278
inc edi
add ebp, edi
add esi, 4
dec bl
jne 0x408915
pop edx
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x408b1c
Capabilities:
Shutdown system

Disassembly:
add esp, 0xffffffec
cmp dword [0x40a07c], 2
jne 0x408b89
push esp
push 0x28
call sub.kernel32.dll_GetCurrentProcess
push eax
call sub.advapi32.dll_OpenProcessToken
test eax, eax
jne 0x408b41
call fcn.00408afc
jmp 0x408b9b
lea eax, [esp + 8]
push eax
push 0x408ba0
push 0
call sub.advapi32.dll_LookupPrivilegeValueA
mov dword [esp + 4], 1
mov dword [esp + 0x10], 2
push 0
push 0
push 0
lea eax, [esp + 0x10]
push eax
push 0
mov eax, dword [esp + 0x14]
push eax
call sub.advapi32.dll_AdjustTokenPrivileges
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x408b89
call fcn.00408afc
jmp 0x408b9b
push 0
push 2
call sub.user32.dll_ExitWindowsEx
test eax, eax
jne 0x408b9b
call fcn.00408afc
add esp, 0x14
ret

Function at 0x408bb4
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebx
push esi
push edi
mov edi, eax
mov ebx, edx
dec ebx
test ebx, ebx
jl 0x408bfa
inc ebx
xor esi, esi
test esi, esi
je 0x408bd1
push 0xfa
call sub.kernel32.dll_Sleep
mov eax, edi
call fcn.00403444
push eax
call sub.kernel32.dll_DeleteFileA
test eax, eax
jne 0x408bfa
call sub.kernel32.dll_GetLastError_1
cmp eax, 2
je 0x408bfa
call sub.kernel32.dll_GetLastError_1
cmp eax, 3
je 0x408bfa
inc esi
dec ebx
jne 0x408bc3
pop edi
pop esi
pop ebx
ret

Function at 0x408fb4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ecx
mov edi, edx
mov esi, eax
lea ebx, [ebp - 0x78]
xor eax, eax
push ebp
push 0x4090a4
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4090bc
push esi
push 0x4090c8
push edi
lea eax, [ebp - 8]
mov edx, 4
call fcn.00403340
lea eax, [ebp - 0x4c]
xor ecx, ecx
mov edx, 0x44
call fcn.0040277c
mov dword [ebp - 0x4c], 0x44
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x4c]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 8]
call fcn.00403444
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409038
mov al, 0x62
call fcn.00408c00
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
jmp 0x40904f
push ebx
call sub.user32.dll_TranslateMessage
push ebx
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
push ebx
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x409043
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x5c]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x40904f
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x5c]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4090ab
lea eax, [ebp - 8]
call fcn.00403198
ret
Function at 0x409154
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
push edi
mov esi, eax
xor eax, eax
push ebp
push 0x409240
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 8]
call fcn.00406a38
mov eax, dword [ebp - 8]
lea ecx, [ebp - 4]
mov edx, 0x409258
call fcn.004089f8
push 0
mov eax, dword [ebp - 4]
call fcn.00403444
push eax
call sub.kernel32.dll_CreateDirectoryA
test eax, eax
jne 0x40920e
call sub.kernel32.dll_GetLastError_1
mov ebx, eax
cmp ebx, 0xb7
je 0x409174
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 0x18]
mov edx, dword [ebp - 4]
mov al, 0x2f
call fcn.004087f0
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x1c]
mov eax, ebx
call fcn.00404c2c
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x10], eax
lea edx, [ebp - 0x20]
mov eax, ebx
call fcn.00406e88
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xc], eax
lea edx, [ebp - 0x14]
mov ecx, 2
mov al, 0x60
call fcn.004087c0
mov ecx, dword [ebp - 8]
mov dl, 1
mov eax, 0x4045a8
call fcn.00405828
call fcn.00402eb4
jmp 0x409174
mov eax, esi
mov edx, dword [ebp - 4]
call fcn.004031e8
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409247
lea eax, [ebp - 0x20]
mov edx, 3
call fcn.004031b8
lea eax, [ebp - 8]
mov edx, 2
call fcn.004031b8
ret

Function at 0x409268
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffbc
mov edi, eax
lea esi, [esp + 0x28]
lea eax, [esp + 4]
push eax
call sub.kernel32.dll_GetSystemInfo
mov ebx, edi
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40931c
jmp 0x409311
cmp dword [esi + 0x10], 0x1000
jne 0x4092fd
test byte [esi + 0x15], 1
jne 0x4092fd
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x4092bc
cmp eax, 2
je 0x4092bc
cmp eax, 0x10
je 0x4092bc
cmp eax, 0x20
jne 0x4092d1
push esp
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4092d1
mov bl, 1
xor ebp, ebp
jmp 0x4092e2
mov eax, dword [esi]
add eax, ebp
call fcn.00409260
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jl 0x4092d5
test bl, bl
je 0x4092fd
push esp
mov eax, dword [esp + 4]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov eax, dword [esi]
add eax, dword [esi + 0xc]
mov ebx, eax
push 0x1c
push esi
push ebx
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x40931c
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409294
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x40605d
Capabilities:
Hash data using sha256

Disassembly:
cmp dword [0x44a200], 2
jl 0x406082
movaps xmm0, xmmword [0x4347f0]
movaps xmmword [0x441040], xmm0
movaps xmm0, xmmword [0x4347e0]
movaps xmmword [0x441050], xmm0
push esi
mov esi, dword [esp + 8]
mov ecx, esi
call fcn.0040640a
xor edx, edx
mov ecx, dword [esi + 0xf4]
mov eax, dword [edx + 0x4347b8]
mov dword [edx + ecx], eax
add edx, 4
cmp edx, 0x20
jl 0x406090
mov eax, dword [esi + 0xf4]
xor dword [eax], 0x2080020
mov ecx, dword [esi + 0xf4]
mov eax, dword [esp + 0xc]
xor dword [ecx + 8], eax
mov ecx, dword [esi + 0xf4]
mov eax, dword [esp + 0x10]
or eax, 0x2000
shl eax, 0x10
xor dword [ecx + 0xc], eax
pop esi
ret 0xc

Function at 0x406773
Capabilities:
Encode data using xor

Disassembly:
mov edx, dword [esp + 4]
push esi
mov esi, dword [esp + 0x10]
push edi
mov edi, dword [esp + 0x10]
test esi, esi
je 0x40679d
movzx ecx, byte [edi]
movzx eax, dl
xor ecx, eax
shr edx, 8
xor edx, dword [ecx*4 + 0x441060]
inc edi
sub esi, 1
jne 0x406785
pop edi
mov eax, edx
pop esi
ret 0xc

Function at 0x40698a
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x24
push ebp
push esi
push edi
mov edi, dword [esp + 0x34]
xor ebp, ebp
cmp dword [edi], 2
lea esi, [edi + 4]
jne 0x4069e0
mov eax, dword [esi]
push ebx
push ebp
push ebp
push ebp
push ebp
mov dword [esp + 0x20], eax
lea eax, [esp + 0x24]
push eax
push 4
lea eax, [esp + 0x28]
push eax
push 0x20
push dword [esp + 0x5c]
call fcn.00407074
mov edx, ebp
mov ebx, ebp
movzx eax, byte [esp + edx + 0x14]
mov ecx, edx
and ecx, 3
shl ecx, 3
shl eax, cl
xor eax, ebx
inc edx
mov ebx, eax
cmp edx, 0x20
jb 0x4069c4
mov dword [esi], eax
pop ebx
cmp dword [edi], 3
jne 0x406a0c
push ebp
push ebp
push ebp
push ebp
lea eax, [esp + 0x20]
push eax
push 0x20
push esi
push 0x20
push dword [esp + 0x58]
call fcn.00407074
push 0x20
lea eax, [esp + 0x14]
push eax
push esi
call fcn.00422c10
add esp, 0xc
pop edi
pop esi
pop ebp
add esp, 0x24
ret 8
Function at 0x406dcf
Capabilities:
Encode data using xor
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x864
push ebp
mov ebp, dword [esp + 0x880]
mov eax, ecx
mov dword [esp + 4], eax
cmp ebp, 0x18
ja 0x406fad
push ebx
push esi
xor ebx, ebx
lea esi, [eax + 0xf4]
push edi
mov edi, ebx
push dword [esp + 0x87c]
mov ecx, esi
call fcn.00410540
test al, al
je 0x406e2d
lea eax, [esi + 0x10]
cmp dword [eax + 0x30], ebp
jne 0x406e2d
push 0x10
push dword [esp + 0x888]
push eax
call fcn.00421592
add esp, 0xc
test eax, eax
je 0x406fb7
inc edi
add esi, 0x84
cmp edi, 4
jb 0x406df9
mov esi, 0x800
lea eax, [esp + 0x74]
push esi
push eax
push dword [esp + 0x888]
call fcn.00413140
xor eax, eax
mov ecx, ebp
inc eax
shl eax, cl
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x5c]
push eax
lea eax, [esp + 0x20]
push eax
push 0x10
push dword [esp + 0x898]
lea eax, [esp + 0x8c]
push eax
call fcn.004271a0
pop ecx
push eax
lea eax, [esp + 0x90]
push eax
call fcn.0040727f
push esi
lea eax, [esp + 0x78]
push eax
call fcn.00410764
mov edx, dword [esp + 0x10]
push dword [esp + 0x87c]
mov ecx, dword [edx + 0x304]
lea edi, [edx + 0xf4]
mov eax, ecx
and eax, 3
imul eax, eax, 0x84
add edi, eax
lea eax, [ecx + 1]
mov dword [edx + 0x304], eax
mov ecx, edi
mov dword [edi + 0x40], ebp
call fcn.00406960
push 0x10
push dword [esp + 0x888]
lea eax, [edi + 0x10]
push eax
call fcn.00422c10
push 0x20
pop ebp
push ebp
lea eax, [esp + 0x24]
push eax
lea esi, [edi + 0x20]
push esi
call fcn.00422c10
push ebp
lea eax, [esp + 0x50]
push eax
lea eax, [edi + 0x44]
push eax
call fcn.00422c10
push ebp
lea eax, [esp + 0x7c]
push eax
lea eax, [edi + 0x64]
push eax
call fcn.00422c10
add esp, 0x30
push ebx
push 1
push ebp
push esi
call fcn.00410675
cmp dword [esp + 0x890], ebx
je 0x406f3b
push ebp
lea eax, [esp + 0x58]
push eax
push dword [esp + 0x898]
call fcn.00422c10
add esp, 0xc
mov esi, dword [esp + 0x894]
test esi, esi
je 0x406f6e
push 8
push ebx
push esi
call fcn.00421000
add esp, 0xc
mov al, byte [esp + ebx + 0x34]
mov ecx, ebx
and ecx, 7
xor byte [ecx + esi], al
inc ebx
cmp ebx, ebp
jb 0x406f52
push ebp
lea eax, [esp + 0x38]
push eax
call fcn.00410764
cmp dword [esp + 0x888], 0
pop edi
pop esi
pop ebx
je 0x406fa2
push dword [esp + 0x87c]
mov ecx, dword [esp + 8]
lea eax, [esp + 0xc]
push 0x100
push eax
push dword [esp + 0x878]
add ecx, 0x30c
call fcn.0040fb90
push ebp
lea eax, [esp + 0xc]
push eax
call fcn.00410764
pop ebp
add esp, 0x864
ret 0x20
push 0x20
pop ebp
push ebp
lea eax, [esi + 0x20]
push eax
lea eax, [esp + 0x1c]
push eax
call fcn.00422c10
add esp, 0xc
lea eax, [esp + 0x14]
push ebx
push ebx
push ebp
push eax
call fcn.00410675
push ebp
lea eax, [esi + 0x44]
push eax
lea eax, [esp + 0x3c]
push eax
call fcn.00422c10
push ebp
lea eax, [esi + 0x64]
push eax
lea eax, [esp + 0x68]
push eax
call fcn.00422c10
add esp, 0x18
jmp 0x406f1d
Function at 0x407074
Capabilities:
Authenticate hmac
Encode data using xor

Disassembly:
sub esp, 0x1bc
push ebx
mov ebx, dword [esp + 0x1c8]
push ebp
push esi
push edi
push 0x40
pop edi
cmp ebx, edi
jbe 0x4070c9
lea eax, [esp + 0x164]
push eax
call fcn.00411335
push ebx
push dword [esp + 0x1d4]
lea eax, [esp + 0x16c]
push eax
call fcn.0041137b
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x168]
push eax
call fcn.00411252
push 0x20
lea eax, [esp + 0x58]
pop ebx
jmp 0x4070d0
mov eax, dword [esp + 0x1d0]
mov ebp, dword [esp + 0x1e4]
mov dword [esp + 0x10], eax
test ebp, ebp
je 0x4070fb
mov ecx, dword [esp + 0x1e8]
cmp byte [ecx], 0
je 0x4070fb
push 0x1a
pop ecx
mov esi, ebp
lea edi, [esp + 0x94]
rep movsd dword es:[edi], dword [esi]
jmp 0x407159
xor edx, edx
test ebx, ebx
je 0x40711b
mov esi, eax
lea eax, [esp + 0x14]
sub esi, eax
lea ecx, [esp + 0x14]
add ecx, edx
mov al, byte [esi + ecx]
xor al, 0x36
inc edx
mov byte [ecx], al
cmp edx, ebx
jb 0x407109
cmp ebx, edi
jae 0x407135
mov eax, edi
lea ecx, [esp + 0x14]
sub eax, ebx
add ecx, ebx
push eax
push 0x36
push ecx
call fcn.00421000
add esp, 0xc
lea eax, [esp + 0x94]
push eax
call fcn.00411335
push edi
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x9c]
push eax
call fcn.0041137b
test ebp, ebp
je 0x407176
mov eax, dword [esp + 0x1e8]
cmp byte [eax], 0
jne 0x407176
push 0x1a
pop ecx
lea esi, [esp + 0x94]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push dword [esp + 0x1dc]
lea eax, [esp + 0x98]
push dword [esp + 0x1dc]
push eax
call fcn.0041137b
lea eax, [esp + 0x74]
push eax
lea eax, [esp + 0x98]
push eax
call fcn.00411252
mov ebp, dword [esp + 0x1ec]
test ebp, ebp
je 0x4071ca
mov eax, dword [esp + 0x1f0]
cmp byte [eax], 0
je 0x4071ca
push 0x1a
pop ecx
mov esi, ebp
lea edi, [esp + 0xfc]
rep movsd dword es:[edi], dword [esi]
jmp 0x407234
test ebx, ebx
je 0x4071ec
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x14]
sub edx, eax
xor esi, esi
lea ecx, [esp + 0x14]
add ecx, esi
mov al, byte [edx + ecx]
xor al, 0x5c
inc esi
mov byte [ecx], al
cmp esi, ebx
jb 0x4071da
cmp ebx, 0x40
jae 0x407208
push 0x40
pop eax
sub eax, ebx
lea ecx, [esp + 0x14]
push eax
add ecx, ebx
push 0x5c
push ecx
call fcn.00421000
add esp, 0xc
lea eax, [esp + 0xfc]
push eax
call fcn.00411335
push 0x40
lea eax, [esp + 0x18]
push eax
lea eax, [esp + 0x104]
push eax
call fcn.0041137b
test ebp, ebp
je 0x40724a
mov eax, dword [esp + 0x1f0]
cmp byte [eax], 0
jne 0x40724a
push 0x1a
pop ecx
lea esi, [esp + 0xfc]
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
mov byte [eax], 1
push 0x20
lea eax, [esp + 0x78]
push eax
lea eax, [esp + 0x104]
push eax
call fcn.0041137b
push dword [esp + 0x1e0]
lea eax, [esp + 0x100]
push eax
call fcn.00411252
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1bc
ret 0x24