joyce8/EMBER2024-capa huggingface dataset:
Function at 0x101b1530
Capabilities:
Access peb ldr_data
Get kernel32 base address
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10251f7c
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x10291440]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x14], ebx
mov dword [ebx + 4], vtable.OpenMesh::PropertyContainer.0
mov dword [ebx + 8], 0
mov dword [ebx + 0xc], 0
mov dword [ebx + 0x10], 0
mov dword [ebx + 0x14], vtable.OpenMesh::PropertyContainer.0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], vtable.OpenMesh::PropertyContainer.0
mov dword [ebx + 0x28], 0
mov dword [ebx + 0x2c], 0
mov dword [ebx + 0x30], 0
mov dword [ebx + 0x34], vtable.OpenMesh::PropertyContainer.0
mov dword [ebx + 0x38], 0
mov dword [ebx + 0x3c], 0
mov dword [ebx + 0x40], 0
mov dword [ebx + 0x44], vtable.OpenMesh::PropertyContainer.0
mov dword [ebx + 0x48], 0
mov dword [ebx + 0x4c], 0
mov dword [ebx + 0x50], 0
mov dword [ebx], vtable.OpenMesh::ArrayKernel.0
mov dword [ebx + 0x58], 0xffffffff
mov dword [ebx + 0x5c], 0xffffffff
mov dword [ebx + 0x60], 0xffffffff
mov dword [ebx + 0x64], 0xffffffff
mov dword [ebx + 0x68], 0
mov dword [ebx + 0x6c], 0
mov dword [ebx + 0x70], 0
mov dword [ebx + 0x74], 0
mov dword [ebp - 4], 0
mov dword [ebx + 0x78], 0
mov dword [ebx + 0x7c], 0
mov dword [ebx + 0x80], 0
mov dword [ebx + 0x84], 0
mov dword [ebx + 0x88], 0
mov dword [ebx + 0x8c], 0
mov dword [ebx + 0x90], 0
mov dword [ebx + 0x94], 0
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x9c], 0
mov dword [ebx + 0xa0], 0
mov dword [ebx + 0xa4], 0
mov dword [ebx + 0xa8], 0
mov dword [ebx + 0xac], 0
mov dword [ebx + 0xb0], 0
lea esi, [ebx + 0xb4]
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [ebx + 0xc0], 0
mov dword [ebx + 0xc4], 0
mov dword [ebx + 0xc8], 0
mov eax, 0x100
mov byte [ebp - 4], 7
mov dword [ebp - 0x10], eax
mov edx, eax
mov edi, eax
mov ecx, dword [esi + 4]
cmp ecx, dword [esi + 8]
je 0x101b1716
mov dword [ecx], eax
add dword [esi + 4], 4
jmp 0x101b1724
lea eax, [ebp - 0x10]
push eax
push ecx
mov ecx, esi
call fcn.101b1380
mov edx, edi
lea eax, [edx + edx]
mov dword [ebp - 0x10], eax
mov edx, eax
mov edi, eax
test eax, eax
jne 0x101b1706
push esi
lea ecx, [ebx + 0xa8]
call fcn.101b1ce0
push esi
lea ecx, [ebx + 0xc0]
call fcn.101b1ce0
push esi
lea ecx, [ebx + 0x9c]
call fcn.101b1ce0
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x101b5a90
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 0xc]
sub esp, 0xc
push ebx
mov ebx, ecx
push esi
mov esi, dword [esp + 0x1c]
test eax, eax
jg 0x101b5ab5
jl 0x101b5aa9
test esi, esi
jne 0x101b5ab5
pop esi
xor eax, eax
xor edx, edx
pop ebx
add esp, 0xc
ret 0xc
cmp dword [ebx + 0x38], 0
push ebp
push edi
mov edi, esi
je 0x101b5b84
mov ebp, eax
lea ecx, [ebx + 0x2c]
mov eax, dword [esp + 0x20]
mov dword [esp + 0x20], eax
mov eax, dword [ebx + 0x1c]
mov dword [esp + 0x18], ecx
mov eax, dword [eax]
mov dword [esp + 0x14], eax
test eax, eax
je 0x101b5ae7
mov eax, dword [ecx]
mov eax, dword [eax]
jmp 0x101b5ae9
xor eax, eax
cdq
mov esi, eax
mov eax, edx
mov dword [esp + 0x10], eax
test eax, eax
jl 0x101b5b36
jg 0x101b5afc
test esi, esi
je 0x101b5b36
cmp ebp, eax
jg 0x101b5b0c
jl 0x101b5b06
cmp edi, esi
jae 0x101b5b0c
mov esi, edi
mov dword [esp + 0x10], ebp
push esi
push dword [esp + 0x18]
push dword [esp + 0x28]
call fcn.102207f0
mov ecx, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x20]
sub edi, esi
sbb ebp, dword [esp + 0x10]
mov eax, dword [ecx]
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x101b5b56
mov eax, dword [ebx]
mov ecx, ebx
call dword [eax + 0x1c]
cmp eax, 0xffffffff
je 0x101b5b6e
mov edx, dword [esp + 0x20]
lea ecx, [ebx + 0x2c]
add edi, 0xffffffff
mov esi, 1
adc ebp, 0xffffffff
mov byte [edx], al
add edx, esi
mov dword [esp + 0x20], edx
test ebp, ebp
jg 0x101b5ad0
jl 0x101b5b6e
test edi, edi
jne 0x101b5ad0
mov eax, dword [esp + 0x24]
mov edx, dword [esp + 0x28]
sub eax, edi
pop edi
sbb edx, ebp
pop ebp
pop esi
pop ebx
add esp, 0xc
ret 0xc
mov eax, dword [ebx + 0x1c]
mov ebp, dword [esp + 0x20]
mov edx, dword [eax]
test edx, edx
je 0x101b5bc9
mov eax, dword [ebx + 0x2c]
lea ecx, [ebx + 0x2c]
mov dword [esp + 0x10], ecx
mov eax, dword [eax]
test eax, eax
je 0x101b5bd0
mov edi, dword [esp + 0x24]
cmp eax, edi
cmovb esi, eax
push esi
push edx
push ebp
call fcn.102207f0
mov eax, dword [ebx + 0x2c]
add ebp, esi
sub edi, esi
add esp, 0xc
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [esp + 0x24]
jmp 0x101b5bd0
lea eax, [ebx + 0x2c]
mov dword [esp + 0x10], eax
cmp dword [ebx + 0x4c], 0
je 0x101b5c39
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x101b5bfa
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [esp + 0x10]
mov eax, dword [eax]
mov dword [eax], edx
cmp edi, 0xfff
jbe 0x101b5c24
push dword [ebx + 0x4c]
push 0xfff
push 1
push ebp
call fcn.10234f6e
add esp, 0x10
add ebp, eax
sub edi, eax
cmp eax, 0xfff
jne 0x101b5c39
cmp edi, eax
ja 0x101b5c02
test edi, edi
je 0x101b5c39
push dword [ebx + 0x4c]
push edi
push 1
push ebp
call fcn.10234f6e
add esp, 0x10
sub edi, eax
mov edx, dword [esp + 0x28]
sub esi, edi
pop edi
pop ebp
mov eax, esi
sbb edx, 0
pop esi
pop ebx
add esp, 0xc
ret 0xc
Function at 0x101d4a00
Capabilities:
Encode data using xor

Disassembly:
push ecx
mov ecx, dword [esp + 0x10]
push ebx
mov ebx, dword [esp + 0xc]
push ebp
push esi
xor ebp, ebp
cmp byte [esp + 0x20], 0
push edi
mov edi, dword [esp + 0x1c]
mov dword [esp + 0x10], ebp
je 0x101d4a42
mov eax, dword [edi + 4]
sub eax, dword [edi]
sar eax, 1
mov dword [esp + 0x24], eax
lea eax, [esp + 0x24]
push ecx
push eax
push ebx
call fcn.10004537
mov ecx, dword [esp + 0x2c]
mov ebp, eax
add esp, 0xc
mov dword [esp + 0x10], ebp
mov esi, dword [edi + 4]
mov edi, dword [edi]
test cl, cl
je 0x101d4ac1
xor eax, eax
cmp edi, esi
je 0x101d4aab
xor ebp, ebp
movzx edx, word [edi]
mov ecx, edx
mov eax, edx
shr cx, 8
mov dword [esp + 0x24], eax
shr eax, 8
movzx ecx, cx
xor al, dl
xor al, cl
mov byte [esp + 0x24], cl
push 0
mov byte [esp + 0x29], al
mov ecx, ebx
push 2
lea eax, [esp + 0x2c]
push eax
call fcn.10005db5
mov eax, dword [ebx]
xor ecx, ecx
mov eax, dword [eax + 4]
cmp dword [eax + ebx + 0xc], ecx
mov eax, 2
cmove ecx, eax
add edi, eax
add ebp, ecx
cmp edi, esi
jne 0x101d4a53
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x10]
mov eax, dword [esp + 0x24]
add ebp, eax
mov eax, dword [ebx]
pop edi
pop esi
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + ebx + 0xc], eax
cmove eax, ebp
pop ebp
pop ebx
pop ecx
ret
sub esi, edi
sar esi, 1
lea ebp, [ebp + esi*2]
lea eax, [esi + esi]
je 0x101d4ad9
push 0
push eax
push edi
mov ecx, ebx
call fcn.10005db5
mov eax, dword [ebx]
pop edi
pop esi
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + ebx + 0xc], eax
cmove eax, ebp
pop ebp
pop ebx
pop ecx
ret
Function at 0x101dc5d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10253d27
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push esi
push edi
mov eax, dword [0x10291440]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x20], edi
mov dword [edi], vtable.OpenMesh::IO::_OBJWriter_.0
xorps xmm0, xmm0
movups xmmword [edi + 4], xmm0
mov dword [edi + 0x14], 0
mov dword [edi + 0x18], 0xf
mov dword [ebp - 4], 0
mov byte [edi + 4], 0
movups xmmword [edi + 0x1c], xmm0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0xf
mov byte [edi + 0x1c], 0
mov dword [edi + 0x34], 0
mov dword [edi + 0x38], 0
mov dword [edi + 0x3c], 0
lea esi, [edi + 0x40]
mov byte [ebp - 4], 3
push 0x20
mov dword [ebp - 0x1c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.1021ebbe
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov dword [edi + 0x48], 0
mov dword [edi + 0x4c], 0
mov dword [edi + 0x50], 0
lea esi, [edi + 0x54]
mov byte [ebp - 4], 5
push 0x24
mov dword [ebp - 0x1c], esi
mov dword [esi], 0
mov dword [esi + 4], 0
call fcn.1021ebbe
add esp, 8
mov dword [eax], eax
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [esi], eax
mov byte [ebp - 4], 6
call fcn.101e12d0
mov edx, dword [eax + 8]
xor esi, esi
mov dword [ebp - 0x1c], eax
add eax, 8
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], edx
mov ecx, dword [edx + 4]
mov dword [ebp - 0x10], ecx
cmp byte [ecx + 0xd], 0
jne 0x101dc711
mov eax, ecx
nop dword [eax]
mov dword [ebp - 0x10], eax
cmp dword [eax + 0x10], edi
jae 0x101dc6ff
mov eax, dword [eax + 8]
xor esi, esi
jmp 0x101dc708
mov edx, eax
mov esi, 1
mov eax, dword [eax]
cmp byte [eax + 0xd], 0
je 0x101dc6f0
mov eax, dword [ebp - 0x14]
cmp byte [edx + 0xd], 0
jne 0x101dc71c
cmp edi, dword [edx + 0x10]
jae 0x101dc762
cmp dword [eax + 4], 0xccccccc
je 0x101dc77d
mov dword [ebp - 0x28], eax
push 0x14
mov byte [ebp - 4], 7
mov dword [ebp - 0x24], 0
call fcn.1021ebbe
mov ecx, dword [ebp - 0x18]
add esp, 4
mov byte [ebp - 4], 6
mov dword [eax + 0x10], edi
mov dword [eax], ecx
push eax
mov dword [eax + 4], ecx
push esi
push dword [ebp - 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebp - 0x14]
mov word [eax + 0xc], 0
call fcn.101b3320
mov ecx, dword [ebp - 0x1c]
call fcn.101e1bb0
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.101b1f80
int3
Function at 0x10213f00
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov eax, dword [edi]
call dword [eax + 0x30]
cmp eax, 0xffffffff
je 0x10213fdb
mov al, byte [esp + 0x20]
mov ebx, dword [edi + 0x3c]
mov esi, dword [edi + 0x38]
mov ebp, dword [esp + 0x1c]
test al, al
je 0x10213fa7
xor edi, edi
mov dword [esp + 0x20], edi
cmp esi, ebx
je 0x10213fc2
lea edi, [esi + 3]
nop word [eax + eax]
push 0
push 4
push esi
mov ecx, ebp
call fcn.100054e8
movzx ecx, byte [edi - 2]
lea edi, [edi + 4]
movzx eax, byte [esi]
mov byte [edi - 6], al
mov byte [esi], cl
mov cl, byte [edi - 4]
movzx eax, byte [edi - 5]
xor al, cl
xor al, cl
mov byte [edi - 4], al
mov byte [edi - 5], cl
xor ecx, ecx
mov eax, dword [ebp]
mov eax, dword [eax + 4]
cmp dword [eax + ebp + 0xc], ecx
mov eax, 4
cmove ecx, eax
add esi, eax
add dword [esp + 0x20], ecx
cmp esi, ebx
jne 0x10213f40
mov eax, dword [ebp]
mov edi, dword [esp + 0x20]
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + ebp + 0xc], eax
cmove eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
sub ebx, esi
sar ebx, 2
lea edi, [ebx*4]
test ebx, ebx
je 0x10213fc2
push 0
push edi
push esi
mov ecx, ebp
call fcn.100054e8
mov eax, dword [ebp]
mov ecx, dword [eax + 4]
xor eax, eax
cmp dword [ecx + ebp + 0xc], eax
cmove eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8
mov eax, dword [edi]
xor esi, esi
mov ecx, edi
mov dword [esp + 0x10], esi
xor ebx, ebx
call dword [eax + 0x2c]
test eax, eax
je 0x10214055
mov ebp, dword [esp + 0x1c]
mov eax, dword [edi + 0x38]
mov ecx, ebp
push 0
push 4
lea esi, [eax + ebx*4]
push esi
call fcn.100054e8
cmp byte [esp + 0x20], 0
je 0x1021402b
movzx eax, byte [esi]
mov cl, byte [esi + 1]
mov byte [esi], cl
mov byte [esi + 1], al
movzx eax, byte [esi + 3]
xor byte [esi + 2], al
movzx eax, byte [esi + 2]
xor byte [esi + 3], al
movzx eax, byte [esi + 3]
xor byte [esi + 2], al
mov eax, dword [ebp]
xor ecx, ecx
mov esi, dword [esp + 0x10]
mov edx, dword [edi]
mov eax, dword [eax + 4]
cmp dword [eax + ebp + 0xc], ecx
mov eax, 4
cmove ecx, eax
inc ebx
add esi, ecx
mov ecx, edi
mov dword [esp + 0x10], esi
call dword [edx + 0x2c]
cmp ebx, eax
jb 0x10213ff2
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 8
ret 8

Function at 0x1021d3f0
Capabilities:
Read file on windows

Disassembly:
push ecx
push dword [esp + 8]
lea eax, [esp + 4]
push 4
push 1
push eax
call fcn.10234f6e
add esp, 0x10
cmp byte [esp + 0xc], 0
je 0x1021d42f
movzx ecx, byte [esp]
movzx eax, byte [esp + 3]
mov byte [esp], al
movzx eax, byte [esp + 2]
mov byte [esp + 3], cl
movzx ecx, byte [esp + 1]
mov byte [esp + 1], al
mov byte [esp + 2], cl
mov eax, dword [esp]
pop ecx
ret
Function at 0x10233f15
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10291440]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x10233f58
call fcn.102319c2
mov dword [eax], 0xf
call fcn.102319d5
mov dword [eax], 0xd
call fcn.1022fd70
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1021eb98
leave
ret
test eax, eax
jne 0x10233f5f
inc eax
jmp 0x10233f4c
add eax, 0x40
push 0x3a
mov word [ebp - 0xc], ax
pop eax
mov word [ebp - 0xa], ax
push 0x5c
pop eax
mov word [ebp - 8], ax
xor eax, eax
mov word [ebp - 6], ax
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
mov ecx, eax
test ecx, ecx
je 0x10233f4a
xor eax, eax
cmp ecx, 1
setne al
jmp 0x10233f4c

Function at 0x1023b93e
Capabilities:
Parse pe header

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

Function at 0x1023ffbe
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1027d8fc
push 0x1027d8f4
push str.FlsAlloc
push 0x1f
call fcn.1023fe29
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1023fff2
push dword [ebp + 8]
mov ecx, esi
call dword [0x10258288]
call esi
jmp 0x1023fff8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x1024003c
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1027d90c
push 0x1027d904
push str.FlsGetValue
push 0x21
call fcn.1023fe29
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10240073
push dword [ebp + 8]
mov ecx, esi
call dword [0x10258288]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x1024007b
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1027d914
push 0x1027d90c
push str.FlsSetValue
push 0x22
call fcn.1023fe29
mov esi, eax
add esp, 0x10
test esi, esi
je 0x102400b5
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x10258288]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]

Function at 0x10240192
Capabilities:
Get common file path

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x1027d7fc
push 0x1027d7f4
push str.GetTempPath2W
push 5
call fcn.1023fe29
mov esi, eax
add esp, 0x10
test esi, esi
je 0x102401cc
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x10258288]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_GetTempPathW]
Function at 0x10242ee6
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.10242e62
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x10243055
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x10243055
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1024300a
jg 0x10242f42
test eax, eax
je 0x10243000
push 1
push 0x1000
call fcn.1023c7c4
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x10242f65
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10242ff7
push 0x8000
push ebx
call fcn.10242cd1
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x10242f8e
jg 0x10242f89
cmp ecx, 0x1000
jb 0x10242f8e
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.10241bcd
add esp, 0x10
cmp eax, 0xffffffff
je 0x10242fd3
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x10242f89
jl 0x10242fba
test ecx, ecx
jne 0x10242f7b
push dword [ebp - 0xc]
push ebx
call fcn.10242cd1
push esi
call fcn.1023c821
add esp, 0xc
xor ebx, ebx
jmp 0x10243063
cmp byte [edi + 0x24], 0
je 0x10242fea
cmp dword [edi + 0x20], 5
jne 0x10242fea
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x10242ff5
mov ebx, dword [edi + 0x18]
jmp 0x10242ff7
xor ebx, ebx
push esi
call fcn.1023c821
pop ecx
jmp 0x10243063
test ecx, ecx
jg 0x10242fcc
jl 0x1024300a
test eax, eax
jae 0x10242fcc
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10243e05
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1024302a
cmp byte [edi + 0x1c], 0
je 0x10242fcc
jmp 0x1024305b
push ebx
call fcn.10242c3a
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x10242fcc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x10243063
cmp byte [edi + 0x1c], 0
je 0x10243060
mov ebx, dword [edi + 0x18]
jmp 0x10243063
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10243e05
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1024307d
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 + 0x1029a378]
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 0x102430bd
cmp byte [ebx], 0xa
jne 0x102430bd
or byte [edi + eax + 0x28], 4
jmp 0x102430c2
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 0x102431c1
mov dl, byte [eax]
cmp dl, 0x1a
je 0x102431a4
inc eax
cmp dl, 0xd
je 0x102430ee
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x10243114
cmp eax, ecx
jae 0x10243122
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 0x102430d6
jmp 0x102431c1
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 0x1024319f
cmp dword [ebp - 0x10], 0
je 0x1024319f
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1029a378]
test byte [eax + edi + 0x28], 0x48
je 0x10243179
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10243164
mov byte [esi], dl
jmp 0x10243175
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1029a378]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x102431c1
cmp byte [ebp - 1], 0xa
jne 0x10243188
cmp esi, ebx
jne 0x10243188
mov byte [esi], 0xa
jmp 0x102431c0
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10243e05
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x102431c1
mov byte [esi], 0xd
jmp 0x102431c0
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1029a378]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x102431be
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x102431c1
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x102431ca
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 + 0x1029a378]
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 0x10243210
cmp word [ebx], dx
jne 0x10243210
or byte [eax + edi + 0x28], 4
jmp 0x10243215
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 0x10243378
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 0x10243358
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10243256
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x1024328c
cmp eax, edx
jae 0x1024329a
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 0x10243231
jmp 0x10243378
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 0x10243353
cmp dword [ebp - 0x18], 0
je 0x10243353
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1029a378]
test byte [eax + edi + 0x28], 0x48
je 0x10243329
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 0x102432ed
mov word [esi], cx
jmp 0x10243324
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1029a378]
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 + 0x1029a378]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1029a378]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10243378
pop eax
cmp word [ebp - 4], ax
jne 0x10243339
cmp esi, ebx
jne 0x10243339
mov word [esi], ax
jmp 0x10243375
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10243e05
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10243378
push 0xd
pop eax
jmp 0x10243334
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1029a378]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10243372
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10243378
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret