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

Disassembly:
sub esp, 4
push ebx
push esi
push edi
mov esi, ecx
push ebp
push esi
call fcn.00402160
add esp, 4
mov edi, eax
test edi, edi
jne 0x406db2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00406ae0
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 4
mov eax, dword [esp + 0x18]
push 0
push pe_nt_image_headers32
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x406dfa
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00406ae0
mov eax, dword [esi + 0x14]
push edi
push eax
mov ebx, dword [eax]
call dword [ebx + 0x14]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov ebp, eax
push 0
lea eax, [esp + 0x14]
push eax
push ebp
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x406e44
cmp dword [esp + 0x10], ebp
jne 0x406e44
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x14]
push edi
push eax
mov ebx, dword [eax]
call dword [ebx + 0x14]
mov eax, 1
pop ebp
mov dword [esi + 0x1c], 0
pop edi
pop esi
pop ebx
add esp, 4
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00406ae0
mov eax, dword [esi + 0x14]
push edi
push eax
mov ebp, dword [eax]
call dword [ebp + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret 4

Function at 0x406f20
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push esi
lea ecx, [esp + 4]
push eax
push ecx
mov edx, dword [str.SoftwareMicrosoftWSView]
push 0
push 0x20006
push 0
push 0
push 0
push edx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406f7e
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
push eax
mov eax, dword [esp + 8]
push ecx
push 3
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov esi, eax
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
add esp, 8
ret

Function at 0x406f90
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0xc
lea eax, [esp]
push esi
mov esi, dword [esp + 0x1c]
push edi
push eax
mov ecx, dword [str.SoftwareMicrosoftWSView]
mov dword [esp + 0x10], esi
push 0x20019
push 0
push ecx
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edi, eax
test edi, edi
jne 0x406ffa
lea eax, [esp + 0xc]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x10]
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x10]
push edx
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov edi, eax
mov eax, dword [esp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0xc], esi
je 0x406ffa
mov edi, 0xd
mov eax, edi
pop edi
pop esi
add esp, 0xc
ret
Function at 0x407010
Capabilities:
Accept command line arguments

Disassembly:
sub esp, 0x34
push ebx
push esi
push edi
push ebp
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [esp + 0x10], 0
push 0
push 0
push eax
call fcn.004072b0
add esp, 0xc
mov esi, eax
cmp byte [eax], 0
je 0x40705d
mov edi, dword [esp + 0x48]
mov eax, dword [0x40f0e8]
mov ecx, 0x40f0e8
lea edx, [edi + 0x338]
mov dword [edx], eax
mov ebx, dword [ecx + 4]
mov dword [edx + 4], ebx
mov ecx, dword [ecx + 8]
mov dword [edx + 8], ecx
jmp 0x407061
mov edi, dword [esp + 0x48]
mov ebp, dword [sym.imp.USER32.dll_CharNextA]
mov al, byte [esi]
test al, al
je 0x4071b9
cmp byte [esi], 0x20
jne 0x407080
push esi
call ebp
cmp byte [eax], 0
mov esi, eax
jne 0x407071
mov al, byte [esi]
cmp al, 0x2f
je 0x407093
cmp al, 0x2d
je 0x407093
test al, al
je 0x407067
jmp case.0x4070b4.88
push esi
call ebp
mov bl, byte [eax]
push eax
call ebp
movsx ecx, bl
mov esi, eax
sub ecx, 0x44
cmp ecx, 0x30
ja case.0x4070b4.88
xor eax, eax
mov al, byte [ecx + 0x407250]
jmp dword [eax*4 + 0x4071fc]
or dword [edi + 0x338], 0x10
jmp 0x407067
or dword [edi + 0x338], 0x40
jmp 0x407067
or dword [edi + 0x338], 0x20
jmp 0x407067
mov dword [edi + 0x33c], 1
jmp 0x407067
push 0x104
lea eax, [edi + 0x130]
push eax
push esi
call fcn.004072b0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x407067
jmp case.0x4070b4.88
cmp byte [edi + 0x2c], 0
jne 0x4071c3
lea eax, [esp + 0x14]
push 0x1e
push eax
push esi
call fcn.004072b0
add esp, 0xc
mov esi, eax
test esi, esi
je case.0x4070b4.88
lea eax, [esp + 0x14]
push eax
call fcn.00408000
add esp, 4
mov dword [edi + 0x28], eax
test eax, eax
jne 0x407067
jmp case.0x4070b4.88
mov dword [edi + 0x20], 1
jmp 0x407067
cmp dword [edi + 0x28], 0xffffffff
jne 0x4071c3
push 0x104
lea eax, [edi + 0x2c]
push eax
push esi
call fcn.004072b0
add esp, 0xc
mov esi, eax
test esi, esi
jne 0x407067
jmp case.0x4070b4.88
and dword [edi + 0x338], 0xffffff7f
jmp 0x407067
lea eax, [esp + 0x14]
push 0x1e
push eax
push esi
call fcn.004072b0
add esp, 0xc
mov esi, eax
test esi, esi
je case.0x4070b4.88
lea eax, [esp + 0x14]
push eax
call fcn.00408000
add esp, 4
mov dword [edi + 0x340], eax
test eax, eax
jne 0x407067
jmp case.0x4070b4.88
mov dword [esp + 0x10], 1
jmp case.0x4070b4.88
push 0x2736
mov ecx, edi
call fcn.00406a80
cmp dword [esp + 0x10], 0
jne 0x4071ed
lea ecx, [esp + 0x34]
push 0x84
mov dword [esp + 0x38], 0x40f0f8
push edi
call fcn.00401000
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x34
ret
Function at 0x407340
Capabilities:
Create process on windows
Create process suspended
Create thread
Resume thread

Disassembly:
sub esp, 0x58
push ebx
push esi
mov esi, dword [esp + 0x64]
push edi
xor edi, edi
lea edx, [esi + 0x2c]
cmp byte [edx], 0
je 0x4073f8
lea edi, [esp + 0x20]
xor eax, eax
mov ecx, 0x11
rep stosd dword es:[edi], eax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], 0x44
push eax
push ecx
push 0
push 0
push 4
push 0
push 0
push 0
push edx
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x4073a5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00406ae0
pop edi
pop esi
pop ebx
add esp, 0x58
ret
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
push ecx
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x28], eax
call ebx
cmp dword [esi + 0x20], 0
mov edi, dword [esp + 0x10]
je 0x4073fe
lea eax, [esp + 0x1c]
push eax
push 0
push esi
push 0x407460
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
jne 0x4073f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
mov ecx, esi
call fcn.00406ae0
pop edi
pop esi
pop ebx
add esp, 0x58
ret
push eax
call ebx
jmp 0x4073fe
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esi + 0x28], 0xffffffff
je 0x407454
test edi, edi
je 0x407412
push edi
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push edi
call ebx
mov eax, dword [esi + 0x28]
push eax
push esi
call fcn.00404fa0
add esp, 8
mov ecx, esi
mov dword [esi + 0x344], eax
call fcn.00406c50
push esi
call fcn.004013b0
add esp, 4
cmp dword [esi + 0x344], 0
je 0x407454
push 0
mov eax, dword [esi + 4]
push 0x9c61
push 0x111
push eax
call dword [sym.imp.USER32.dll_PostMessageA]
pop edi
pop esi
pop ebx
add esp, 0x58
ret

Function at 0x40a200
Capabilities:
Terminate process

Disassembly:
cmp dword [0x4103ec], 1
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
jne 0x40a21e
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x4103e8], 1
cmp dword [esp + 0x14], 0
mov ebx, dword [esp + 0x18]
mov byte [0x4103e4], bl
jne 0x40a278
cmp dword [0x412348], 0
je 0x40a266
mov edi, dword [0x412344]
sub edi, 4
cmp dword [0x412348], edi
ja 0x40a266
mov eax, dword [edi]
test eax, eax
je 0x40a25b
call eax
sub edi, 4
cmp dword [0x412348], edi
jbe 0x40a253
push 0x410024
push 0x41001c
call fcn.0040a2b0
add esp, 8
push 0x41002c
push 0x410028
call fcn.0040a2b0
add esp, 8
test ebx, ebx
jne 0x40a29f
mov dword [0x4103ec], 1
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]
pop edi
pop esi
pop ebx
ret
Function at 0x40a9b0
Capabilities:
Query environment variable

Disassembly:
sub esp, 4
cmp dword [0x410698], 0
push ebx
push esi
push edi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push ebp
jne 0x40a9fc
call esi
mov edi, eax
test edi, edi
je 0x40a9da
mov dword [0x410698], 1
jmp 0x40aa00
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
je 0x40a9f2
mov dword [0x410698], 2
jmp 0x40aa04
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x10]
cmp dword [0x410698], 1
jne 0x40aab3
test edi, edi
jne 0x40aa27
call esi
mov edi, eax
test edi, edi
jne 0x40aa27
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp word [edi], 0
mov esi, edi
je 0x40aa41
add esi, 2
cmp word [esi], 0
jne 0x40aa2f
add esi, 2
cmp word [esi], 0
jne 0x40aa2f
sub esi, edi
push 0
sar esi, 1
push 0
inc esi
push 0
push 0
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov ebp, eax
test ebp, ebp
je 0x40aaa2
push ebp
call fcn.00407a30
add esp, 4
mov ebx, eax
test ebx, ebx
je 0x40aaa2
push 0
push 0
push ebp
push ebx
push esi
push edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jne 0x40aa91
push ebx
call fcn.004079a0
add esp, 4
xor ebx, ebx
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
push edi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
cmp dword [0x410698], 2
jne 0x40ab37
test ebx, ebx
jne 0x40aad6
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebx, eax
test ebx, ebx
jne 0x40aad6
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov ebp, ebx
cmp byte [ebx], 0
je 0x40aaeb
inc ebp
cmp byte [ebp], 0
jne 0x40aadd
inc ebp
cmp byte [ebp], 0
jne 0x40aadd
sub ebp, ebx
inc ebp
push ebp
call fcn.00407a30
mov dword [esp + 0x14], eax
add esp, 4
test eax, eax
jne 0x40ab10
push ebx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
mov edi, dword [esp + 0x10]
mov esi, ebx
mov ecx, ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
push ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 4
ret
Function at 0x40b040
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1a8
xor ecx, ecx
mov eax, 0x4108c0
push ebx
mov edx, dword [esp + 0x1b0]
push esi
push edi
push ebp
cmp dword [eax], edx
je 0x40b067
add eax, 8
inc ecx
cmp eax, 0x410948
jb 0x40b058
cmp dword [ecx*8 + 0x4108c0], edx
lea ebx, [ecx*8]
jne 0x40b222
cmp dword [0x41034c], 1
je 0x40b1e7
cmp dword [0x41034c], 0
jne 0x40b09e
cmp dword [0x410350], 1
je 0x40b1e7
cmp edx, 0xfc
je 0x40b222
lea eax, [esp + 0xb4]
push 0x104
push eax
mov ebp, dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0
call ebp
test eax, eax
jne 0x40b0db
mov esi, str._program_name_unknown_
lea edi, [esp + 0xb4]
mov ecx, 5
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
lea ebp, [esp + 0xb4]
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
cmp ecx, 0x3c
jbe 0x40b11f
lea edi, [esp + 0xb4]
mov ecx, 0xffffffff
sub eax, eax
push 3
repne scasb al, byte es:[edi]
not ecx
lea ebp, [esp + ecx + 0x7c]
push 0x40f580
push ebp
call fcn.0040c840
add esp, 0xc
mov esi, str.Runtime_Error__n_nProgram:
lea edi, [esp + 0x14]
mov ecx, 6
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov edi, ebp
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40f560
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov ecx, 0xffffffff
lea edi, [esp + 0x14]
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [ebx + 0x4108c4]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
lea edi, [esp + 0x14]
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push 0x12010
and ecx, 3
push str.Microsoft_Visual_C_Runtime_Library
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.0040c7a0
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
mov eax, dword [0x412240]
mov esi, dword [eax + 0x10]
cmp esi, 0xffffffff
jne 0x40b1fe
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, eax
mov edx, dword [ebx + 0x4108c4]
push 0
lea eax, [esp + 0x14]
mov edi, edx
push eax
mov ecx, 0xffffffff
sub eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x1a8
ret
Function at 0x40b4a0
Capabilities:
Write file on windows

Disassembly:
mov edx, dword [esp + 4]
sub esp, 0x418
cmp edx, dword [0x412340]
push ebx
push esi
push edi
push ebp
jae 0x40b6a7
mov eax, edx
and eax, 0xffffffe7
sar eax, 3
add eax, 0x412240
mov dword [esp + 0x18], eax
mov eax, edx
and eax, 0x1f
mov ecx, dword [esp + 0x18]
shl eax, 3
mov ebx, dword [ecx]
mov ebp, eax
mov dword [esp + 0x1c], eax
mov al, byte [ebx + ebp + 4]
test al, 1
je 0x40b6a7
xor esi, esi
mov ebp, dword [esp + 0x434]
mov dword [esp + 0x20], esi
cmp ebp, esi
jne 0x40b509
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
test al, 0x20
je 0x40b51a
push 2
push 0
push edx
call fcn.0040b6d0
add esp, 0xc
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
add ecx, dword [eax]
test byte [ecx + 4], 0x80
je 0x40b5b6
mov dword [esp + 0x10], 0
mov ebx, dword [esp + 0x430]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40b5ef
lea edi, [esp + 0x24]
mov eax, ebx
sub eax, dword [esp + 0x430]
cmp eax, ebp
jae 0x40b57d
mov al, byte [ebx]
inc ebx
cmp al, 0xa
jne 0x40b56b
mov byte [edi], 0xd
inc esi
inc edi
mov byte [edi], al
inc edi
mov eax, edi
lea ecx, [esp + 0x24]
sub eax, ecx
cmp eax, 0x400
jl 0x40b552
lea eax, [esp + 0x24]
push 0
sub edi, eax
lea ecx, [esp + 0x28]
lea eax, [esp + 0x18]
mov edx, dword [esp + 0x1c]
push eax
push edi
push ecx
mov eax, dword [edx]
mov ecx, dword [esp + 0x2c]
mov edx, dword [eax + ecx]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b5e5
mov eax, dword [esp + 0x14]
add dword [esp + 0x20], eax
cmp edi, eax
jle 0x40b53d
jmp 0x40b5ef
lea eax, [esp + 0x14]
push 0
mov edx, dword [esp + 0x434]
push eax
push ebp
mov ecx, dword [ecx]
push edx
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x40b5e5
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x14]
mov dword [esp + 0x20], eax
jmp 0x40b5ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x10], eax
cmp dword [esp + 0x20], 0
jne 0x40b696
cmp dword [esp + 0x10], 0
je 0x40b648
cmp dword [esp + 0x10], 5
jne 0x40b62b
mov dword [0x4103a4], 9
mov eax, dword [esp + 0x10]
pop ebp
pop edi
mov dword [0x4103a8], eax
mov eax, 0xffffffff
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x10]
push eax
call fcn.0040cbf0
add esp, 4
mov eax, 0xffffffff
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
mov edx, dword [eax]
test byte [edx + ecx + 4], 0x40
je 0x40b672
mov eax, dword [esp + 0x430]
cmp byte [eax], 0x1a
jne 0x40b672
xor eax, eax
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4103a4], 0x1c
mov dword [0x4103a8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, dword [esp + 0x20]
pop ebp
sub eax, esi
pop edi
pop esi
pop ebx
add esp, 0x418
ret
mov eax, 0xffffffff
pop ebp
mov dword [0x4103a4], 9
mov dword [0x4103a8], 0
pop edi
pop esi
pop ebx
add esp, 0x418
ret
Function at 0x40a03b
Capabilities:
Encode data using xor

Disassembly:
cmp dword [0x44b7e0], 0
je 0x40a048
or eax, 0xffffffff
ret
mov eax, dword [0x43b6bc]
push ebx
push ebp
xor ebp, ebp
cmp eax, ebp
jg 0x40a086
mov ecx, dword [0x43b6b8]
jl 0x40a061
cmp ecx, ebp
ja 0x40a086
or ebx, 0xffffffff
mov dword [0x44b700], ebp
add ecx, ebx
mov dword [0x44b704], ebp
mov dword [0x43b6b8], ecx
adc eax, ebx
mov dword [0x43b6bc], eax
mov eax, ebx
jmp 0x40a190
push esi
push edi
mov edi, dword [0x44b704]
or ebx, 0xffffffff
cmp edi, ebp
jg 0x40a0eb
jl 0x40a0a1
mov esi, dword [0x44b700]
cmp esi, ebp
ja 0x40a0f1
mov esi, 0x2000
push esi
push dword [0x44b6f4]
call fcn.0040a34a
cdq
mov ecx, eax
mov dword [0x44b700], eax
or ecx, edx
mov dword [0x44b704], edx
je 0x40a12d
and eax, edx
cmp eax, ebx
je 0x40a11e
add dword [0x44b738], esi
mov eax, dword [0x44b6f4]
adc dword [0x44b73c], ebp
mov dword [0x44b6f8], eax
call fcn.00409ad3
mov edi, dword [0x44b704]
mov esi, dword [0x44b700]
mov eax, dword [0x43b6e8]
test byte [eax + 0x40], 1
je 0x40a170
cmp byte [0x44c995], 0
mov eax, esi
je 0x40a13d
or eax, edi
je 0x40a170
push 0x44c9a0
push esi
push dword [0x44b6f8]
call fcn.0040d1b9
jmp 0x40a164
push 0x45a062
mov ecx, 0x450cd4
call fcn.004018e4
mov dword [0x44b700], ebp
mov eax, ebx
mov dword [0x44b704], ebp
jmp 0x40a18e
or eax, edi
mov ebp, dword [0x44b6f8]
je 0x40a170
add esi, ebx
adc edi, ebx
call fcn.0040ce28
xor byte [ebp], al
movzx eax, byte [ebp]
push eax
call fcn.0040cf3a
mov eax, esi
inc ebp
or eax, edi
jne 0x40a147
mov esi, dword [0x44b700]
mov edi, dword [0x44b704]
mov eax, dword [0x44b6f8]
add esi, ebx
mov dword [0x44b700], esi
adc edi, ebx
mov dword [0x44b704], edi
movzx eax, byte [eax]
inc dword [0x44b6f8]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x40ce89
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push dword [ebp + 0xc]
call fcn.0040ce46
push 0xc
push dword [ebp + 8]
lea eax, [ebp - 0xc]
push eax
call fcn.00414440
add esp, 0xc
xor esi, esi
call fcn.0040ce28
movzx ecx, byte [ebp + esi - 0xc]
xor eax, ecx
mov byte [ebp + esi - 0xc], al
movzx eax, al
push eax
call fcn.0040cf3a
inc esi
cmp esi, 0xc
jl 0x40ceab
mov eax, dword [0x43b6e8]
movzx edx, byte [ebp - 1]
movzx ecx, byte [0x44b757]
test byte [eax + 0x40], 2
jne 0x40cee7
movzx ecx, byte [0x44b75f]
cmp edx, ecx
je 0x40cef0
or eax, 0xffffffff
jmp 0x40cf33
mov ecx, dword [0x44b700]
mov eax, ecx
cdq
cmp edx, dword [0x43b6bc]
jl 0x40cf0d
mov esi, dword [0x43b6b8]
jg 0x40cf0f
cmp eax, esi
ja 0x40cf0f
mov esi, ecx
push edi
mov edi, dword [0x44b6f8]
test esi, esi
je 0x40cf30
call fcn.0040ce28
xor byte [edi], al
movzx eax, byte [edi]
push eax
call fcn.0040cf3a
inc edi
sub esi, 1
jne 0x40cf1a
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x40cf3a
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
mov ecx, dword [0x44c820]
mov eax, ecx
xor eax, dword [esp + 4]
mov edx, dword [0x44c828]
movzx eax, al
shr ecx, 8
xor ecx, dword [eax*4 + 0x43b290]
movzx eax, cl
add eax, dword [0x44c824]
mov dword [0x44c820], ecx
imul ecx, eax, 0x8088405
mov eax, dword [esp + 4]
inc ecx
mov dword [0x44c824], ecx
shr ecx, 0x18
xor ecx, edx
shr edx, 8
movzx ecx, cl
xor edx, dword [ecx*4 + 0x43b290]
mov dword [0x44c828], edx
ret 4

Function at 0x40cf94
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2f0
push ebx
push esi
mov esi, 0xa8
lea eax, [esp + 0x40]
push esi
xor ebx, ebx
push ebx
push eax
call fcn.00413c20
add esp, 0xc
lea eax, [esp + 0x40]
push eax
push dword [esp + 0x304]
push dword [esp + 0x304]
call fcn.0040d463
push esi
lea eax, [esp + 0x44]
mov byte [esp + 0xe], bl
push eax
lea eax, [esp + 0x1f8]
mov byte [esp + 0x13], bl
push eax
call fcn.00414440
add esp, 0xc
lea eax, [esp + 0xa]
push eax
lea eax, [esp + 0x194]
push eax
lea eax, [esp + 0x1f8]
push eax
push dword [esp + 0x314]
push dword [esp + 0x314]
call fcn.0040d2df
mov eax, dword [esp + 0x314]
xor edx, edx
push 0x14
dec eax
pop ecx
div ecx
add eax, 1
mov dword [esp + 0x14], eax
je 0x40d155
push ebp
push edi
mov edi, ebx
lea ebp, [esp + 0x34]
inc ebx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x14], ebx
push ecx
lea eax, [esp + 0x38]
push 0
push eax
call fcn.00413c20
push esi
lea eax, [esp + 0x208]
push eax
lea eax, [esp + 0x104]
push eax
call fcn.00414440
mov eax, ebx
mov byte [esp + 0x3b], bl
shr eax, 0x18
add esp, 0x18
mov byte [esp + 0x20], al
mov eax, ebx
shr eax, 0x10
mov byte [esp + 0x21], al
mov eax, ebx
shr eax, 8
cmp dword [esp + 0x314], 0
push 4
mov byte [esp + 0x26], al
pop esi
jbe 0x40d10a
mov ebp, dword [esp + 0x314]
lea eax, [esp + 0x12]
push eax
lea eax, [esp + 0x19c]
push eax
lea eax, [esp + 0xf8]
push eax
push esi
lea eax, [esp + 0x30]
push eax
call fcn.0040d2df
lea eax, [esp + 0x13]
push eax
lea eax, [esp + 0x2a4]
push eax
lea eax, [esp + 0xf8]
push eax
push 0x14
lea eax, [esp + 0x30]
push eax
call fcn.0040d3a9
xor esi, esi
mov al, byte [esp + esi + 0x20]
xor byte [esp + esi + 0x34], al
inc esi
cmp esi, 0x14
jb 0x40d0d9
push 0xa8
lea eax, [esp + 0x4c]
push eax
lea eax, [esp + 0xf8]
push eax
call fcn.00414440
add esp, 0xc
sub ebp, 1
jne 0x40d096
mov ebp, dword [esp + 0x18]
mov esi, dword [esp + 0x318]
xor edx, edx
mov ebx, dword [esp + 0x31c]
mov ecx, edi
cmp ecx, ebx
jae 0x40d12d
mov al, byte [ecx + ebp]
inc edx
mov byte [ecx + esi], al
inc ecx
cmp edx, 0x14
jb 0x40d11c
mov ebx, dword [esp + 0x14]
mov esi, 0xa8
inc ebx
push 0x14
pop ecx
sub ebp, ecx
mov dword [esp + 0x14], ebx
lea eax, [ebx - 1]
mov dword [esp + 0x18], ebp
add edi, ecx
cmp eax, dword [esp + 0x1c]
jb 0x40d03d
pop edi
pop ebp
pop esi
pop ebx
add esp, 0x2f0
ret 0x1c