joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4787e0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x4a6950
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, ecx
lea ecx, [esp + 4]
call fcn.00478390
lea eax, [esp + 4]
lea ecx, [esi + 4]
push eax
mov dword [esp + 0x18], 0
call fcn.00478410
lea ecx, [esp + 4]
push ecx
lea ecx, [esi + 0x14]
call fcn.00478410
lea ecx, [esi + 0xc]
call fcn.0049516f
lea ecx, [esi + 0x10]
call fcn.0049516f
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x1c]
call fcn.0047ac40
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x30]
call fcn.0047ac40
push 0xffffffffffffffff
push 0
lea ecx, [esi + 0x44]
call fcn.0047ac40
lea ecx, [esp + 8]
mov dword [esp + 0x14], 1
call fcn.004951e4
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.004951e4
mov ecx, dword [esp + 0xc]
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret

Function at 0x479488
Capabilities:
Get hostname

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4a6b78
push eax
mov dword fs:[0], esp
sub esp, 0x64
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 4]
test eax, eax
je 0x479498
call fcn.004799b0
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x47957b
cmp byte [edi], 0
je 0x47957b
mov eax, dword [esp + 0x8c]
test eax, eax
jg 0x4794bd
mov eax, 0x7d0
mov ecx, esi
mov dword [esi + 8], eax
call fcn.004781b0
test eax, eax
jne 0x4794dd
push 0x6a8030
lea ecx, [esi + 0x38]
call fcn.0049536d
jmp 0x47957b
mov eax, dword [esp + 0x80]
mov ecx, esi
push eax
push edi
call fcn.00478200
test eax, eax
jne 0x47950c
mov ecx, esi
call fcn.00478300
push edi
add esi, 0x38
push 0x6a800c
push esi
call fcn.00492aa7
add esp, 0xc
jmp 0x47957b
push 0xdc
mov ecx, esi
mov dword [esi + 4], 1
call fcn.0047a230
test eax, eax
je 0x479574
lea ecx, [esp + 8]
push 0x64
push ecx
call sub.WS2_32.dll_gethostname
mov eax, dword [esp + 0x88]
mov ecx, dword [esp + 0x84]
lea edx, [esp + 0x8c]
mov dword [esp + 0x8c], 1
push edx
push eax
lea edx, [esp + 0x10]
push ecx
push edx
mov ecx, esi
call fcn.00479650
test eax, eax
jne 0x479590
push edi
lea eax, [esi + 0x38]
push 0x6a7fe8
push eax
call fcn.00492aa7
add esp, 0xc
mov ecx, esi
call fcn.004799b0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x64]
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x479638
mov ecx, dword [0x6a82a0]
mov dword [esp + 0x7c], ecx
lea edx, [esp + 8]
lea eax, [esp + 0x7c]
push edx
push str.HELO__s_r_n
push eax
mov dword [esp + 0x80], 0
call fcn.00492aa7
mov edx, dword [esp + 0x88]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, esi
call fcn.004782b0
test eax, eax
jne 0x4795fa
push 0x6a7fcc
lea ecx, [esi + 0x38]
call fcn.0049536d
jmp 0x47960a
push 0xfa
mov ecx, esi
call fcn.0047a230
test eax, eax
jne 0x479627
mov ecx, esi
call fcn.004799b0
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.004951e4
jmp 0x47957b
lea ecx, [esp + 0x7c]
mov dword [esp + 0x74], 0xffffffff
call fcn.004951e4
mov ecx, dword [esp + 0x6c]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x70
ret 0x14
Function at 0x497601
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x497639
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0049568b
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00495663
jmp 0x497645
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x498cef
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x498d31
call fcn.0049ebdd
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x498d31
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x498d28
xor eax, eax
jmp 0x498d39
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.00498d3f
pop edi
pop esi
pop ebx
ret 4

Function at 0x49f10d
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x49f13b
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x49f159
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.0049f073
jmp 0x49f159
mov eax, dword [esi + 0x14]
test eax, eax
je 0x49f159
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.0049f073
test edi, edi
mov eax, edi
jne 0x49f143
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x4026b4
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffef8
mov esi, edx
mov ebx, eax
test ebx, ebx
jne 0x4026e3
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA_1
mov ecx, eax
mov edx, esp
mov eax, esi
call fcn.004031c0
jmp 0x402701
call sub.KERNEL32.DLL_GetCommandLineA
mov edi, eax
mov edx, esi
mov eax, edi
call fcn.00402648
mov edi, eax
test ebx, ebx
je 0x402701
cmp dword [esi], 0
je 0x402701
dec ebx
jmp 0x4026ea
add esp, 0x108
pop edi
pop esi
pop ebx
ret

Function at 0x40281c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [section.DATA]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x4028b4
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x402894
xor eax, eax
push ebp
push 0x40288d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4028d0
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x402894
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [section.DATA]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [section.DATA], ax
mov esp, ebp
pop ebp
ret
Function at 0x403bbc
Capabilities:
Get geographical location
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffee0
push ebx
push esi
mov dword [ebp - 4], eax
push 0x105
lea eax, [ebp - 0x11d]
push eax
push 0
call sub.KERNEL32.DLL_GetModuleFileNameA_1
mov byte [ebp - 0x12], 0
lea eax, [ebp - 8]
push eax
push 0xf003f
push 0
push 0x403d58
push 0x80000001
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x403c6c
xor eax, eax
push ebp
push 0x403c65
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 5
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
lea eax, [ebp - 0x11d]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
test eax, eax
je 0x403c4e
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x12]
push eax
push 0
push 0
push 0x403d78
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x403c6c
mov eax, dword [ebp - 8]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov eax, dword [ebp - 4]
push eax
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrcpyA
push 5
lea eax, [ebp - 0xd]
push eax
push 3
call sub.KERNEL32.DLL_GetThreadLocale_1
push eax
call sub.KERNEL32.DLL_GetLocaleInfoA_1
xor esi, esi
cmp byte [ebp - 0x11d], 0
je 0x403d4d
cmp byte [ebp - 0xd], 0
jne 0x403cae
cmp byte [ebp - 0x12], 0
je 0x403d4d
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x11d]
add ebx, eax
jmp 0x403cc7
dec ebx
cmp byte [ebx], 0x2e
je 0x403cd6
lea eax, [ebp - 0x11d]
cmp ebx, eax
jne 0x403cc6
lea eax, [ebp - 0x11d]
cmp ebx, eax
je 0x403d4d
inc ebx
cmp byte [ebp - 0x12], 0
je 0x403d03
lea eax, [ebp - 0x12]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x403d4d
cmp byte [ebp - 0xd], 0
je 0x403d4d
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
test esi, esi
jne 0x403d4d
mov byte [ebp - 0xb], 0
lea eax, [ebp - 0xd]
push eax
push ebx
call sub.KERNEL32.DLL_lstrcpyA
push 2
push 0
lea eax, [ebp - 0x11d]
push eax
call sub.KERNEL32.DLL_LoadLibraryExA
mov esi, eax
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x404b5c
Capabilities:
Encode data using xor
Read file on windows

Disassembly:
push ebx
push esi
movzx eax, word [0x40d4dc]
cmp eax, dword [0x40d4e0]
jl 0x404be2
push 0
push 0x40d4e0
mov eax, dword [0x40c458]
mov eax, dword [eax]
mov edx, 0x8000
call fcn.0040b87c
push eax
mov eax, dword [0x40d4d4]
push eax
mov eax, dword [0x40c3e8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [0x40c454]
mov ax, word [eax + 6]
and ax, 1
cmp ax, 1
jne 0x404bd9
mov esi, dword [0x40d4e0]
dec esi
test esi, esi
jl 0x404bd9
inc esi
xor ebx, ebx
call fcn.0040b67c
mov edx, dword [0x40d4d4]
xor byte [edx + ebx], al
mov eax, dword [0x40d4d4]
mov al, byte [eax + ebx]
call fcn.0040b5a8
inc ebx
dec esi
jne 0x404bba
mov word [0x40d4dc], 0
cmp dword [0x40d4e0], 0
jne 0x404c03
mov eax, dword [0x40c458]
xor edx, edx
mov dword [eax], edx
mov word [0x40d4dc], 0
or eax, 0xffffffff
pop esi
pop ebx
ret
movzx eax, word [0x40d4dc]
mov edx, dword [0x40d4d4]
movzx eax, byte [edx + eax]
inc word [0x40d4dc]
pop esi
pop ebx
ret

Function at 0x404c6c
Capabilities:
Write file on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xfffffff4
mov ebp, esp
mov eax, dword [0x40d4cc]
mov dword [ebp], eax
mov ax, word [0x40d4d0]
mov word [esp + 4], ax
mov bx, word [0x40d4e4]
mov si, word [esp + 4]
and si, 7
lea ecx, [esp + 4]
mov edx, ebp
mov eax, esi
call fcn.00404c60
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 0x10
call fcn.00404c3c
mov si, word [ebp]
and si, 0xffff
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 0x10
call fcn.00404c60
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 0x10
call fcn.00404c3c
movzx eax, si
mov dx, word [ebp]
not dx
movzx edx, dx
and edx, 0xffff
cmp eax, edx
je 0x404cfb
mov word [0x40d4e4], 0
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 0x10
call fcn.00404c60
test si, si
je 0x404d7c
dec esi
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 8
call fcn.00404c3c
movzx eax, bx
mov edx, dword [0x40d4d8]
mov cl, byte [ebp]
mov byte [edx + eax], cl
inc ebx
cmp bx, 0x8000
jne 0x404d68
push 0
lea eax, [esp + 0xc]
push eax
movzx edi, bx
push edi
mov eax, dword [0x40d4d8]
push eax
mov eax, dword [0x40c44c]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [0x40c424]
mov edx, edi
mov eax, dword [0x40d4d8]
call fcn.0040b858
xor ebx, ebx
lea ecx, [esp + 4]
mov edx, ebp
mov ax, 8
call fcn.00404c60
test si, si
jne 0x404d0f
mov word [0x40d4e4], bx
mov eax, dword [ebp]
mov dword [0x40d4cc], eax
mov ax, word [esp + 4]
mov word [0x40d4d0], ax
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret
Function at 0x405bc8
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov esi, 0x40d4c8
mov word [0x40d4dc], 0
xor eax, eax
mov dword [0x40d4e0], eax
mov word [0x40d4e4], 0
mov word [0x40d4d0], 0
xor eax, eax
mov dword [0x40d4cc], eax
xor ebx, ebx
xor eax, eax
mov dword [0x40d4d4], eax
xor eax, eax
mov dword [0x40d4d8], eax
mov eax, 0x8002
call fcn.004024e8
mov dword [0x40d4d4], eax
mov eax, 0x8002
call fcn.004024e8
mov dword [0x40d4d8], eax
xor eax, eax
push ebp
push 0x405cfd
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [0x40d4e8], eax
xor eax, eax
mov dword [0x40d4ec], eax
xor eax, eax
push ebp
push 0x405cc7
push dword fs:[eax]
mov dword fs:[eax], esp
mov word [esi], 0
lea eax, [ebp - 4]
call fcn.00405b28
cmp bx, word [esi]
jae 0x405c6c
mov bx, word [esi]
cmp dword [ebp - 4], 0
je 0x405c57
cmp word [0x40d4e4], 0
jbe 0x405cbd
push 0
lea eax, [ebp - 8]
push eax
movzx eax, word [0x40d4e4]
push eax
mov eax, dword [0x40d4d8]
push eax
mov eax, dword [0x40c44c]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [0x40c424]
movzx edx, word [0x40d4e4]
mov eax, dword [0x40d4d8]
call fcn.0040b858
mov word [0x40d4e4], 0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x405cd1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405d04
mov edx, 0x8001
mov eax, dword [0x40d4d4]
call fcn.00402500
mov edx, 0x8001
mov eax, dword [0x40d4d8]
call fcn.00402500
ret

Function at 0x406ea0
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 0x406ed9
mov ecx, eax
dec ecx
lea edx, [ebp - 0x100]
mov eax, ebx
call fcn.004031c0
jmp 0x406ee2
mov eax, ebx
mov edx, esi
call fcn.00403174
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4

Function at 0x406eec
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 0x406f0d
mov al, byte [esp]
jmp 0x406f0f
mov eax, ebx
pop edx
pop edi
pop esi
pop ebx
ret

Function at 0x4091dc
Capabilities:
Create process on windows

Disassembly:
push ebx
push esi
push edi
add esp, 0xffffff6c
mov ebx, edx
mov edi, eax
xor esi, esi
mov eax, dword [ebx]
mov edx, 0x40927c
call fcn.00403438
jne 0x409207
mov eax, ebx
mov edx, 0x40928c
call fcn.00403330
jmp 0x40920e
mov eax, ebx
call fcn.004030dc
mov dword [esp], 0x94
push esp
call sub.KERNEL32.DLL_GetVersionExA
test eax, eax
je 0x409266
mov eax, dword [esp + 0x10]
dec eax
je 0x40922b
dec eax
je 0x40923b
jmp 0x409255
mov ecx, dword [edi]
mov eax, edi
mov edx, 0x409298
call fcn.00403374
jmp 0x409255
push 0x4092e0
push dword [ebx]
push 0x409324
push dword [edi]
mov eax, edi
mov edx, 4
call fcn.004033e8
push 5
mov eax, dword [edi]
call fcn.004034ec
push eax
call sub.KERNEL32.DLL_WinExec
mov esi, eax
mov eax, esi
add esp, 0x94
pop edi
pop esi
pop ebx
ret
Function at 0x40932c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
push 0
push 0
xor edx, edx
push ebp
push 0x4093ce
push dword fs:[edx]
mov dword fs:[edx], esp
dec eax
jne 0x4093b3
cmp byte [0x40c3bc], 0
je 0x4093b3
lea edx, [ebp - 4]
mov eax, 1
call fcn.00408df8
lea edx, [ebp - 8]
mov eax, 2
call fcn.00408df8
mov eax, dword [ebp - 4]
call fcn.00403328
cmp eax, 4
jle 0x4093b3
mov eax, dword [ebp - 4]
call fcn.00408ee0
test al, al
je 0x40938d
lea edx, [ebp - 8]
lea eax, [ebp - 4]
call fcn.004091dc
jmp 0x4093b3
push 5
mov eax, dword [0x40c440]
push eax
mov eax, dword [ebp - 8]
call fcn.004034ec
push eax
mov eax, dword [ebp - 4]
call fcn.004034ec
push eax
push 0x4093dc
push 0
call sub.shell32.dll_ShellExecuteA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4093d5
lea eax, [ebp - 8]
mov edx, 2
call fcn.00403100
ret

Function at 0x40958c
Capabilities:
Set current directory

Disassembly:
push ebx
push esi
push edi
mov esi, edx
mov edi, 0x40d5e8
xor ebx, ebx
mov dword [edi], eax
xor eax, eax
mov dword [edi + 4], eax
mov dword [edi + 8], 0x40d608
mov eax, 0x4095fc
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 1
mov eax, 0x409528
mov dword [edi + 0x14], eax
xor eax, eax
mov dword [edi + 0x18], eax
mov byte [0x40d718], 0
push edi
call sub.shell32.dll_SHBrowseForFolderA
mov dword [0x40d710], eax
cmp dword [0x40d710], 0
je 0x4095f5
push esi
mov eax, dword [0x40d710]
push eax
call sub.shell32.dll_SHGetPathFromIDListA
push esi
call sub.KERNEL32.DLL_SetCurrentDirectoryA
mov bl, byte [0x40d718]
mov eax, ebx
pop edi
pop esi
pop ebx
ret
Function at 0x409624
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push 0
mov eax, dword [0x40c3e8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_GetFileSize
mov edx, dword [0x40c42c]
sub eax, dword [edx]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x10016
jle 0x409656
mov dword [ebp - 4], 0x10016
cmp dword [ebp - 4], 0x16
jle 0x409754
mov eax, dword [ebp - 4]
call fcn.004024e8
mov dword [ebp - 0x10], eax
xor eax, eax
push ebp
push 0x40974d
push dword fs:[eax]
mov dword fs:[eax], esp
mov dx, 1
xor eax, eax
call fcn.0040b9d8
mov ebx, eax
mov eax, dword [ebp - 4]
neg eax
mov dx, 2
call fcn.0040b9d8
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 0x10]
push eax
mov eax, dword [0x40c3e8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_ReadFile
xor edx, edx
mov eax, ebx
call fcn.0040b9d8
mov eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jne 0x409734
mov esi, dword [ebp - 4]
sub esi, 0x16
test esi, esi
jl 0x409734
inc esi
xor ebx, ebx
mov eax, dword [ebp - 0x10]
cmp byte [eax + ebx], 0x50
jne 0x409730
mov eax, dword [ebp - 0x10]
cmp byte [eax + ebx + 1], 0x4b
jne 0x409730
mov eax, dword [ebp - 0x10]
cmp byte [eax + ebx + 2], 5
jne 0x409730
mov eax, dword [ebp - 0x10]
cmp byte [eax + ebx + 3], 6
jne 0x409730
push 0
mov eax, dword [0x40c3e8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_GetFileSize
mov edx, dword [ebp - 0x10]
movzx edx, byte [edx + ebx + 0x15]
shl edx, 8
mov ecx, dword [ebp - 0x10]
movzx ecx, byte [ecx + ebx + 0x14]
add edx, ecx
add edx, dword [ebp - 0xc]
add edx, ebx
add edx, 0x16
cmp eax, edx
jne 0x409730
mov byte [0x40c3e0], 1
jmp 0x409734
inc ebx
dec esi
jne 0x4096d0
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409754
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0x10]
call fcn.00402500
ret
cmp byte [0x40c3e0], 0
jne 0x409775
push 0x10
push 0x40977c
push 0x409788
push 0
call sub.user32.dll_MessageBoxA
call fcn.00402fac
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40accc
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor edx, edx
push ebp
push 0x40ad5b
push dword fs:[edx]
mov dword fs:[edx], esp
xor eax, eax
mov dword [0x40d740], eax
push 0
lea eax, [ebp - 4]
push eax
push 0x1e
push 0x40d740
mov eax, dword [0x40d738]
push eax
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [0x40d740]
cmp eax, dword [0x40d730]
je 0x40ad18
cmp eax, 0x50000000
je 0x40ad18
xor ebx, ebx
jmp 0x40ad1a
mov bl, 1
test bl, bl
je 0x40ad2a
mov eax, dword [0x40d752]
mov dword [0x40d734], eax
jmp 0x40ad51
xor edx, edx
mov dword [0x40d734], edx
cmp eax, 0x8074b50
jne 0x40ad51
mov eax, dword [0x40c3f8]
mov eax, dword [eax]
add eax, 0x10
xor edx, edx
call fcn.0040b9d8
call fcn.0040accc
mov ebx, eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x40ad67
mov eax, ebx
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret
Function at 0x40b5a8
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
push esi
push edi
mov ebx, eax
mov esi, 0x40d724
mov edx, dword [esi]
mov eax, ebx
call fcn.0040b58c
mov edi, eax
mov dword [esi], edi
and edi, 0xff
add dword [esi + 4], edi
imul ebx, dword [esi + 4], 0x8088405
inc ebx
mov dword [esi + 4], ebx
mov eax, ebx
call fcn.00404a8c
call fcn.00404a90
mov edx, dword [esi + 8]
call fcn.0040b58c
mov dword [esi + 8], eax
pop edi
pop esi
pop ebx
ret

Function at 0x40b6a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov word [ebp - 4], cx
mov byte [ebp - 1], dl
mov esi, eax
mov eax, dword [ebp + 8]
call fcn.004034dc
xor eax, eax
push ebp
push 0x40b773
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
cmp dword [ebp + 8], 0
je 0x40b75d
mov eax, dword [ebp + 8]
call fcn.0040b5f0
mov al, byte [ebp - 1]
dec eax
test al, al
jb 0x40b71c
inc eax
mov byte [ebp - 7], al
mov bl, 0
call fcn.0040b67c
mov edi, ebx
and edi, 0xff
mov edx, edi
xor ecx, ecx
mov cl, byte [ebp - 1]
add edx, ecx
xor al, byte [esi + edx]
mov byte [ebp - 6], al
mov al, byte [ebp - 6]
call fcn.0040b5a8
mov al, byte [ebp - 6]
mov byte [esi + edi], al
inc ebx
dec byte [ebp - 7]
jne 0x40b6ec
xor eax, eax
mov al, byte [ebp - 1]
mov bl, byte [esi + eax - 1]
mov ax, word [ebp - 4]
and ax, 8
cmp ax, 8
je 0x40b74a
mov eax, dword [ebp + 0x10]
call fcn.00404a8c
call fcn.00404a90
cmp bl, al
jne 0x40b75d
mov byte [ebp - 5], 1
jmp 0x40b75d
xor eax, eax
mov al, bl
movzx edx, word [ebp + 0xc]
shr edx, 8
cmp eax, edx
jne 0x40b75d
mov byte [ebp - 5], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b77a
lea eax, [ebp + 8]
call fcn.004030dc
ret
Function at 0x40b8bc
Capabilities:
Encode data using xor
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff8
push ebx
push esi
push edi
mov edi, dword [0x40c458]
mov eax, dword [edi]
mov edx, 0x8000
call fcn.0040b87c
add eax, 2
call fcn.004024e8
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40b9b2
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [edi], 0
jle 0x40b997
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [edi]
mov edx, 0x8000
call fcn.0040b87c
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x40c3e8]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_ReadFile
mov eax, dword [ebp - 4]
sub dword [edi], eax
mov eax, dword [0x40c454]
mov ax, word [eax + 6]
and ax, 1
cmp ax, 1
jne 0x40b962
mov esi, dword [ebp - 4]
dec esi
test esi, esi
jl 0x40b962
inc esi
xor ebx, ebx
call fcn.0040b67c
mov edx, dword [ebp - 8]
mov dl, byte [edx + ebx]
xor al, dl
mov edx, dword [ebp - 8]
mov byte [edx + ebx], al
mov eax, dword [ebp - 8]
mov al, byte [eax + ebx]
call fcn.0040b5a8
inc ebx
dec esi
jne 0x40b940
push 0
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp - 4]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [0x40c44c]
mov eax, dword [eax]
push eax
call sub.KERNEL32.DLL_WriteFile
mov ecx, dword [0x40c424]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
call fcn.0040b858
cmp dword [edi], 0
jg 0x40b8f9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40b9b9
mov edx, 1
mov eax, dword [ebp - 8]
call fcn.00402500
ret