joyce8/EMBER2024-capa huggingface dataset:
Function at 0x413a18
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 + 0x46e8f0]
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 0x413a58
cmp byte [ebx], 0xa
jne 0x413a58
or byte [edi + eax + 0x28], 4
jmp 0x413a5d
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 0x413b5c
mov dl, byte [eax]
cmp dl, 0x1a
je 0x413b3f
inc eax
cmp dl, 0xd
je 0x413a89
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x413aaf
cmp eax, ecx
jae 0x413abd
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 0x413a71
jmp 0x413b5c
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 0x413b3a
cmp dword [ebp - 0x10], 0
je 0x413b3a
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x46e8f0]
test byte [eax + edi + 0x28], 0x48
je 0x413b14
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x413aff
mov byte [esi], dl
jmp 0x413b10
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x46e8f0]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x413b5c
cmp byte [ebp - 1], 0xa
jne 0x413b23
cmp esi, ebx
jne 0x413b23
mov byte [esi], 0xa
jmp 0x413b5b
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00413391
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x413b5c
mov byte [esi], 0xd
jmp 0x413b5b
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x46e8f0]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x413b59
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x413b5c
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x413b65
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 + 0x46e8f0]
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 0x413bab
cmp word [ebx], dx
jne 0x413bab
or byte [eax + edi + 0x28], 4
jmp 0x413bb0
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 0x413d13
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 0x413cf3
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x413bf1
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x413c27
cmp eax, edx
jae 0x413c35
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 0x413bcc
jmp 0x413d13
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 0x413cee
cmp dword [ebp - 0x18], 0
je 0x413cee
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x46e8f0]
test byte [eax + edi + 0x28], 0x48
je 0x413cc4
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 0x413c88
mov word [esi], cx
jmp 0x413cbf
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x46e8f0]
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 + 0x46e8f0]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x46e8f0]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x413d13
pop eax
cmp word [ebp - 4], ax
jne 0x413cd4
cmp esi, ebx
jne 0x413cd4
mov word [esi], ax
jmp 0x413d10
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.00413391
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x413d13
push 0xd
pop eax
jmp 0x413ccf
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x46e8f0]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x413d0d
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x413d13
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 0x4176be
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x45623c
push 0x456234
push str.FlsAlloc
push 0x1f
call fcn.0041753d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4176f2
push dword [ebp + 8]
mov ecx, esi
call dword [0x4211f4]
call esi
jmp 0x4176f8
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x41773c
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x45624c
push 0x456244
push str.FlsGetValue
push 0x21
call fcn.0041753d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x417773
push dword [ebp + 8]
mov ecx, esi
call dword [0x4211f4]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x41777b
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x456254
push 0x45624c
push str.FlsSetValue
push 0x22
call fcn.0041753d
mov esi, eax
add esp, 0x10
test esi, esi
je 0x4177b5
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x4211f4]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x4193e6
Capabilities:
Enumerate files on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x264
mov eax, dword [0x469f40]
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 0x419431
movzx eax, word [edx]
lea ecx, [ebp - 0x255]
push eax
call fcn.00419581
test al, al
jne 0x41942b
sub edx, 2
cmp edx, edi
jne 0x419411
mov ecx, dword [ebp - 0x25c]
movzx esi, word [edx]
cmp esi, 0x3a
jne 0x419453
lea eax, [edi + 2]
cmp edx, eax
je 0x419453
push ecx
xor ebx, ebx
push ebx
push ebx
push edi
call fcn.00419332
add esp, 0x10
jmp 0x41954d
push esi
lea ecx, [ebp - 0x255]
call fcn.00419581
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 0x419496
push dword [ebp - 0x25c]
jmp 0x419443
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 0x4194d3
cmp word [ebp - 0x226], 0
je 0x4194f4
cmp word [ebp - 0x226], ax
jne 0x4194d3
cmp word [ebp - 0x224], 0
je 0x4194f4
push ebx
push dword [ebp - 0x260]
lea eax, [ebp - 0x228]
push edi
push eax
call fcn.00419332
add esp, 0x10
mov dword [ebp - 0x264], eax
test eax, eax
jne 0x419540
lea eax, [ebp - 0x254]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
push 0x2e
test eax, eax
pop eax
jne 0x4194ad
mov eax, dword [ebx + 4]
mov edx, dword [ebx]
sub eax, edx
mov ecx, dword [ebp - 0x25c]
sar eax, 2
cmp ecx, eax
jne 0x419528
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
xor eax, eax
jmp 0x41954d
push 0x419162
sub eax, ecx
push 4
push eax
lea eax, [edx + ecx*4]
push eax
call fcn.0041dfb0
add esp, 0x10
jmp 0x41951d
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.00406aa2
leave
ret

Function at 0x419e63
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
jne 0x419e74
pop esi
ret
push ebx
push edi
push esi
call fcn.00419e2c
mov ebx, eax
sub ebx, esi
and ebx, 0xfffffffe
push ebx
call fcn.00415e90
mov edi, eax
pop ecx
pop ecx
test edi, edi
je 0x419e9c
push ebx
push esi
push edi
call fcn.00408790
add esp, 0xc
push 0
call fcn.00414d8d
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
pop edi
pop ebx
pop esi
ret

Function at 0x41a26c
Capabilities:
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.00419eb1
Function at 0x41deab
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x469f40]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
cmp eax, 0x1a
jbe 0x41deee
call fcn.00414614
mov dword [eax], 0xf
call fcn.00414627
mov dword [eax], 0xd
call fcn.00410119
xor eax, eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00406aa2
leave
ret
test eax, eax
jne 0x41def5
inc eax
jmp 0x41dee2
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 0x41dee0
xor eax, eax
cmp ecx, 1
setne al
jmp 0x41dee2

Function at 0x41fae0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x41fb0d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x41fb0d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x5e6792
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
pushal
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
test eax, eax
je 0x5e6830
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x5e6830
mov eax, dword [ebp + 8]
mov eax, dword [eax + 4]
cmp word [eax], 0x5a4d
jne 0x5e6830
mov ebx, dword [eax + 0x3c]
add eax, ebx
cmp dword [eax], 0x4550
jne 0x5e6830
mov ebx, dword [eax + 0x34]
mov dword [ebp - 0xc], ebx
mov ebx, dword [eax + 0x50]
mov dword [ebp - 8], ebx
push edi
push 4
push 0x2000
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [edi + 0x122d2604]
pop edi
test eax, eax
jne 0x5e6823
push edi
push 4
push 0x2000
push dword [ebp - 8]
push 0
call dword [edi + 0x122d2604]
pop edi
test eax, eax
je 0x5e6830
mov ebx, dword [ebp + 8]
mov dword [ebx + 0x14], eax
mov dword [ebp - 0x10], 1
popal
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x5e68b5
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
pushal
mov eax, dword [ebp + 8]
mov ebx, dword [eax + 0x14]
mov dword [ebp - 8], ebx
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov ebx, dword [eax + 0x3c]
add eax, ebx
lea ebx, [eax + 0x18]
movzx ecx, word [eax + 0x14]
add ebx, ecx
movzx ecx, word [eax + 6]
test ecx, ecx
je 0x5e6961
push ecx
mov ecx, dword [ebx + 8]
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jae 0x5e68f6
mov ecx, edx
mov dword [ebp - 4], ecx
mov eax, dword [ebx + 0xc]
add eax, dword [ebp - 8]
push ecx
push edi
push 4
push 0x1000
push dword [ebp - 4]
push eax
call dword [edi + 0x122d2604]
pop edi
pop ecx
test eax, eax
je 0x5e6954
push edi
mov edi, eax
xor eax, eax
push ecx
push edi
rep stosb byte es:[edi], al
pop edi
pop ecx
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jl 0x5e6934
mov ecx, edx
mov esi, dword [ebx + 0x14]
add esi, dword [ebp - 0xc]
lea eax, [ebx + 0x10]
cmp dword [eax + 4], 0
je 0x5e6949
rep movsb byte es:[edi], byte [esi]
pop edi
add ebx, 0x28
pop ecx
dec ecx
jmp 0x5e68dd
pop ecx
mov dword [ebp - 0x10], 0
jmp 0x5e6968
mov dword [ebp - 0x10], 1
popal
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x5e6b82
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
pushal
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x14], eax
mov ebx, dword [eax + 0x3c]
add eax, ebx
lea ebx, [eax + 0x18]
movzx ecx, word [eax + 0x14]
add ebx, ecx
movzx ecx, word [eax + 6]
test ecx, ecx
je 0x5e6bfc
push ecx
mov ecx, dword [ebx + 0xc]
add ecx, dword [ebp - 0x14]
mov edx, dword [ebx + 0x24]
push edx
call fcn.005e6b27
mov dword [ebp - 4], eax
mov dword [ebp - 0xc], ecx
mov eax, dword [ebx + 8]
mov dword [ebp - 8], eax
push edi
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 4]
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [edi + 0x122d28b1]
pop edi
test eax, eax
jne 0x5e6bf2
pop ecx
jmp 0x5e6c03
add ebx, 0x28
pop ecx
dec ecx
jmp 0x5e6bab
mov dword [ebp - 0x18], 1
popal
mov eax, dword [ebp - 0x18]
leave
ret 4
Function at 0x5e6da9
Capabilities:
Enumerate pe sections
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
cmp dword [ebp + 0x18], 0
jne 0x5e6efd
cmp dword [ebp + 0xc], 0
jne 0x5e6efd
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
mov dword [ebp - 0x1c], eax
mov eax, dword [eax + 8]
cmp eax, 0xffffffff
je 0x5e6df0
sub eax, dword [ebp + 0x10]
js 0x5e6efd
je 0x5e6efd
cmp eax, dword [ebp + 0x14]
jl 0x5e6efd
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
cmp word [eax], 0x5a4d
jne 0x5e6efd
mov ebx, dword [eax + 0x3c]
add eax, ebx
cmp dword [eax], 0x4550
jne 0x5e6efd
mov ebx, dword [eax + 0x50]
push edi
push 4
push 0x1000
push ebx
push 0
call dword [edi + 0x122d2604]
pop edi
test eax, eax
je 0x5e6efd
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x18], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x14], ebx
pop ebx
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [edi + 0x124ab160]
push eax
call fcn.005e5e11
pop edi
test eax, eax
je 0x5e6efd
lea eax, [ebp - 0x18]
push edi
push eax
lea eax, [edi + 0x124ab164]
push eax
call fcn.005e5e11
pop edi
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
mov ebx, dword [eax + 0x3c]
add eax, ebx
mov eax, dword [eax + 0x54]
mov dword [ebp - 0xc], eax
push edi
mov ecx, dword [ebp - 0xc]
mov edi, dword [ebp - 0x10]
mov esi, dword [ebp - 0x1c]
mov esi, dword [esi + 4]
rep movsb byte es:[edi], byte [esi]
pop edi
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 0x1c]
mov eax, dword [eax + 4]
mov dword [ebp - 4], eax
mov ebx, dword [eax + 0x3c]
add eax, ebx
lea ebx, [eax + 0x18]
movzx ecx, word [eax + 0x14]
add ebx, ecx
movzx ecx, word [eax + 6]
test ecx, ecx
je 0x5e6ef0
push ecx
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
add eax, dword [ebp - 8]
test eax, eax
je 0x5e6efd
push edi
mov edi, eax
xor eax, eax
push ecx
push edi
rep stosb byte es:[edi], al
pop edi
pop ecx
mov edx, dword [ebx + 0x10]
cmp ecx, edx
jl 0x5e6edd
mov ecx, edx
mov esi, dword [ebx + 0x14]
add esi, dword [ebp - 4]
rep movsb byte es:[edi], byte [esi]
pop edi
add ebx, 0x28
pop ecx
dec ecx
jmp 0x5e6eab
push dword [ebp + 8]
call fcn.005e7c9f
jmp 0x5e6f04
mov dword [ebp - 0x18], 0
mov eax, dword [ebp - 0x18]
leave
ret 0x14
Function at 0x5e728f
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
pushal
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0xc], eax
test eax, eax
je 0x5e737e
mov ecx, eax
mov ebx, dword [ecx + 0x3c]
add ecx, ebx
mov ecx, dword [ecx + 0x7c]
test ecx, ecx
je 0x5e737e
mov dword [ebp - 4], ecx
mov ebx, eax
mov ecx, dword [ebx + 0x3c]
add ebx, ecx
mov ebx, dword [ebx + 0x78]
add ebx, eax
mov dword [ebp - 8], ebx
mov eax, dword [ebp + 0xc]
test eax, 0xffff0000
je 0x5e732a
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x5e737e
dec ecx
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x20]
add eax, dword [ebp - 0xc]
push ecx
shl ecx, 2
add eax, ecx
mov eax, dword [eax]
add eax, dword [ebp - 0xc]
push edi
push dword [ebp + 0xc]
push eax
call dword [edi + 0x124ab2c0]
pop edi
pop ecx
test eax, eax
jne 0x5e72e3
mov eax, dword [ebp - 8]
mov eax, dword [eax + 0x24]
add eax, dword [ebp - 0xc]
shl ecx, 1
add eax, ecx
movzx ecx, word [eax]
jmp 0x5e7330
mov ecx, dword [ebp + 0xc]
sub ecx, dword [ebx + 0x10]
mov ebx, dword [ebp - 8]
mov eax, dword [ebx + 0x14]
cmp ecx, eax
jge 0x5e737e
mov eax, dword [ebp - 0xc]
mov edx, dword [ebx + 0x1c]
add edx, eax
shl ecx, 2
add edx, ecx
cmp dword [edx], 0
je 0x5e737e
mov ebx, dword [edx]
add eax, ebx
mov dword [ebp - 0x10], eax
cmp eax, dword [ebp - 8]
jle 0x5e737e
sub eax, dword [ebp - 8]
cmp eax, dword [ebp - 4]
jge 0x5e737e
push dword [ebp - 0x10]
push dword [ebp + 8]
call fcn.005e71d8
mov dword [ebp - 0x10], eax
popal
mov eax, dword [ebp - 0x10]
leave
ret 8
Function at 0x40aa46
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
mov ebx, ecx
push 0xfffffffffffffff5
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov edi, eax
cmp edi, 0xffffffff
je 0x40ab3e
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
mov esi, eax
test esi, esi
jne 0x40aa84
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40ab3d
and esi, 0xffff7fff
cmp esi, 2
jne 0x40aacf
lea eax, [ebp - 0x14]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
jne 0x40aaa9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 6
je 0x40aacf
mov ecx, ebx
xor esi, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, si
jne 0x40aab0
push esi
sub ecx, edx
lea eax, [ebp - 0x10]
push eax
sar ecx, 1
push ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteConsoleW]
jmp 0x40ab3d
call dword [sym.imp.KERNEL32.dll_GetConsoleOutputCP]
xor esi, esi
mov dword [ebp - 0xc], eax
push esi
push esi
push esi
push esi
push 0xffffffffffffffff
push ebx
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 4], eax
test eax, eax
je 0x40ab3d
push eax
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x40ab3d
push esi
push esi
push dword [ebp - 4]
push ebx
push 0xffffffffffffffff
push dword [ebp - 8]
push esi
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
je 0x40ab2e
push esi
lea ecx, [ebp - 0x10]
dec eax
push ecx
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40d67c
Capabilities:
Check if file exists
Get file size
Read file via mapping

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], edx
push ebx
push ebx
push 3
push ebx
push 1
mov edi, ecx
push 0x80000000
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0xc], esi
cmp esi, 0xffffffff
jne 0x40d6f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
cmp esi, 2
je 0x40d6dc
cmp esi, 3
je 0x40d6dc
mov edx, esi
mov ecx, edi
call fcn.0040da6c
push esi
push edi
push 0x403060
push 4
call fcn.0040fadc
add esp, 0x10
jmp 0x40d7c3
push edi
push 0x4030c8
push 2
call fcn.0040fadc
add esp, 0xc
jmp 0x40d7c3
lea eax, [ebp - 0x1c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x40d727
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.0040da6c
push esi
push edi
push 0x403158
push 4
call fcn.0040fadc
add esp, 0x10
jmp 0x40d7ba
cmp dword [ebp - 0x18], ebx
je 0x40d74a
push 0x57
pop esi
mov edx, esi
mov ecx, edi
call fcn.0040da6c
push edi
push 0x4031bc
push 4
call fcn.0040fadc
add esp, 0xc
jmp 0x40d7ba
push ebx
push dword [ebp - 0x1c]
push ebx
push 2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [ebp - 8], eax
test eax, eax
jne 0x40d77a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.0040da6c
push esi
push edi
push 0x4031e8
jmp 0x40d718
push dword [ebp - 0x1c]
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
jne 0x40d7cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, edi
mov edx, esi
call fcn.0040da6c
push esi
push edi
push 0x403248
push 4
call fcn.0040fadc
mov ecx, dword [ebp - 8]
add esp, 0x10
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x40d7e2
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 8]
mov dword [eax], esi
mov dword [eax + 4], ecx
mov dword [eax + 8], ebx
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40dafd
Capabilities:
Acquire debug privileges

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push ebx
push edi
mov ebx, edx
mov dword [ebp - 8], 0x403720
push eax
xor edx, edx
push ecx
inc edx
lea ecx, [ebp - 8]
call fcn.0040fd03
mov edi, eax
test edi, edi
je 0x40db35
mov ecx, dword [ebp - 4]
mov edx, ebx
call fcn.0040fbba
mov edi, eax
cmp dword [ebp - 4], 0
je 0x40db4d
push dword [ebp - 4]
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x40dca3
Capabilities:
Get disk information

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x27c
mov eax, dword [0x420004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
xor edi, edi
mov esi, edi
test ebx, ebx
jne 0x40dcd0
mov dword [0x4203f8], edi
jmp 0x40de74
push 0x5c
pop esi
cmp word [ebx], si
jne 0x40dd34
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40dcdb
sub ecx, edx
lea eax, [ebp - 0x27c]
sar ecx, 1
push eax
mov dword [ebp - 0x27c], ecx
call fcn.0040d4b3
mov esi, eax
test esi, esi
js 0x40de74
mov eax, dword [ebp - 0x27c]
lea edi, [eax + 2]
cmp edi, eax
jb 0x40de6f
push ebx
lea eax, [ebp - 0x210]
xor esi, esi
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0xc
jmp 0x40de3c
push 0x104
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_QueryDosDeviceW]
test eax, eax
jne 0x40ddfd
push 0x104
lea eax, [ebp - 0x210]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetVolumePathNameW]
test eax, eax
jne 0x40dd70
mov esi, 0xc000000d
jmp 0x40de74
push 0x32
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetVolumeNameForVolumeMountPointW]
test eax, eax
je 0x40dd66
lea eax, [ebp - 0x278]
push eax
lea eax, [ebp - 0x210]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
lea ecx, [ebp - 0x210]
add esp, 0xc
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40ddaf
sub ecx, edx
sar ecx, 1
cmp ecx, 1
jbe 0x40ddfd
cmp word [ebp - 0x20e], si
jne 0x40ddd6
push 0x3f
pop eax
mov word [ebp - 0x20e], ax
cmp word [ebp + ecx*2 - 0x212], si
jne 0x40ddfd
lea ecx, [ecx*2 - 2]
cmp ecx, 0x208
jae 0x40de87
xor eax, eax
mov word [ebp + ecx - 0x210], ax
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
cmp ax, di
jne 0x40de06
sub ecx, edx
lea eax, [ebp - 0x27c]
sar ecx, 1
push eax
mov dword [ebp - 0x27c], ecx
call fcn.0040d4b3
mov esi, eax
test esi, esi
js 0x40de74
mov eax, dword [ebp - 0x27c]
lea edi, [eax + 2]
cmp edi, eax
jb 0x40de6f
xor esi, esi
push edi
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [0x4203f8], eax
test eax, eax
jne 0x40de5c
mov esi, 0xc0000017
jmp 0x40de74
push edi
lea ecx, [ebp - 0x210]
push ecx
push eax
call sub.msvcrt.dll_memcpy
add esp, 0xc
jmp 0x40de74
mov esi, 0xc0000095
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0041ef80
mov esp, ebp
pop ebp
ret
call fcn.0041f0e5
int3