joyce8/EMBER2024-capa huggingface dataset:
Function at 0x504640
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xac
mov eax, 0x7fffffff
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x10]
cmp edi, eax
push 0
cmova edi, eax
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5046e9
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileType]
mov dword [ebp - 4], 0xffffffff
nop
cmp dword [ebp + 0x10], 0xffffffff
je 0x50468a
xor eax, eax
jmp 0x50469f
push str.bytes_read___static_cast_DWORD___1_
lea eax, [ebp - 4]
push eax
lea eax, [ebp + 0x10]
push eax
call fcn.004f0080
add esp, 0xc
test eax, eax
je 0x5046c6
push eax
push 0x7e
push str..._.._.._util_file_file_io_win.cc
push str.long___cdecl_crashpad::ReadFile_void__void__unsigned_int_
lea ecx, [ebp - 0xac]
call fcn.0050c2c0
lea ecx, [ebp - 0xac]
call fcn.0050c3e0
cmp dword [ebp + 0x10], 0
jne 0x5046fd
push esi
call ebx
cmp eax, 3
jne 0x5046fd
push 0
lea eax, [ebp + 0x10]
push eax
push edi
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x504680
call dword [sym.imp.KERNEL32.dll_GetLastError]
sub eax, 0x6d
pop edi
neg eax
pop esi
sbb eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x505660
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x505681
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x50571f
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x5056a0
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.GetFileAttributes
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x75
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::IsRegularFile_const_class_base::FilePath__
lea ecx, [ebp - 0x104]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x5056ee
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0x104]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor eax, eax
xor edx, edx
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
test eax, 0x410
jne 0x5057a1
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x505730
mov eax, dword [esi]
lea ecx, [ebp - 0x54]
push ecx
push eax
call fcn.00531bd2
add esp, 8
test eax, eax
jne 0x505756
mov eax, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x38]
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
push str.stat
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0xac
push str..._.._.._util_file_filesystem_win.cc
push str.unsigned___int64___cdecl_crashpad::GetFileSize_const_class_base::FilePath__
lea ecx, [ebp - 0x104]
call fcn.0050c390
push eax
call fcn.00439550
add esp, 8
cmp dword [esi + 0x14], 8
jb 0x50578e
mov esi, dword [esi]
push esi
mov ecx, eax
call fcn.004cf3b0
lea ecx, [ebp - 0x104]
call fcn.0050c5b0
mov ecx, dword [ebp - 4]
xor eax, eax
xor ecx, ebp
xor edx, edx
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
Function at 0x5057c0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5057e1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x505880
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x505800
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.GetFileAttributes
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x82
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::IsDirectory_const_class_base::FilePath__bool_
lea ecx, [ebp - 0xcc]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x505851
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0xcc]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
cmp byte [ebp + 0xc], 0
jne 0x50588d
test eax, 0x400
jne 0x50586f
mov ecx, dword [ebp - 4]
shr eax, 4
xor ecx, ebp
and al, 1
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5058d1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x50596d
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x5058f0
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.GetFileAttributes
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x75
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::IsRegularFile_const_class_base::FilePath__
lea ecx, [ebp - 0xcc]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x50593e
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0xcc]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
test eax, 0x410
pop esi
sete al
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
Function at 0x505990
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x5059b1
mov eax, dword [esi]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
jne 0x505ae9
cmp byte [ebp + 0x10], al
je 0x505a5d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x505a5d
push 1
push esi
call fcn.005057c0
add esp, 8
test al, al
jne 0x505ae9
sub esp, 8
mov ecx, esp
push esi
call fcn.005051e0
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
lea ecx, [ebp - 0xc4]
mov esi, eax
push 2
push 0x5d
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::LoggingCreateDirectory_const_class_base::FilePath__enum_crashpad::FilePermissions_bool_
call fcn.0050c270
push str._not_a_directory
push esi
push eax
call fcn.0049cf90
add esp, 8
push eax
call fcn.00439550
add esp, 8
lea ecx, [ebp - 0xc4]
call fcn.0050c3e0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x505a6c
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.CreateDirectory
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x62
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::LoggingCreateDirectory_const_class_base::FilePath__enum_crashpad::FilePermissions_bool_
lea ecx, [ebp - 0xcc]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x505aba
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0xcc]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
Function at 0x505ca0
Capabilities:
Delete directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x505cc1
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
jne 0x505d5c
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x505cdf
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.RemoveDirectory
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x30
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::_anonymous_namespace::LoggingRemoveDirectoryImpl_const_class_base::FilePath__
lea ecx, [ebp - 0xcc]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x505d2d
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0xcc]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret

Function at 0x505d70
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xcc
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
mov eax, esi
cmp dword [esi + 0x14], 8
jb 0x505d91
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x505dc1
and eax, 0x410
cmp eax, 0x410
jne 0x505dc1
push esi
call fcn.00505ca0
add esp, 4
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x505dcb
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x505e69
sub esp, 8
mov eax, esi
cmp dword [esi + 0x14], 8
mov ecx, esp
jb 0x505de9
mov eax, dword [esi]
mov dword [ecx], eax
mov eax, dword [esi + 0x10]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x1c]
push eax
call fcn.0050d0c0
add esp, 0xc
mov esi, eax
push str.DeleteFile
call sub.KERNEL32.dll_GetLastError
push eax
push 2
push 0x95
push str..._.._.._util_file_filesystem_win.cc
push str.bool___cdecl_crashpad::LoggingRemoveFile_const_class_base::FilePath__
lea ecx, [ebp - 0xcc]
call fcn.0050c390
push eax
call fcn.00439550
mov ecx, dword [esi + 0x10]
add esp, 8
cmp dword [esi + 0x14], 0x10
jb 0x505e3a
mov esi, dword [esi]
push ecx
push esi
push eax
call fcn.0049d120
add esp, 0xc
lea ecx, [ebp - 0xcc]
call fcn.0050c5b0
lea ecx, [ebp - 0x1c]
call fcn.004166b0
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
Function at 0x507930
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb4
push ebx
push esi
xor ebx, ebx
mov esi, ecx
push ebx
push ebx
push esi
push 0x5079c0
push ebx
push ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 4], eax
test eax, eax
jne 0x5079a5
push 0x597308
push 0x596970
push str.Check_failed:_platform_thread_
lea ebx, [eax + 2]
call sub.KERNEL32.dll_GetLastError
push eax
push 4
push 0x1b
push str..._.._.._util_thread_thread_win.cc
push str.void___thiscall_crashpad::Thread::Start_void_
lea ecx, [ebp - 0xb4]
call fcn.0050c390
push eax
call fcn.00439550
add esp, 8
push eax
call fcn.00439550
add esp, 8
push eax
call fcn.00439550
add esp, 8
pop esi
test bl, 2
pop ebx
je 0x5079b7
lea ecx, [ebp - 0xb4]
call fcn.0050c5b0
mov esp, ebp
pop ebp
ret
Function at 0x50c3e0
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x5cc9b4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
mov eax, dword [eax + 4]
mov eax, dword [eax + edi + 0x30]
mov esi, dword [eax + 4]
mov ecx, esi
mov dword [ebp - 0x3c], esi
mov eax, dword [esi]
call dword [eax + 4]
lea eax, [ebp - 0x40]
push eax
call fcn.00414ad0
add esp, 4
mov ecx, eax
mov edx, dword [eax]
push 0xa
mov edx, dword [edx + 0x20]
call edx
mov byte [ebp - 0x38], al
test esi, esi
je 0x50c43b
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
test eax, eax
je 0x50c43b
mov edx, dword [eax]
mov ecx, eax
push 1
call dword [edx]
push dword [ebp - 0x38]
mov ecx, edi
call fcn.004bc790
mov ecx, edi
call fcn.00434af0
lea eax, [ebp - 0x1c]
mov ecx, edi
push eax
call fcn.00440fa0
mov eax, dword [0x7c2848]
test eax, eax
je 0x50c489
lea ecx, [ebp - 0x1c]
push ecx
push dword [edi + 0x9c]
push dword [edi + 0xa0]
push dword [edi + 0x98]
push dword [edi + 0xa4]
call eax
add esp, 0x14
test al, al
jne 0x50c510
mov eax, dword [0x5cc970]
test al, 4
je 0x50c4c5
cmp dword [ebp - 8], 0x10
lea esi, [ebp - 0x1c]
push 2
cmovae esi, dword [ebp - 0x1c]
call fcn.0051bd06
push esi
push 0x566340
push eax
call fcn.004bc980
push 2
call fcn.0051bd06
push eax
call fcn.0051c2bd
mov eax, dword [0x5cc970]
add esp, 0x18
test al, 2
je 0x50c504
sub esp, 8
lea eax, [ebp - 0x1c]
cmp dword [ebp - 8], 0x10
mov ecx, esp
cmovae eax, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
mov dword [ecx + 4], eax
lea eax, [ebp - 0x34]
push eax
call fcn.0050cfc0
add esp, 0xc
cmp dword [eax + 0x14], 8
jb 0x50c4f5
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea ecx, [ebp - 0x34]
call fcn.00416700
cmp dword [edi + 0xa4], 4
jne 0x50c510
int3
mov edx, dword [ebp - 8]
cmp edx, 0x10
jb 0x50c540
mov ecx, dword [ebp - 0x1c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x50c536
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x50c59f
push edx
push ecx
call fcn.004b9160
add esp, 8
mov eax, dword [edi]
lea esi, [edi + 0x50]
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x55a268
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x50]
mov dword [ecx + esi - 0x54], eax
lea ecx, [esi - 0x4c]
call fcn.0043c150
mov eax, dword [esi - 0x50]
push esi
mov eax, dword [eax + 4]
mov dword [eax + esi - 0x50], 0x5558b4
mov eax, dword [esi - 0x50]
mov ecx, dword [eax + 4]
lea eax, [ecx - 8]
mov dword [ecx + esi - 0x54], eax
mov dword [esi], vtable.std::ios_base.0
call fcn.00515f13
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
call fcn.00514f0c
mov esp, ebp
pop ebp
ret
call fcn.0051bb5f
int3
Function at 0x512e20
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.0048fda0

Function at 0x512e90
Capabilities:
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x512e9c
pop ebp
ret
mov dword [ebp + 0xc], eax
pop ebp
jmp fcn.00512f00
Function at 0x526f24
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00514210
mov eax, dword [0x5cc9b4]
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.00536d4c
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x526f66
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x5270c2
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00514120
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 + 0x7c3750]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.005296cd
mov ecx, dword [esi*4 + 0x7c3750]
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 0x5270bb
cmp eax, dword [edi + ecx + 0x24]
jne 0x5270bb
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 0x5270bb
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.005296cd
add esp, 0x14
test edx, edx
jl 0x5270bb
jg 0x527031
test eax, eax
jb 0x5270bb
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x5270bb
jl 0x52704b
cmp dword [ebp - 0x1008], eax
ja 0x5270bb
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x527069
test ebx, ebx
je 0x5270a2
cmp ecx, edi
jae 0x5270a2
mov al, byte [ecx]
cmp al, 0xd
jne 0x527083
lea eax, [edi - 1]
cmp ecx, eax
jae 0x52708f
cmp byte [ecx + 1], 0xa
jne 0x52708f
inc ecx
jmp 0x52708f
movzx eax, al
movsx eax, byte [eax + 0x5ccc30]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x527069
cmp edx, ebx
jne 0x527069
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x5270c0
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00514f0c
leave
ret
Function at 0x52807e
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 + 0x7c3750]
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 0x5280be
cmp byte [ebx], 0xa
jne 0x5280be
or byte [eax + edi + 0x28], 4
jmp 0x5280c3
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x5281c1
mov al, byte [edx]
cmp al, 0x1a
je 0x5281a3
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x5280f2
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x528117
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x528121
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 0x5280d4
jmp 0x5281c1
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 0x52819e
cmp dword [ebp - 0xc], 0
je 0x52819e
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x7c3750]
test byte [eax + edi + 0x28], 0x48
je 0x528178
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x528163
mov byte [esi], dl
jmp 0x528174
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x7c3750]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x5281c1
cmp byte [ebp - 1], 0xa
jne 0x528187
cmp esi, ebx
jne 0x528187
mov byte [esi], 0xa
jmp 0x5281c0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.005296eb
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x5281c1
mov byte [esi], 0xd
jmp 0x5281c0
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x7c3750]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x5281bd
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x5281c1
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x5281ca
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 + 0x7c3750]
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 0x52820d
cmp word [esi], dx
jne 0x52820d
or byte [edi + eax + 0x28], 4
jmp 0x528212
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 0x528365
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 0x528345
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x528254
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x52828a
cmp eax, edx
jae 0x528296
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 0x52822c
jmp 0x528365
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 0x528341
cmp dword [ebp - 0x14], 0
je 0x528341
mov eax, dword [ebx*4 + 0x7c3750]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x528319
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x5282e2
mov word [esi], cx
jmp 0x528315
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x7c3750]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x7c3750]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x7c3750]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x528365
pop ebx
cmp word [ebp - 4], bx
jne 0x52832a
cmp esi, dword [ebp + 0xc]
jne 0x52832a
mov word [esi], bx
jmp 0x528362
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.005296eb
add esp, 0x10
cmp word [ebp - 4], bx
je 0x528365
push 0xd
jmp 0x52835e
mov ecx, dword [ebx*4 + 0x7c3750]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x52835c
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x528365
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