joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10019b60
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
sub esp, 0x44
call fcn.100192b4
mov ebx, 2
cmp dword [0x100326e0], 0
je 0x10019b8d
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.1001a2dc
mov ebx, 7
test eax, eax
jne 0x10019b9c
call fcn.1001930a
mov eax, ebx
add esp, 0x44
pop ebx
pop esi
ret 0xc
mov eax, dword [esp + 0x54]
mov dword [esp], eax
call fcn.1001a2dc
test eax, eax
je 0x10019b8d
mov eax, dword [esp + 0x50]
call fcn.1001926c
mov ebx, 3
cmp eax, 0xffffffff
jne 0x10019b8d
mov eax, dword [esp + 0x50]
mov dword [esp], eax
call fcn.1001a1b2
mov esi, eax
mov ebx, 9
test eax, eax
je 0x10019b8d
mov eax, dword [esp + 0x50]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], esi
lea eax, [esp + 0x1c]
mov dword [esp], eax
call fcn.1001a381
test eax, eax
je 0x10019d61
mov edx, dword [0x1003274c]
test edx, edx
je 0x10019cd5
mov eax, dword [0x10032750]
cmp dword [0x10032754], eax
jae 0x10019d14
mov eax, dword [0x10032754]
lea edx, [eax + 1]
mov dword [0x10032754], edx
imul eax, eax, 0x2c
add eax, dword [0x1003274c]
je 0x10019d73
mov edx, dword [esp + 0x1c]
mov dword [eax], edx
mov edx, dword [esp + 0x20]
mov dword [eax + 4], edx
mov edx, dword [esp + 0x24]
mov dword [eax + 8], edx
mov esi, dword [esp + 0x28]
mov ebx, esi
and ebx, 1
movzx ecx, byte [eax + 0x14]
and ecx, 0xfffffff8
or ecx, ebx
mov byte [eax + 0x14], cl
movzx ebx, byte [esp + 0x2c]
and ebx, 0xf
movzx ecx, byte [eax + 0x18]
and ecx, 0xfffffff0
or ecx, ebx
mov byte [eax + 0x18], cl
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov dword [eax + 0x1c], ecx
mov dword [eax + 0x20], ebx
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov dword [eax + 0x24], ecx
mov dword [eax + 0x28], ebx
test esi, esi
je 0x10019d4c
lea ecx, [eax + 0xc]
mov esi, dword [esp + 0x50]
lea ebx, [esi - 5]
mov esi, dword [esi - 5]
mov dword [eax + 0xc], esi
movzx eax, word [ebx + 4]
mov word [ecx + 4], ax
movzx eax, byte [ebx + 6]
mov byte [ecx + 6], al
mov ebx, 0
cmp dword [esp + 0x58], 0
je 0x10019b8d
mov eax, dword [esp + 0x58]
mov dword [eax], edx
jmp 0x10019b8d
mov dword [0x10032750], 0x20
mov dword [esp + 8], 0x580
mov dword [esp + 4], 0
mov eax, dword [0x100326e0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
sub esp, 0xc
mov dword [0x1003274c], eax
test eax, eax
jne 0x10019c1d
mov ebx, 9
jmp 0x10019d66
imul eax, eax, 0x58
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], 0
mov eax, dword [0x100326e0]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
sub esp, 0x10
test eax, eax
je 0x10019d0d
shl dword [0x10032750], 1
mov dword [0x1003274c], eax
jmp 0x10019c1d
mov esi, dword [esp + 0x50]
mov ecx, dword [esi]
mov dword [eax + 0xc], ecx
movzx ecx, byte [esi + 4]
mov byte [eax + 0x10], cl
jmp 0x10019cba
mov ebx, 8
mov dword [esp], esi
call fcn.1001a256
jmp 0x10019b8d
mov ebx, 9
jmp 0x10019d66
Function at 0x1001a1b2
Capabilities:
Allocate or change rwx memory

Disassembly:
mov edx, dword [0x10032758]
test edx, edx
je 0x1001a1db
cmp dword [edx + 4], 0
jne 0x1001a1ce
mov edx, dword [edx]
test edx, edx
je 0x1001a1db
cmp dword [edx + 4], 0
je 0x1001a1c2
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov dword [edx + 4], ecx
add dword [edx + 8], 1
ret
push ebx
sub esp, 0x18
mov dword [esp + 0xc], 0x40
mov dword [esp + 8], 0x3000
mov dword [esp + 4], 0x1000
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
sub esp, 0x10
mov edx, eax
mov eax, 0
test edx, edx
je 0x1001a251
lea eax, [edx + 0x20]
mov dword [edx + 4], 0
mov dword [edx + 8], 0
lea ebx, [edx + 0x1000]
mov ecx, dword [edx + 4]
mov dword [eax], ecx
mov dword [edx + 4], eax
add eax, 0x20
cmp eax, ebx
jne 0x1001a229
mov eax, dword [0x10032758]
mov dword [edx], eax
mov dword [0x10032758], edx
mov eax, dword [edx + 4]
mov ecx, dword [eax]
mov dword [edx + 4], ecx
add dword [edx + 8], 1
add esp, 0x18
pop ebx
ret

Function at 0x1001a320
Capabilities:
Check for software breakpoints

Disassembly:
push edi
push esi
push ebx
mov ebx, eax
mov edi, edx
movzx eax, byte [eax]
test al, al
setne cl
mov esi, ecx
cmp al, 0x90
setne cl
mov edx, esi
test dl, cl
je 0x1001a345
mov ecx, 0
cmp al, 0xcc
jne 0x1001a36d
cmp edi, 1
jbe 0x1001a373
cmp al, byte [ebx + 1]
jne 0x1001a37a
lea ecx, [ebx + 2]
lea edx, [edi + ebx]
cmp ecx, edx
je 0x1001a368
add ecx, 1
cmp byte [ecx - 1], al
je 0x1001a355
mov ecx, 0
jmp 0x1001a36d
mov ecx, 1
mov eax, ecx
pop ebx
pop esi
pop edi
ret
mov ecx, 1
jmp 0x1001a36d
mov ecx, 0
jmp 0x1001a36d
Function at 0x1001b0e3
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x1003249c], 0
push ebx
push esi
mov esi, 0x100324a4
jne 0x1001b10f
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x100324bc], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x1003249c], 1
push dword [0x100324bc]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x1001b1ac
push 0x14
push 8
push dword [0x10031518]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x1001b1d6
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x100324a0]
test eax, eax
je 0x1001b151
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x100324a0], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x1001b1db
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x100324bc]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x10031518]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x1001b1d6
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x1001c84a
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x10032738]
call fcn.1001e518
mov edi, dword [eax + 0x24]
test edi, edi
je 0x1001c908
cmp dword [edi + 8], 1
je 0x1001c908
mov edi, dword [edi + 0xc]
test edi, edi
je 0x1001c908
mov al, byte [edi]
cmp al, 0x20
je 0x1001c883
cmp al, 9
jne 0x1001c886
inc edi
jmp 0x1001c879
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push edi
push eax
push 0xfde9
call esi
push dword [esp + 0x14]
mov ebx, eax
lea ecx, [ebx - 1]
push ecx
call fcn.1001f750
push ebx
mov ebp, eax
push ebp
push 0xffffffffffffffff
push edi
push 0
push 0xfde9
call esi
test ebx, ebx
jle 0x1001c8d7
push 9
pop edx
lea eax, [ebp - 2]
lea eax, [eax + ebx*2]
movzx ecx, word [eax]
push 0x20
pop esi
cmp cx, si
je 0x1001c8f3
cmp cx, dx
je 0x1001c8f3
pop edi
pop esi
pop ebp
pop ebx
ret 4
movzx ecx, word [eax]
cmp cx, si
je 0x1001c8eb
cmp cx, dx
jne 0x1001c8f7
xor ecx, ecx
mov word [eax], cx
sub eax, 2
cmp eax, ebp
jae 0x1001c8de
push ebp
call sub.MSVCRT.dll_wcslen
pop ecx
sub ebx, eax
push ebx
call fcn.1001f830
jmp 0x1001c8d7
pop edi
pop esi
pop ebp
pop ebx
jmp fcn.1001f930
Function at 0x1001cf3c
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x1001cfb4
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x1001cf95
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x1001cf92
cmp ecx, 0x5c
je 0x1001cf92
cmp ecx, 0x2f
jne 0x1001cf9f
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x1001cf7f
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x1001cfb6
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x1001cfbc
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x1001d104
xor ecx, ecx
cmp word [eax], cx
je 0x1001d104
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call sub.MSVCRT.dll_wcslen
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x1001d015
cmp eax, 3
jne 0x1001d04f
cmp word [esp + 0xa], 0x3a
jne 0x1001d04f
cmp eax, 2
jne 0x1001d033
lea eax, [esp + 8]
push 0x10021050
push eax
call sub.MSVCRT.dll_wcscat
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x1001d104
push 0xfffffffffffffffe
pop edi
jmp 0x1001d104
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x1001d064
cmp ax, bx
jne 0x1001d06e
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x1001d057
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x1001d0ad
test byte [esp + 0x21c], 0x10
je 0x1001d094
push 0xfffffffffffffffe
pop edi
jmp 0x1001d0a4
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x1001d102
cmp word [esp + 0x10], bp
jne 0x1001d0bb
cmp word [esp + 0x12], bp
je 0x1001d0da
cmp word [esp + 0x10], bx
jne 0x1001d0c9
cmp word [esp + 0x12], bx
je 0x1001d0da
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x1001d102
cmp word [esp + 0x12], ax
jne 0x1001d102
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x1001d0ef
test al, 0x10
je 0x1001d102
jmp 0x1001d0ff
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x1001d102
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4
Function at 0x1001d320
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x1001d35c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x1001d5c0
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x10032740]
call fcn.1001e689
test eax, eax
je case.0x1001d5ee.3
mov ecx, dword [esp + 8]
add ecx, 0xfffffffe
cmp ecx, 0x17
ja case.0x1001d5ee.3
movzx ecx, byte [ecx + 0x1001d6f8]
jmp dword [ecx*4 + 0x1001d6e0]
cmp dword [eax + 4], 0
je 0x1001d60b
push 2
push 0x10021054
push eax
call fcn.1001da70
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x10021054
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x1001d63a
push 3
push 0x10021030
push eax
call fcn.1001da70
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 3
push 0x10021030
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x1001d669
push 2
push 0x10021058
push eax
call fcn.1001da70
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 2
push 0x10021058
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x1001d698
push 4
push 0x1002105c
push eax
call fcn.1001da70
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x1002105c
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
cmp dword [eax + 4], 0
je 0x1001d6c7
push 4
push 0x10021064
push eax
call fcn.1001da70
ret 8
push 0
lea ecx, [esp + 8]
push ecx
push 4
push 0x10021064
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
ret 8
Function at 0x1001d750
Capabilities:
Read file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push ebx
push dword [0x10032740]
mov dword [esp + 0x10], 0
call fcn.1001e689
mov ebp, eax
test ebp, ebp
je 0x1001d8ac
push esi
push edi
push ebx
call fcn.1001dc90
cmp dword [ebp + 4], 0
mov esi, eax
mov edi, edx
je 0x1001d79c
push 4
lea eax, [esp + 0x1c]
push eax
push ebp
call fcn.1001dd00
mov ecx, eax
mov dword [esp + 0x10], ecx
jmp 0x1001d7b7
push 0
lea eax, [esp + 0x14]
push eax
push 4
lea eax, [esp + 0x24]
push eax
push dword [ebp]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [esp + 0x10]
cmp ecx, 2
jl 0x1001d7e5
lea edx, [esp + 0x18]
mov eax, 0xfeff
cmp word [edx], ax
jne 0x1001d7e5
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 0x19
pop ebx
pop ecx
ret 4
cmp ecx, 3
jl 0x1001d816
lea edx, [esp + 0x18]
cmp word [edx], 0xbbef
jne 0x1001d816
cmp byte [edx + 2], 0xbf
jne 0x1001d816
add esi, 3
adc edi, 0
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 2
pop ebx
pop ecx
ret 4
cmp ecx, 2
jl 0x1001d844
lea edx, [esp + 0x18]
mov eax, 0xfffe
cmp word [edx], ax
jne 0x1001d844
add esi, 2
adc edi, 0
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 4
pop ebx
pop ecx
ret 4
cmp ecx, 4
jl 0x1001d897
lea eax, [esp + 0x18]
cmp dword [eax], 0xfeff
jne 0x1001d870
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 5
pop ebx
pop ecx
ret 4
lea eax, [esp + 0x18]
cmp dword [eax], 0xfffe0000
jne 0x1001d897
add esi, 4
adc edi, 0
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 6
pop ebx
pop ecx
ret 4
push edi
push esi
push ebx
call fcn.1001de20
pop edi
pop esi
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4
pop ebp
mov eax, 0x18
pop ebx
pop ecx
ret 4

Function at 0x1001d8c0
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x10032740]
call fcn.1001e689
mov esi, eax
test esi, esi
je 0x1001d93f
cmp dword [esi + 4], 0
je 0x1001d910
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.1001dd00
test eax, eax
je 0x1001d904
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001d94a
cmp dword [esp + 8], 0
je 0x1001d94a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4
Function at 0x1001da70
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x1001db77
cmp dword [esi + 0x14], 1
jne 0x1001dabb
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x1001db38
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x1001db23
dec eax
je 0x1001db0c
sub eax, 2
je 0x1001daf7
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.1001d320
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x1001db65
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x1001dae1
xor eax, eax
pop esi
add esp, 0xc
ret 0xc
Function at 0x1001db80
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x1001dc88
cmp word [edx], 0
je 0x1001dc88
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x1001dbae
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x1001dc0d
cmp dword [esi + 4], 0
mov ecx, edx
lea edi, [ecx + 2]
je 0x1001dbe0
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001dbc0
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.1001da70
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1001dbe0
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x14]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.1001e340
mov edi, eax
test edi, edi
je 0x1001dc03
cmp dword [esi + 4], 0
je 0x1001dc5b
push dword [esp + 0x14]
push edi
push esi
call fcn.1001da70
push edi
push 0
push dword [0x10031518]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x10031518]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
Function at 0x1001dd00
Capabilities:
Read file on windows

Disassembly:
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
cmp dword [esi + 0x14], 0
jne 0x1001dd21
push esi
call fcn.1001d320
mov dword [esi + 0x14], 1
mov dword [esi + 0xc], 0
mov ebx, dword [esi + 0xc]
mov edi, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
cmp ebx, edi
jl 0x1001dd95
add eax, dword [esi + 4]
mov ecx, edi
sub eax, ebx
dec ecx
je 0x1001dd82
dec ecx
je 0x1001dd6d
sub ecx, 2
je 0x1001dd5a
push edi
push eax
push dword [esp + 0x1c]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [eax]
mov eax, dword [esp + 0x14]
mov dword [eax], ecx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov cx, word [eax]
mov eax, dword [esp + 0x14]
mov word [eax], cx
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
mov ecx, dword [esp + 0x14]
mov dl, byte [eax]
mov eax, edi
mov byte [ecx], dl
sub dword [esi + 0xc], edi
pop edi
pop esi
pop ebx
ret 0xc
push ebp
mov ebp, dword [esp + 0x18]
sub eax, ebx
add eax, dword [esi + 4]
push ebx
push eax
push ebp
call sub.MSVCRT.dll_memcpy
mov eax, dword [esi + 8]
add esp, 0xc
sub edi, ebx
add ebp, ebx
push 0
cmp edi, eax
jl 0x1001ddda
lea eax, [esp + 0x18]
push eax
push edi
push ebp
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
pop ebp
pop edi
mov dword [esi + 0xc], 0
add eax, ebx
pop esi
pop ebx
ret 0xc
lea ecx, [esp + 0x18]
push ecx
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
cmp edi, eax
jle 0x1001ddfb
mov edi, eax
push edi
push dword [esi + 4]
push ebp
call sub.MSVCRT.dll_memcpy
sub dword [esi + 0xc], edi
lea eax, [ebx + edi]
add esp, 0xc
pop ebp
pop edi
pop esi
pop ebx
ret 0xc
Function at 0x1001de90
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x14
push 0x1000
push 0
push dword [0x10031518]
mov dword [esp + 0x14], 0x1000
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edx, eax
mov dword [esp + 0x10], edx
test edx, edx
je 0x1001e014
mov cl, byte [esp + 3]
push ebx
mov ebx, dword [esp + 0x1c]
push ebp
mov ebp, dword [esp + 0x28]
push esi
push edi
mov esi, edx
mov edi, edi
cmp ebp, 0xffffffff
je 0x1001dede
test ebp, ebp
je 0x1001df80
dec ebp
cmp dword [ebx + 4], 0
je 0x1001def7
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.1001dd00
mov dword [esp + 0x14], eax
jmp 0x1001df11
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [esp + 0x14]
mov cl, byte [esp + 0x13]
cmp eax, 1
jne 0x1001df80
test cl, cl
je 0x1001df25
mov byte [esi], cl
inc esi
mov cl, byte [esp + 0x13]
mov eax, dword [esp + 0x18]
mov edi, esi
mov edx, dword [esp + 0x20]
dec eax
sub edi, edx
cmp edi, eax
jle 0x1001df60
mov eax, dword [esp + 0x18]
add eax, 0x1000
push eax
push edx
push 8
push dword [0x10031518]
mov dword [esp + 0x28], eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov cl, byte [esp + 0x13]
mov edx, eax
mov dword [esp + 0x20], edx
lea esi, [edi + edx]
test cl, cl
je 0x1001df80
cmp dword [esp + 0x2c], 0
jne 0x1001ded0
cmp cl, 0xd
je 0x1001df87
cmp cl, 0xa
jne 0x1001ded0
dec esi
jmp 0x1001dff7
cmp dword [esp + 0x2c], 0
jne 0x1001dff7
cmp cl, 0xa
jne 0x1001df8f
dec esi
jmp 0x1001dff7
cmp cl, 0xd
jne 0x1001dff7
dec esi
cmp dword [ebx + 4], 0
je 0x1001dfae
push 1
lea eax, [esp + 0x17]
push eax
push ebx
call fcn.1001dd00
mov dword [esp + 0x14], eax
jmp 0x1001dfc4
push 0
lea eax, [esp + 0x18]
push eax
push 1
lea eax, [esp + 0x1f]
push eax
push dword [ebx]
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x13], 0xa
je 0x1001dff7
cmp dword [ebx + 4], 0
je 0x1001dfd6
inc dword [ebx + 0xc]
jmp 0x1001dff7
push 1
lea eax, [esp + 0x20]
mov dword [esp + 0x1c], 0xffffffff
push eax
push 0xffffffffffffffff
push dword [ebx]
mov dword [esp + 0x2c], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x34]
mov ecx, esi
sub ecx, dword [esp + 0x20]
pop edi
mov dword [eax], ecx
mov eax, dword [esp + 0x1c]
mov byte [esi], 0
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 0x10
xor eax, eax
add esp, 0x14
ret 0x10