joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401000
Capabilities:
Decrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov dword [ebp - 4], 0xc6ef3720
mov dword [ebp - 8], 0x20
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
test eax, eax
je 0x4010a9
mov edx, dword [ebp + 8]
mov eax, dword [edx]
shl eax, 4
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [ecx + 8]
xor ecx, dword [edx]
add eax, ecx
mov edx, dword [ebp + 8]
mov ecx, dword [edx]
shr ecx, 5
mov edx, dword [ebp - 4]
xor edx, ecx
add eax, edx
mov ecx, dword [ebp + 0xc]
add eax, dword [ecx + 0xc]
mov edx, dword [ebp + 8]
mov ecx, dword [edx + 4]
sub ecx, eax
mov edx, dword [ebp + 8]
mov dword [edx + 4], ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
shl ecx, 4
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
mov edx, dword [edx]
xor edx, dword [eax + 4]
add ecx, edx
mov eax, dword [ebp + 8]
mov edx, dword [eax + 4]
shr edx, 5
mov eax, dword [ebp - 4]
xor eax, edx
add ecx, eax
mov edx, dword [ebp + 0xc]
add ecx, dword [edx + 4]
mov eax, dword [ebp + 8]
mov edx, dword [eax]
sub edx, ecx
mov eax, dword [ebp + 8]
mov dword [eax], edx
mov ecx, dword [ebp - 4]
add ecx, 0x61c88647
mov dword [ebp - 4], ecx
jmp 0x104010ac
mov esp, ebp
pop ebp
ret
Function at 0x403bbb
Capabilities:
Terminate process

Disassembly:
jmp 0x4607b9
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x4607ca
push 5
pop ecx
int 0x29
push esi
push 1
mov esi, 0xc0000417
push esi
push 2
call fcn.004064f6
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
pop esi
ret

Function at 0x403d46
Capabilities:
Query environment variable

Disassembly:
jmp 0x4a9d22
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x4a9d33
pop esi
ret
push ebx
push edi
push esi
call fcn.004a9c09
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.004047c3
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x4a9d5b
push ebx
push esi
push edi
call fcn.004062a3
add esp, 0xc
push 0
call fcn.00406fe1
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x406370
Capabilities:
Parse pe header

Disassembly:
jmp 0x44f5ef
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x44f62e
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x44f62e
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x44f62e
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x44f62e
cmp dword [ecx + 0x74], 0xe
jbe 0x44f62e
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4a1d31
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.00401fd2
mov eax, dword [0x590258]
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.00406b45
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x4a1d73
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x4a1ecf
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00406cc6
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 + 0x595580]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.004037bf
mov ecx, dword [esi*4 + 0x595580]
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 0x4a1ec8
cmp eax, dword [edi + ecx + 0x24]
jne 0x4a1ec8
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 0x4a1ec8
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.004037bf
add esp, 0x14
test edx, edx
jl 0x4a1ec8
jg 0x4a1e3e
test eax, eax
jb 0x4a1ec8
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x4a1ec8
jl 0x4a1e58
cmp dword [ebp - 0x1008], eax
ja 0x4a1ec8
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x4a1e76
test ebx, ebx
je 0x4a1eaf
cmp ecx, edi
jae 0x4a1eaf
mov al, byte [ecx]
cmp al, 0xd
jne 0x4a1e90
lea eax, [edi - 1]
cmp ecx, eax
jae 0x4a1e9c
cmp byte [ecx + 1], 0xa
jne 0x4a1e9c
inc ecx
jmp 0x4a1e9c
movzx eax, al
movsx eax, byte [eax + 0x590570]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x4a1e76
cmp edx, ebx
jne 0x4a1e76
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x4a1ecd
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00403553
leave
ret
Function at 0x4a20d4
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 + 0x595580]
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 0x4a2114
cmp byte [ebx], 0xa
jne 0x4a2114
or byte [eax + edi + 0x28], 4
jmp 0x4a2119
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x4a2217
mov al, byte [edx]
cmp al, 0x1a
je 0x4a21f9
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x4a2148
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x4a216d
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x4a2177
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 0x4a212a
jmp 0x4a2217
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 0x4a21f4
cmp dword [ebp - 0xc], 0
je 0x4a21f4
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x595580]
test byte [eax + edi + 0x28], 0x48
je 0x4a21ce
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x4a21b9
mov byte [esi], dl
jmp 0x4a21ca
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x595580]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x4a2217
cmp byte [ebp - 1], 0xa
jne 0x4a21dd
cmp esi, ebx
jne 0x4a21dd
mov byte [esi], 0xa
jmp 0x4a2216
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00401ab9
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x4a2217
mov byte [esi], 0xd
jmp 0x4a2216
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x595580]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2213
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a2217
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x4a2273
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 + 0x595580]
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 0x4a22b6
cmp word [esi], dx
jne 0x4a22b6
or byte [edi + eax + 0x28], 4
jmp 0x4a22bb
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 0x4a240e
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 0x4a23ee
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x4a22fd
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x4a2333
cmp eax, edx
jae 0x4a233f
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 0x4a22d5
jmp 0x4a240e
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 0x4a23ea
cmp dword [ebp - 0x14], 0
je 0x4a23ea
mov eax, dword [ebx*4 + 0x595580]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x4a23c2
mov dx, word [ebp - 4]
lea eax, [esi + 2]
pop ecx
mov dword [ebp - 0x18], eax
cmp dx, cx
jne 0x4a238b
mov word [esi], cx
jmp 0x4a23be
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x595580]
movzx ecx, dx
shr ecx, 8
push 0xa
mov byte [edi + eax + 0x2a], dl
mov eax, dword [ebx*4 + 0x595580]
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x595580]
pop ecx
mov byte [edi + eax + 0x2c], cl
mov eax, dword [ebp - 0x18]
mov esi, eax
jmp 0x4a240e
pop ebx
cmp word [ebp - 4], bx
jne 0x4a23d3
cmp esi, dword [ebp + 0xc]
jne 0x4a23d3
mov word [esi], bx
jmp 0x4a240b
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00401ab9
add esp, 0x10
cmp word [ebp - 4], bx
je 0x4a240e
push 0xd
jmp 0x4a2407
mov ecx, dword [ebx*4 + 0x595580]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x4a2405
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x4a240e
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
Function at 0x4a82c1
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x590258]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x10]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x25c], ecx
cmp edx, edi
je 0x4a830c
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.004a8783
test al, al
jne 0x4a8306
sub edx, 2
cmp edx, edi
jne 0x4a82ec
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x4a832e
lea eax, [edi + 2]
cmp edx, eax
je 0x4a832e
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.004a7eba
add esp, 0x10
jmp 0x4a8428
push esi
lea ecx, [ebp - 0x255]
call fcn.004a8783
sub edx, edi
movzx eax, al
sar edx, 1
inc edx
neg eax
sbb eax, eax
xor ebx, ebx
push ebx
push ebx
and eax, edx
push ebx
mov dword [ebp - 0x260], eax
lea eax, [ebp - 0x254]
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileExW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4a8371
push dword [ebp - 0x25c]
jmp 0x4a831e
mov ebx, dword [ebp - 0x25c]
push 0x2e
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
sar eax, 2
mov dword [ebp - 0x25c], eax
pop eax
cmp word [ebp - 0x228], ax
jne 0x4a83ae
cmp word [ebp - 0x226], 0
je 0x4a83cf
cmp word [ebp - 0x226], ax
jne 0x4a83ae
cmp word [ebp - 0x224], 0
je 0x4a83cf
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.004a7eba
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x4a841b
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4a8388
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x4a8403
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x4a8428
push 0x4a78a2
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.004060b9
add esp, 0x10
jmp 0x4a83f8
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov eax, dword [ebp - 0x264]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00403553
leave
ret
Function at 0x2403780
Capabilities:
Get common file path

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x24bec28
push eax
mov dword fs:[0], esp
sub esp, 0x10
push esi
push edi
mov edi, ecx
xor esi, esi
cmp edi, esi
je 0x24038bb
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], esi
lea eax, [esp + 0xc]
push eax
mov dword [esp + 0x24], esi
mov dword [esp + 0x10], esi
call dword [sym.imp.shell32.dll_SHGetMalloc]
test eax, eax
jne 0x24038a6
lea ecx, [esp + 8]
push ecx
push 0x1a
push esi
mov dword [esp + 0x14], esi
call dword [sym.imp.shell32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x24037ee
mov eax, dword [esp + 0xc]
mov edx, dword [eax]
push eax
call dword [edx + 8]
jmp 0x24038a6
mov ecx, dword [esp + 8]
lea edx, [esp + 0x10]
call fcn.024821d0
test eax, eax
mov ecx, dword [esp + 8]
jne 0x2403825
cmp ecx, esi
je 0x2403812
mov eax, dword [esp + 0xc]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0xc]
mov dword [esp + 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x24038a6
cmp ecx, esi
je 0x2403834
mov eax, dword [esp + 0xc]
mov edx, dword [eax]
push ecx
push eax
call dword [edx + 0x14]
mov eax, dword [esp + 0xc]
mov dword [esp + 8], esi
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
lea ecx, [esp + 0x10]
call fcn.0247f830
test eax, eax
je 0x24038a6
mov edx, 0x24da178
lea ecx, [esp + 0x10]
call fcn.0247f890
test eax, eax
je 0x24038a6
mov edx, 0x24da168
lea ecx, [esp + 0x10]
call fcn.0247f890
test eax, eax
je 0x24038a6
mov ecx, dword [esp + 0x14]
xor edx, edx
call fcn.02481d80
test eax, eax
je 0x24038a6
mov edx, 0x24da178
lea ecx, [esp + 0x10]
call fcn.0247f890
test eax, eax
je 0x24038a6
mov edx, 0x24da13c
lea ecx, [esp + 0x10]
call fcn.0247f890
test eax, eax
jne 0x24038ce
mov eax, dword [esp + 0x14]
cmp eax, esi
mov dword [esp + 0x10], esi
je 0x24038bb
push eax
call fcn.024ad03a
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x10]
mov dword fs:[0], ecx
add esp, 0x1c
ret
mov eax, dword [edi + 4]
cmp eax, esi
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], eax
mov dword [edi], edx
mov dword [edi + 4], ecx
mov dword [esp + 0x10], esi
je 0x24038f3
push eax
call fcn.024ad03a
add esp, 4
mov ecx, dword [esp + 0x18]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x1c
ret
Function at 0x24055d0
Capabilities:
Read file on windows
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x24bed4b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xf4
push ebx
push ebp
mov ebx, ecx
xor ebp, ebp
cmp ebx, ebp
push esi
push edi
mov dword [esp + 0x10], edx
jne 0x2405602
xor eax, eax
jmp 0x24057a6
or edx, 0xffffffff
xor eax, eax
mov dword [esp + 0x68], ebp
mov dword [esp + 0x6c], ebp
mov dword [esp + 0x64], ebp
mov dword [esp + 0x3c], edx
mov dword [esp + 0x5c], ebp
mov dword [esp + 0x60], ebp
mov ecx, 6
lea edi, [esp + 0x40]
rep stosd dword es:[edi], eax
stosb byte es:[edi], al
xor eax, eax
mov dword [esp + 0x74], eax
mov ecx, 0x20
lea edi, [esp + 0x84]
mov dword [esp + 0x78], eax
mov dword [esp + 0x70], ebp
mov dword [esp + 0x7c], ebp
mov dword [esp + 0x80], edx
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x10]
test ecx, ecx
mov dword [esp + 0x10c], ebp
je 0x2405737
lea edx, [esp + 0x10]
test edx, edx
je 0x2405737
push ebp
push 0x20
push 3
push ebp
push 1
mov edx, 0x80000000
mov ecx, ebx
call fcn.02481ba0
mov esi, eax
cmp esi, 0xffffffff
jne 0x24056e7
lea edx, [esp + 0x1c]
mov ecx, ebx
mov dword [esp + 0x1c], ebp
call fcn.02481c80
test eax, eax
je 0x2405737
test byte [esp + 0x1c], 0x10
jne 0x2405737
mov edi, dword [sym.imp.kernel32.dll_Sleep]
mov dword [esp + 0x18], ebp
push 0x64
call edi
push ebp
push 0x20
push 3
push ebp
push 1
mov edx, 0x80000000
mov ecx, ebx
call fcn.02481ba0
mov esi, eax
cmp esi, 0xffffffff
jne 0x24056e7
mov eax, dword [esp + 0x18]
inc eax
cmp eax, 0x32
mov dword [esp + 0x18], eax
jb 0x24056b8
jmp 0x2405737
xor eax, eax
mov ecx, 6
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
push ebp
stosb byte es:[edi], al
lea eax, [esp + 0x18]
push eax
push 0x19
lea ecx, [esp + 0x2c]
push ecx
push esi
mov dword [esp + 0x28], ebp
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x240571a
push esi
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x2405737
cmp dword [esp + 0x14], 0x19
push esi
je 0x240572a
call dword [sym.imp.kernel32.dll_CloseHandle]
jmp 0x2405737
call dword [sym.imp.kernel32.dll_CloseHandle]
cmp byte [esp + 0x38], 1
je 0x240575c
mov eax, dword [esp + 0x3c]
cmp eax, 0xffffffff
je 0x2405747
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [esp + 0x6c]
cmp eax, ebp
je 0x2405758
push eax
call fcn.024ad03a
add esp, 4
xor eax, eax
jmp 0x24057a6
mov ecx, dword [esp + 0x10]
cmp ecx, ebp
je 0x2405780
cmp dword [esp + 0x20], 3
jne 0x240577c
cmp dword [esp + 0x2c], 0xdea
jne 0x240577c
mov eax, 1
jmp 0x240577e
xor eax, eax
mov dword [ecx], eax
mov eax, dword [esp + 0x3c]
cmp eax, 0xffffffff
je 0x2405790
push eax
call dword [sym.imp.kernel32.dll_CloseHandle]
mov eax, dword [esp + 0x6c]
cmp eax, ebp
je 0x24057a1
push eax
call fcn.024ad03a
add esp, 4
mov eax, 1
mov ecx, dword [esp + 0x104]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x100
ret
Function at 0x2405cd0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x24]
mov esi, ecx
xor eax, eax
mov ecx, 0x37a
rep stosd dword es:[edi], eax
mov ecx, dword [esp + 0x2c]
stosw word es:[edi], ax
mov eax, dword [esp + 0x28]
mov dword [eax], 0xffffffff
mov dword [ecx], 0
mov edx, dword [esi + 0x20]
mov eax, dword [esp + 0x2c]
mov dword [eax], 0
mov eax, dword [esi + 0x24]
lea ecx, [eax - 0x19]
mov dword [esp + 0x18], edx
mov eax, 0x264bbabd
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x12
mov edi, eax
mov eax, ecx
xor edx, edx
mov ecx, 0x6f580
div ecx
xor bl, bl
or ebp, 0xffffffff
shl edi, 7
mov byte [esp + 0x13], 0
cmp edx, 0x80
jbe 0x2405d5c
lea ecx, [edx - 0x80]
mov eax, 0x2660e163
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 0xb
add edi, ecx
mov eax, dword [esp + 0x18]
cmp eax, edi
jb 0x2405d73
mov edx, dword [esp + 0x2c]
mov dword [edx], 1
jmp 0x2405e20
mov ecx, dword [esi + 0x44]
mov edi, eax
shr edi, 7
cmp ecx, edi
je 0x2405dec
mov ecx, dword [esi]
mov eax, edi
shl eax, 5
add eax, edi
lea eax, [eax + eax*2]
lea eax, [eax + eax*8]
shl eax, 2
sub eax, edi
push 0
shl eax, 7
push 0
add eax, 0x19
push eax
push ecx
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x2405e3a
mov ecx, dword [esi]
push 0
lea edx, [esp + 0x18]
push edx
push 0x80
lea eax, [esi + 0x48]
push eax
push ecx
mov dword [esp + 0x28], 0
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x2405eb4
cmp dword [esp + 0x14], 0x80
jne 0x2405eb4
mov eax, dword [esp + 0x18]
mov dword [esi + 0x44], edi
and eax, 0x7f
mov bl, byte [eax + esi + 0x48]
mov ecx, eax
shl ecx, 5
add ecx, eax
lea ecx, [ecx + ecx*2]
lea edx, [ecx + ecx*8]
mov ecx, edi
shl ecx, 5
add ecx, edi
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*8]
shl ecx, 2
shl edx, 1
sub edx, eax
sub ecx, edi
shl ecx, 7
lea ebp, [ecx + edx*2 + 0x99]
mov edx, dword [esp + 0x2c]
cmp dword [edx], 0
jne 0x2405ed3
cmp bl, 1
je 0x2405e4d
inc dword [esi + 0x20]
jmp 0x2405cfc
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0xc
mov eax, dword [esi]
push 0
push 0
push ebp
push eax
call dword [sym.imp.kernel32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x2405e73
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0xc
mov edx, dword [esp + 0x24]
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0xdea
push edx
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
jne 0x2405eaa
pop edi
mov dword [esi + 0x28], 5
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0xc
cmp dword [esp + 0x1c], 0xdea
je 0x2405ec7
pop edi
mov dword [esi + 0x28], 5
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x10
ret 0xc
mov ecx, dword [esi + 0x20]
mov edx, dword [esp + 0x28]
mov dword [edx], ecx
inc dword [esi + 0x20]
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x10
ret 0xc
Function at 0x2405ef0
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ecx
push ebx
push ebp
push esi
mov esi, ecx
mov eax, dword [esi + 0x24]
lea ecx, [eax - 0x19]
mov eax, 0x264bbabd
mul ecx
mov eax, ecx
sub eax, edx
shr eax, 1
add eax, edx
shr eax, 0x12
push edi
mov edi, eax
mov eax, ecx
xor edx, edx
mov ecx, 0x6f580
div ecx
shl edi, 7
cmp edx, 0x80
jbe 0x2405f3c
lea ecx, [edx - 0x80]
mov eax, 0x2660e163
mul ecx
sub ecx, edx
shr ecx, 1
add ecx, edx
shr ecx, 0xb
add edi, ecx
mov ebp, dword [esp + 0x1c]
cmp ebp, edi
jae 0x2405ffe
mov eax, dword [esi + 0x44]
mov ebx, dword [sym.imp.kernel32.dll_SetFilePointer]
mov edi, ebp
shr edi, 7
cmp eax, edi
je 0x2405fc4
mov eax, edi
shl eax, 5
add eax, edi
lea eax, [eax + eax*2]
lea edx, [eax + eax*8]
mov eax, dword [esi]
shl edx, 2
sub edx, edi
push 0
shl edx, 7
push 0
add edx, 0x19
push edx
push eax
call ebx
cmp eax, 0xffffffff
jne 0x2405f92
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [esi]
push 0
lea ecx, [esp + 0x20]
push ecx
push 0x80
lea edx, [esi + 0x48]
push edx
push eax
mov dword [esp + 0x30], 0
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x240600f
cmp dword [esp + 0x1c], 0x80
jne 0x240600f
mov dword [esi + 0x44], edi
mov eax, ebp
and eax, 0x7f
mov ecx, eax
shl ecx, 5
add ecx, eax
lea ecx, [ecx + ecx*2]
lea edx, [ecx + ecx*8]
mov ecx, edi
shl ecx, 5
add ecx, edi
lea ecx, [ecx + ecx*2]
lea ecx, [ecx + ecx*8]
shl ecx, 2
shl edx, 1
sub edx, eax
mov al, byte [eax + esi + 0x48]
sub ecx, edi
shl ecx, 7
test al, al
lea ecx, [ecx + edx*2 + 0x99]
jne 0x2406020
pop edi
mov dword [esi + 0x28], 9
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
pop edi
mov dword [esi + 0x28], 5
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov edx, dword [esi]
xor ebp, ebp
push ebp
push ebp
push ecx
push edx
call ebx
cmp eax, 0xffffffff
jne 0x2406040
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov ecx, dword [esp + 0x18]
mov edx, dword [esi]
mov edi, dword [sym.imp.kernel32.dll_WriteFile]
push ebp
lea eax, [esp + 0x14]
push eax
push 0xdea
push ecx
push edx
mov dword [esp + 0x24], ebp
call edi
test eax, eax
jne 0x2406072
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
pop ebx
pop ecx
ret 8
cmp dword [esp + 0x10], 0xdea
je 0x240608d
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
cmp dword [esi + 0x40], ebp
jne 0x24060ed
inc dword [esi + 8]
call dword [sym.imp.kernel32.dll_GetTickCount]
push ebp
push ebp
mov dword [esi + 0xc], eax
mov eax, dword [esi]
push ebp
push eax
call ebx
cmp eax, 0xffffffff
jne 0x24060bc
pop edi
mov dword [esi + 0x28], 0xa
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov eax, dword [esi]
push ebp
lea ecx, [esp + 0x20]
push ecx
push 0x19
lea edx, [esi + 4]
push edx
push eax
mov dword [esp + 0x30], ebp
call edi
test eax, eax
je 0x24060dc
cmp dword [esp + 0x1c], 0x19
je 0x24060ed
pop edi
mov dword [esi + 0x28], 4
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 8