joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002e30
Capabilities:
Allocate thread local storage

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push edi
mov edi, ecx
lea ebp, [edi + 0x84]
push ebp
call esi
lea eax, [edi + 0x9c]
push eax
call esi
lea eax, [edi + 0xbc]
push eax
call esi
lea eax, [edi + 0xd4]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeConditionVariable]
lea eax, [edi + 0xd8]
push eax
call esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [edi + 0xb8], eax
lea eax, [edi + 0x7c]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0xf8]
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x100]
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x110]
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
lea eax, [edi + 0x118]
push 1
push 0
mov dword [eax + 4], eax
mov dword [eax], eax
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [edi + 0xc], eax
test eax, eax
jne 0x10002ee7
xor ecx, ecx
call fcn.100075f0
push eax
push str.CreateEvent_failed:__s
push str.usbi_create_event
push 1
push 0
call fcn.10007340
mov ebx, 0xffffff9d
jmp 0x10002fcb
push ecx
mov edx, eax
mov ecx, edi
call fcn.10004840
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ebx, eax
add esp, 4
test ebx, ebx
js 0x10002fa7
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerW]
mov dword [edi + 0x10], eax
test eax, eax
jne 0x10002f4e
xor ecx, ecx
call fcn.100075f0
push eax
push str.CreateWaitableTimer_failed:__s
push str.usbi_create_timer
push 2
push 0
call fcn.10007340
push str.timer_not_available_for_timeouts
push str.usbi_io_init
push 4
push edi
call fcn.10007340
add esp, 0x24
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push str.using_timer_for_timeouts
push str.usbi_io_init
push 4
push edi
call fcn.10007340
mov edx, dword [edi + 0x10]
add esp, 0xc
mov ecx, edi
call fcn.10004840
mov ebx, eax
add esp, 4
test ebx, ebx
jns 0x10002f47
push dword [edi + 0x10]
call esi
test eax, eax
jne 0x10002f9d
xor ecx, ecx
call fcn.100075f0
push eax
push str.CloseHandle_failed:__s
push str.usbi_destroy_timer
push 2
push 0
call fcn.10007340
add esp, 0x14
mov edx, dword [edi + 0xc]
mov ecx, edi
call fcn.100048f0
push dword [edi + 0xc]
call esi
test eax, eax
jne 0x10002fce
xor ecx, ecx
call fcn.100075f0
push eax
push str.CloseHandle_failed:__s
push str.usbi_destroy_event
push 2
push 0
call fcn.10007340
add esp, 0x14
mov esi, dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
push ebp
call esi
lea eax, [edi + 0x9c]
push eax
call esi
lea eax, [edi + 0xbc]
push eax
call esi
lea eax, [edi + 0xd8]
push eax
call esi
push dword [edi + 0xb8]
call dword [sym.imp.KERNEL32.dll_TlsFree]
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
ret
Function at 0x100076e0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x110
mov eax, dword [0x1009a340]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebx
push esi
push edi
push 0x104
lea eax, [esp + 0x10]
mov edi, edx
push eax
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov edx, eax
test edx, edx
je 0x10007774
cmp edx, 0x104
jae 0x10007774
mov ecx, edi
lea ebx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x10007720
sub ecx, ebx
lea eax, [edx + 6]
add eax, ecx
cmp eax, 0x104
jb 0x1000773c
push str.program_assertion_failed___library_path_buffer_overflow
jmp 0x10007779
push edi
lea eax, [esp + 0x10]
add eax, edx
push str._s.dll
push eax
call fcn.100075b0
add esp, 0xc
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.100424c3
add esp, 0x110
ret
push str.program_assertion_failed___could_not_get_system_directory
push str.load_system_library
push 1
push esi
call fcn.10007340
mov ecx, dword [esp + 0x128]
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.100424c3
add esp, 0x110
ret
Function at 0x10007800
Capabilities:
Hash data using djb2

Disassembly:
sub esp, 8
push ebx
mov ebx, ecx
mov edx, 0x1505
mov dword [esp + 4], ebx
push esi
mov esi, ebx
test ebx, ebx
jne 0x1000781e
pop esi
xor eax, eax
pop ebx
add esp, 8
ret
movsx ecx, byte [ebx]
test ecx, ecx
je 0x10007838
mov eax, edx
lea esi, [esi + 1]
shl edx, 5
add edx, ecx
movsx ecx, byte [esi]
add edx, eax
test ecx, ecx
jne 0x10007825
push ebp
test edx, edx
mov ebp, 1
mov ecx, ebp
mov eax, 0xc0906d
cmovne ecx, edx
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 9
imul eax, eax, 0x3fd
push edi
push 0x1009c790
sub ecx, eax
cmovne ebp, ecx
mov esi, ebp
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x1009c774]
mov ecx, dword [eax + esi*8]
test ecx, ecx
je 0x10007960
lea edi, [eax + esi*8]
cmp ecx, ebp
jne 0x100078bd
mov ecx, dword [edi + 4]
mov eax, ebx
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x100078b0
test dl, dl
je 0x100078ac
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x100078b0
add eax, 2
add ecx, 2
test dl, dl
jne 0x10007890
xor eax, eax
jmp 0x100078b5
sbb eax, eax
or eax, 1
test eax, eax
je 0x100079c7
push dword [edi + 4]
push ebx
push str.hash_collision___s_vs__s_
push str.htab_hash
push 4
push 0
call fcn.10007340
mov eax, 0x14191f7
add esp, 0x18
mul ebp
mov eax, ebp
sub eax, edx
shr eax, 1
add eax, edx
mov edx, ebp
shr eax, 9
imul eax, eax, 0x3fb
sub edx, eax
inc edx
mov dword [esp + 0x14], edx
mov ecx, esi
sub ecx, edx
cmp esi, edx
lea eax, [ecx + 0x3fd]
cmova eax, ecx
mov esi, eax
mov edi, esi
cmp edi, ebp
je 0x1000795c
mov eax, dword [0x1009c774]
mov ebx, dword [eax + edi*8]
cmp ebx, ebp
jne 0x10007950
mov eax, dword [eax + edi*8 + 4]
mov ecx, dword [esp + 0x10]
mov dl, byte [ecx]
cmp dl, byte [eax]
jne 0x10007943
test dl, dl
je 0x1000793f
mov dl, byte [ecx + 1]
cmp dl, byte [eax + 1]
jne 0x10007943
add ecx, 2
add eax, 2
test dl, dl
jne 0x10007923
xor eax, eax
jmp 0x10007948
sbb eax, eax
or eax, 1
test eax, eax
je 0x10007958
mov edx, dword [esp + 0x14]
mov esi, edi
test ebx, ebx
je 0x1000795c
jmp 0x100078f8
mov esi, edi
jmp 0x100079c7
mov ebx, dword [esp + 0x10]
cmp dword [0x1009c770], 0x3fd
jb 0x1000798b
push 0x3fd
push str.hash_table_is_full___lu_entries_
push str.htab_hash
push 1
push 0
call fcn.10007340
add esp, 0x14
xor esi, esi
jmp 0x100079c7
push ebx
call fcn.1004ce85
mov ecx, eax
add esp, 4
mov eax, dword [0x1009c774]
mov dword [eax + esi*8 + 4], ecx
lea eax, [eax + esi*8]
test ecx, ecx
jne 0x100079bf
push str.could_not_duplicate_string_for_hash_table
push str.htab_hash
push 1
push ecx
call fcn.10007340
add esp, 0x10
xor esi, esi
jmp 0x100079c7
inc dword [0x1009c770]
mov dword [eax], ebp
push 0x1009c790
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop ebp
mov eax, esi
pop esi
pop ebx
add esp, 8
ret
Function at 0x10008100
Capabilities:
Create thread

Disassembly:
mov eax, dword [0x1009c784]
push ebx
inc eax
xor bl, bl
mov dword [0x1009c784], eax
push esi
mov esi, dword [esp + 0xc]
push edi
cmp eax, 1
jne 0x10008228
call fcn.10007a70
mov dword [0x1009c964], eax
test eax, eax
jne 0x1000814a
push str.failed_to_detect_Windows_version
push str.windows_init
push 1
push esi
call fcn.10007340
add esp, 0x10
mov edi, 0xfffffff4
jmp 0x100082b3
cmp eax, 4
jge 0x10008156
push str.Windows_version_is_too_old
jmp 0x10008130
cmp dword [0x1009c774], 0
je 0x100081b0
push str.program_assertion_failed___hash_table_already_allocated
push str.htab_create
push 1
push esi
call fcn.10007340
add esp, 0x10
push esi
call fcn.10009ed0
mov edi, eax
add esp, 4
test edi, edi
jne 0x100082b3
push esi
mov bl, 1
call fcn.10011c90
add esp, 4
test eax, eax
jne 0x10008213
push str.UsbDk_backend_is_available
push str.windows_init
push 4
push esi
call fcn.10007340
mov byte [0x1009c635], bl
jmp 0x10008225
push 0x1009c790
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
push 0x3fd
push str.using__lu_entries_hash_table
push str.htab_create
push 4
push esi
call fcn.10007340
push 8
push 0x3fe
mov dword [0x1009c770], 0
call fcn.1004b2c2
add esp, 0x1c
mov dword [0x1009c774], eax
test eax, eax
jne 0x10008174
push str.could_not_allocate_space_for_hash_table
push str.htab_create
push 1
push esi
call fcn.10007340
add esp, 0x10
mov edi, 0xfffffff5
jmp 0x100082b3
push str.UsbDk_backend_is_not_available
push str.windows_init
push 3
push esi
call fcn.10007340
add esp, 0x10
push 1
push 0
push 0
push 0xffffffffffffffff
mov dword [esi + fcn.10009ed0], 0x10090d50
mov edi, 0xfffffff5
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [esi + 0x12c], eax
test eax, eax
jne 0x1000826e
xor ecx, ecx
call fcn.100075f0
push eax
push str.failed_to_create_I_O_completion_port:__s
push str.windows_init
push 1
push esi
call fcn.10007340
add esp, 0x14
jmp 0x100082b3
push 0
push 0
push esi
push 0x10007eb0
push 0
push 0
call fcn.10054cc3
add esp, 0x18
mov dword [esi + 0x130], eax
test eax, eax
jne 0x100082b1
push str.failed_to_create_I_O_completion_port_thread
push str.windows_init
push 1
push esi
call fcn.10007340
add esp, 0x10
push dword [esi + 0x12c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x100082b3
xor edi, edi
cmp dword [0x1009c784], 1
jne 0x10008302
test edi, edi
je 0x10008302
cmp byte [0x1009c635], 0
je 0x100082ea
mov eax, dword [0x1009c910]
test eax, eax
je 0x100082e3
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [0x1009c910], 0
mov byte [0x1009c635], 0
test bl, bl
je 0x100082f7
push esi
call fcn.10009f50
add esp, 4
call fcn.100077b0
dec dword [0x1009c784]
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x1002c150
Capabilities:
Enumerate pe sections

Disassembly:
push ecx
push edi
push 0
call fcn.10003120
mov edi, eax
test edi, edi
jne 0x1002c164
xor al, al
pop edi
pop ecx
ret
push ebx
mov ebx, dword [esp + 0x20]
lea eax, [ebx + 0x10]
push eax
push 1
call fcn.1004b2c2
mov edx, eax
add esp, 8
test edx, edx
jne 0x1002c1a3
call fcn.1004b2af
push dword [eax]
push str.Unable_to_allocate_buffer_for_libusb_control_transfer._Error:__d.
push dword [esp + 0x18]
push 2
call fcn.1002bb90
add esp, 0x10
push edi
call fcn.10003170
pop ebx
xor al, al
pop edi
pop ecx
ret
mov eax, dword [esp + 0x24]
push esi
lea esi, [ebx + 8]
add esi, edx
test eax, eax
je 0x1002c1b3
mov dword [esi], eax
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x1c]
mov dword [esi + 4], eax
mov al, byte [esp + 0x18]
mov byte [edx + 1], al
mov eax, ecx
shr eax, 8
mov byte [esp + 0xd], al
mov byte [esp + 0xc], cl
movzx eax, word [esp + 0xc]
mov ecx, dword [esp + 0x20]
mov word [edx + 2], ax
mov eax, ecx
shr eax, 8
mov byte [esp + 0xd], al
mov byte [esp + 0xc], cl
movzx eax, word [esp + 0xc]
mov word [edx + 4], ax
mov eax, ebx
shr eax, 8
mov byte [esp + 0xd], al
mov byte [edx], 0xc0
mov byte [esp + 0xc], bl
movzx eax, word [esp + 0xc]
mov word [edx + 6], ax
mov eax, dword [esp + 0x14]
push edi
mov eax, dword [eax + 8]
mov dword [edi], eax
mov word [edi + 5], 0
mov dword [edi + 8], 0
mov dword [edi + 0x20], edx
movzx eax, word [edx + 6]
mov ecx, eax
mov dword [edi + 0x1c], esi
and ecx, 0xffffff00
movzx eax, al
or ecx, eax
mov dword [edi + 0x18], 0x1002bf40
add ecx, 8
mov byte [edi + 4], 2
mov dword [edi + 0x10], ecx
call fcn.100034f0
mov esi, eax
call fcn.1004b2af
test esi, esi
mov dword [eax], esi
pop esi
jne 0x1002c197
pop ebx
mov al, 1
pop edi
pop ecx
ret
Function at 0x1002d090
Capabilities:
Create thread

Disassembly:
push esi
mov esi, dword [esp + 8]
push 0
push 0
push esi
push 0x1002d020
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x1c], eax
call fcn.1004b2af
pop esi
mov dword [eax], 0
mov al, 1
ret
Function at 0x100416e2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
push edi
mov edi, dword [ebp + 0xc]
test eax, eax
jg 0x10041703
jl 0x100416fa
test edi, edi
jne 0x10041703
xor eax, eax
xor edx, edx
jmp 0x100417c4
cmp dword [ebx + 0x38], 0
je 0x10041718
push eax
push edi
push dword [ebp + 8]
call fcn.100417ca
jmp 0x100417c4
mov eax, dword [ebx + 0x1c]
push esi
mov esi, edi
mov ecx, dword [eax]
test ecx, ecx
je 0x1004175f
mov eax, dword [ebx + 0x2c]
mov eax, dword [eax]
mov dword [ebp - 4], eax
test eax, eax
je 0x1004175f
cmp eax, edi
jb 0x10041739
mov eax, edi
mov dword [ebp - 4], edi
push eax
push ecx
push dword [ebp + 8]
call fcn.10043e40
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 8]
sub esi, ecx
add eax, ecx
mov dword [ebp - 4], eax
mov eax, dword [ebx + 0x2c]
sub dword [eax], ecx
mov eax, dword [ebx + 0x1c]
add dword [eax], ecx
jmp 0x10041765
mov eax, dword [ebp + 8]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
je 0x100417b9
mov ecx, ebx
call fcn.10040f34
mov ecx, dword [ebp - 4]
mov edx, esi
mov eax, 0xfff
cmp esi, eax
jbe 0x100417a4
push dword [ebx + 0x4c]
push eax
push 1
push ecx
call fcn.10054366
mov ecx, dword [ebp - 4]
sub esi, eax
add ecx, eax
add esp, 0x10
mov dword [ebp - 4], ecx
mov edx, esi
cmp eax, 0xfff
jne 0x100417b9
jmp 0x10041777
test edx, edx
je 0x100417b9
push dword [ebx + 0x4c]
push esi
push 1
push ecx
call fcn.10054366
add esp, 0x10
sub esi, eax
mov edx, dword [ebp + 0x10]
sub edi, esi
mov eax, edi
sbb edx, 0
pop esi
pop edi
pop ebx
leave
ret 0xc
Function at 0x1004b864
Capabilities:
Parse pe header

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

Function at 0x1005cbbb
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1008695c
push 0x10086954
push str.FlsAlloc
push 0x1f
call fcn.1005c9e6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005cbef
push dword [ebp + 8]
mov ecx, esi
call dword [0x1006e214]
call esi
jmp 0x1005cbf5
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1005cc39
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1008696c
push 0x10086964
push str.FlsGetValue
push 0x21
call fcn.1005c9e6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005cc70
push dword [ebp + 8]
mov ecx, esi
call dword [0x1006e214]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1005cc78
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10086974
push 0x1008696c
push str.FlsSetValue
push 0x22
call fcn.1005c9e6
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1005ccb2
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1006e214]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x1005d8ae
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 + 0x1009c1c0]
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 0x1005d8ee
cmp byte [ebx], 0xa
jne 0x1005d8ee
or byte [edi + eax + 0x28], 4
jmp 0x1005d8f3
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 0x1005d9f2
mov dl, byte [eax]
cmp dl, 0x1a
je 0x1005d9d5
inc eax
cmp dl, 0xd
je 0x1005d91f
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x1005d945
cmp eax, ecx
jae 0x1005d953
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 0x1005d907
jmp 0x1005d9f2
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 0x1005d9d0
cmp dword [ebp - 0x10], 0
je 0x1005d9d0
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1009c1c0]
test byte [eax + edi + 0x28], 0x48
je 0x1005d9aa
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x1005d995
mov byte [esi], dl
jmp 0x1005d9a6
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1009c1c0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x1005d9f2
cmp byte [ebp - 1], 0xa
jne 0x1005d9b9
cmp esi, ebx
jne 0x1005d9b9
mov byte [esi], 0xa
jmp 0x1005d9f1
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1005d6a7
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x1005d9f2
mov byte [esi], 0xd
jmp 0x1005d9f1
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1009c1c0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x1005d9ef
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x1005d9f2
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x1005d9fb
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 + 0x1009c1c0]
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 0x1005da41
cmp word [ebx], dx
jne 0x1005da41
or byte [eax + edi + 0x28], 4
jmp 0x1005da46
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 0x1005dba9
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 0x1005db89
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x1005da87
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1005dabd
cmp eax, edx
jae 0x1005dacb
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 0x1005da62
jmp 0x1005dba9
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 0x1005db84
cmp dword [ebp - 0x18], 0
je 0x1005db84
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1009c1c0]
test byte [eax + edi + 0x28], 0x48
je 0x1005db5a
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 0x1005db1e
mov word [esi], cx
jmp 0x1005db55
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1009c1c0]
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 + 0x1009c1c0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1009c1c0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x1005dba9
pop eax
cmp word [ebp - 4], ax
jne 0x1005db6a
cmp esi, ebx
jne 0x1005db6a
mov word [esi], ax
jmp 0x1005dba6
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.1005d6a7
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x1005dba9
push 0xd
pop eax
jmp 0x1005db65
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1009c1c0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x1005dba3
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x1005dba9
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x100602c7
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.10042a00
mov eax, dword [0x1009a340]
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.1005b7e7
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x10060309
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10060465
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1006cc80
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 + 0x1009c1c0]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.1005d689
mov ecx, dword [esi*4 + 0x1009c1c0]
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 0x1006045e
cmp eax, dword [ecx + edi + 0x24]
jne 0x1006045e
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 0x1006045e
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.1005d689
add esp, 0x14
test edx, edx
jl 0x1006045e
jg 0x100603d4
test eax, eax
jb 0x1006045e
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x1006045e
jl 0x100603ee
cmp dword [ebp - 0x1008], eax
ja 0x1006045e
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x1006040c
test ebx, ebx
je 0x10060445
cmp ecx, edi
jae 0x10060445
mov al, byte [ecx]
cmp al, 0xd
jne 0x10060426
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10060432
cmp byte [ecx + 1], 0xa
jne 0x10060432
inc ecx
jmp 0x10060432
movzx eax, al
movsx eax, byte [eax + 0x1009a7b0]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x1006040c
cmp edx, ebx
jne 0x1006040c
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10060463
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.100424c3
leave
ret