joyce8/EMBER2024-capa huggingface dataset:
Function at 0x653974
Capabilities:
Read http header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffdc
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x20], ebx
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov edi, dword [ebp + 8]
xor eax, eax
push ebp
push 0x653ad8
push dword fs:[eax]
mov dword fs:[eax], esp
mov ebx, dword [ebp - 8]
test esi, esi
je 0x6539b6
or ebx, 0xffff
mov eax, esi
call fcn.0040a87c
mov esi, eax
jmp 0x6539b8
xor esi, esi
xor eax, eax
mov dword [ebp - 0xc], eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0
push esi
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.winhttp.dll_WinHttpQueryHeaders
call sub.kernel32.dll_GetLastError
cmp eax, 0x2f76
jne 0x6539e8
mov eax, edi
call fcn.00409ce4
jmp 0x653abb
call sub.kernel32.dll_GetLastError
cmp eax, 0x7a
je 0x653a38
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
call sub.kernel32.dll_GetLastError
lea ecx, [ebp - 0x20]
mov edx, dword [0x682ec4]
call fcn.00429874
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0x11
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [0x67b850]
mov dl, 1
mov eax, dword [0x6570d4]
call fcn.0042b8bc
call fcn.004093cc
mov edx, dword [ebp - 0xc]
shr edx, 1
dec edx
mov eax, edi
call fcn.0040a9f0
mov eax, dword [edi]
test eax, eax
je 0x653a4e
mov eax, dword [eax - 4]
test eax, eax
jle 0x653abb
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [edi]
call fcn.0040a87c
push eax
push esi
push ebx
mov eax, dword [ebp - 4]
push eax
call sub.winhttp.dll_WinHttpQueryHeaders
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x653abb
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0
call sub.kernel32.dll_GetLastError
lea ecx, [ebp - 0x24]
mov edx, dword [0x682ec4]
call fcn.00429874
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x14], eax
mov byte [ebp - 0x10], 0x11
lea eax, [ebp - 0x1c]
push eax
push 1
mov ecx, dword [0x67b850]
mov dl, 1
mov eax, dword [0x6570d4]
call fcn.0042b8bc
call fcn.004093cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x653adf
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.00409d44
pop eax
jmp eax

Function at 0x653c9c
Capabilities:
Initialize winhttp library

Disassembly:
push ebx
push esi
push edi
test dl, dl
je 0x653cab
add esp, 0xfffffff0
call fcn.0040845c
mov ebx, edx
mov edi, eax
mov eax, edi
call fcn.0065e3d4
mov dl, 1
mov eax, dword [0x652048]
call fcn.00656f18
mov dword [edi + 0xd8], eax
mov dl, 1
mov eax, dword [0x646e90]
call fcn.0064f53c
mov dword [edi + 0xd4], eax
mov eax, dword [0x6510dc]
call fcn.00656ad0
push 0
push 0
push 0
push 1
push 0x653d4c
call sub.winhttp.dll_WinHttpOpen
mov esi, eax
mov dword [edi + 0xd0], esi
test esi, esi
jne 0x653d19
mov ecx, dword [0x67ba34]
mov dl, 1
mov eax, dword [0x65718c]
call fcn.0042b880
call fcn.004093cc
push 0
push 0x10010
push 0x653af8
mov eax, dword [edi + 0xd0]
push eax
call sub.winhttp.dll_WinHttpSetStatusCallback
mov eax, edi
test bl, bl
je 0x653d46
call fcn.004084b4
pop dword fs:[0]
add esp, 0xc
mov eax, edi
pop edi
pop esi
pop ebx
ret
Function at 0x6552b0
Capabilities:
Prepare http request

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd4
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0x14], ecx
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x65548c
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebx + 0xc9], 0
mov byte [ebx + 0xc8], 0
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
jle 0x6552fa
mov esi, dword [ebp - 4]
movzx esi, word [esi + 0x10]
jmp 0x6552fc
xor esi, esi
push 0
push esi
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
call fcn.0040a87c
push eax
mov eax, dword [ebx + 0x58]
mov eax, dword [eax + 0xd0]
push eax
call sub.winhttp.dll_WinHttpConnect
mov edi, eax
mov dword [ebx + 0xb0], edi
test edi, edi
jne 0x655350
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
mov byte [ebp - 8], 0x11
lea eax, [ebp - 0xc]
push eax
push 0
mov ecx, dword [0x67b554]
mov dl, 1
mov eax, dword [0x657254]
call fcn.0042b8bc
call fcn.004093cc
xor esi, esi
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov edx, 0x6554a8
call fcn.0040ac04
jne 0x655369
or esi, 0x800000
push esi
push 0
push 0
push 0
lea edx, [ebp - 0x10]
mov eax, dword [ebp - 4]
call fcn.00653934
mov eax, dword [ebp - 0x10]
call fcn.0040a87c
push eax
lea edx, [ebp - 0x14]
mov eax, ebx
call fcn.0064c514
mov eax, dword [ebp - 0x14]
call fcn.0040a87c
push eax
mov eax, dword [ebx + 0xb0]
push eax
call sub.winhttp.dll_WinHttpOpenRequest
mov edi, eax
mov dword [ebx + 0xb4], edi
test edi, edi
jne 0x6553f5
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0
call sub.kernel32.dll_GetLastError
lea ecx, [ebp - 0x28]
mov edx, dword [0x682ec4]
call fcn.00429874
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0x11
lea eax, [ebp - 0x24]
push eax
push 1
mov ecx, dword [0x67b9b4]
mov dl, 1
mov eax, dword [0x657254]
call fcn.0042b8bc
call fcn.004093cc
mov eax, dword [ebx + 0x14]
push eax
mov eax, ebx
call fcn.0064c670
push eax
mov esi, dword [ebx + 0xc]
push esi
push esi
mov eax, dword [ebx + 0xb4]
push eax
call sub.winhttp.dll_WinHttpSetTimeouts
cmp eax, 1
sbb eax, eax
inc eax
test al, al
jne 0x655462
call sub.kernel32.dll_GetLastError
mov dword [ebp - 0x24], eax
mov byte [ebp - 0x20], 0
call sub.kernel32.dll_GetLastError
lea ecx, [ebp - 0x2c]
mov edx, dword [0x682ec4]
call fcn.00429874
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x1c], eax
mov byte [ebp - 0x18], 0x11
lea eax, [ebp - 0x24]
push eax
push 1
mov ecx, dword [0x67bb18]
mov dl, 1
mov eax, dword [0x657254]
call fcn.0042b8bc
call fcn.004093cc
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x655493
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.00409d44
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.00409d44
pop eax
jmp eax
Function at 0x43b11e
Capabilities:
Encode data using xor

Disassembly:
in eax, dx
lahf
mov ebx, 0x314285c9
test dword [0x65327be9], ecx
cdq
xor dword [ebp + 0x327be90d], eax
cdq
movsd dword es:[edi], dword [esi]
cmp eax, 0xaca54941
lds ebx, [ecx + 0x5209b929]
movsd dword es:[edi], dword [esi]
xor eax, 0x3590595d
inc ebx
shl dword [ebp + 0x29ac456d], 1
jg 0x43b124
fldenv [ebp - 8]
test dword [edx + 0x50], ebp
cmp dl, al
insd dword es:[edi], dx
cmp dl, byte [edi]
push esi
xchg esp, eax
mov al, byte [0xf898134c]
wait
hlt

Function at 0x4439d7
Capabilities:
Encode data using xor

Disassembly:
aas
pop ecx
and edx, edi
nop
clc
cmpsb byte [esi], byte es:[edi]
mov ch, 0x36
xchg esi, ebx
add dl, byte [ebp - 0x62e06a63]
invalid
arpl bp, cx
test byte [eax + 8], dl
test dword [0x5551d6df], 0xb4f059f8
inc esp
or al, dl
add dword [esi + 0x182ed55b], esp
test byte [ecx], cl
xor ah, byte [ebx]
inc ebp
dec ebp
pop es
aad 0xc5
xor byte [esi + 0x442f096a], al
mov esi, 0x6d6ed357
xchg esi, eax
loopne 0x4438ff
or edi, eax
not cl
call [ebp - 0x34]
imul esi, dword [ecx], 0xffffffe8
xor al, 0xb3
insb byte es:[edi], dx
invalid
movsb byte es:[edi], byte [esi]
in eax, dx
mov al, byte [0xf69470f1]
xor eax, 0xc6b1ae60
push esp
sbb dword [esi], eax
jge 0x443944
lahf
mov byte [0xf91205d5], al
test byte [ebp + 0x1c8fb04c], cl
dec eax
xor dword [eax], ecx
dec edi
push edi
jno 0x443a2d
mov byte [edi], cl
sahf
loopne 0x443a18
loopne 0x4439b1
cmpsb byte [esi], byte es:[edi]
jmp 0x949621d6
les ecx, [ecx]
int 0x52
inc ebx
dec ebx
invalid
invalid

Function at 0x45270e
Capabilities:
Encode data using xor

Disassembly:
mov dword [eax + ebp*8 - 0x13b7acb4], esp
sbb al, byte [edx - 0x3860c8f7]
adc bh, ah
xchg esp, eax
mov edi, 0xe705ff41
cmp eax, 0x419ed5a2
ja 0x4526f7
push esp
outsb dx, byte [esi]
mov ecx, 0xaf19a64c
cmpsb byte [esi], byte es:[edi]
sbb dword [edi - 0x75206dba], ebp
jno 0x4526c1
inc esi
xchg edx, eax
fisttp word [edx - 0x71f7288f]
dec eax
scasb al, byte es:[edi]
mov eax, 0x27d48bc9
or byte [esi - 0x364751b8], cl
test byte [eax + 0x7a], dh
adc byte [0x14b454a9], dh
mov bl, 0x73
xchg ecx, eax
jl 0x4526e1
mov cl, byte [eax - 0x8e72894]

Function at 0x628d05
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x6323e8
cmp edx, dword [eax]
je 0x628d27
add eax, 8
inc ecx
cmp eax, 0x632478
jl 0x628d18
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x6323e8]
jne 0x628e55
mov eax, dword [0x63ad88]
cmp eax, 1
je 0x628e2f
test eax, eax
jne 0x628d58
cmp dword [0x632310], 1
je 0x628e2f
cmp edx, 0xfc
je 0x628e55
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x628d8f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.006296f0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00629b80
inc eax
lea eax, [ebp + 8]
lea esi, [esi + 0x6323ec]
push 0
push eax
push dword [esi]
call fcn.00629b80
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
Function at 0x403690
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
or esi, esi
lea eax, [edx + eax + 0x18]
je 0x4036c8
sub ecx, ecx
nop
mov edx, dword [eax + 0xc]
cmp edx, ebx
ja 0x4036be
add edx, dword [eax + 8]
cmp ebx, edx
jb 0x4036ca
add ecx, 1
add eax, 0x28
cmp ecx, esi
jne 0x4036b0
sub eax, eax
pop ebx
pop esi
ret

Function at 0x405340
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
push edi
push esi
push ebx
sub esi, esi
sub ebx, ebx
sub esp, 0x6c
mov ebp, dword [esp + 0x8c]
call fcn.0040ad60
mov eax, dword [eax]
mov dword [esp], 0x40dcc5
mov dword [esp + 0x3c], 0xffffffff
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x44], 0xfffffffd
mov word [esp + 0x48], bx
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x84]
mov dword [esp + 0x4c], 0
mov word [esp + 0x50], si
mov dword [esp + 0x54], 0
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x80]
and eax, 0x6000
mov dword [esp + 0x18], eax
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0x88]
mov dword [esp + 0x58], eax
call fcn.0040ad00
or eax, eax
je 0x4053d9
movsx edx, byte [eax]
nop
nop
push 2
pop eax
sub edx, 0x30
cmp edx, 2
jbe 0x4053e6
call fcn.0040ae80
and eax, 1
neg eax
add eax, 3
mov dword [esp + 0x5c], eax
movzx edx, byte [ebp]
nop
movsx eax, dl
lea esi, [ebp + 1]
or eax, eax
je 0x405490
cmp eax, 0x25
jne 0x4054a0
mov eax, dword [esp + 0x18]
movzx edx, byte [ebp + 1]
sub edi, edi
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x3c], 0xffffffff
push esi
pop ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0x38], eax
lea eax, [esp + 0x3c]
test dl, dl
mov dword [esp + 0x14], eax
je 0x405477
lea ecx, [edx - 0x20]
lea ebp, [ebx + 1]
movsx eax, dl
cmp cl, 0x5a
ja 0x405ac0
movzx ecx, cl
jmp dword [ecx*4 + 0x40dcdc]
test dl, dl
jne 0x40543b
movsx eax, dl
mov ebp, ebx
or eax, eax
lea esi, [ebp + 1]
jne 0x4053fe
nop
nop
lea edi, [edi]
mov eax, dword [esp + 0x54]
add esp, 0x6c
pop ebx
pop esi
pop edi
pop ebp
ret
lea edx, [esp + 0x34]
call fcn.00403bd0
movzx edx, byte [ebp + 1]
mov ebp, esi
jmp 0x4053f0
movzx edx, byte [ebp]
jmp 0x4053f0
movzx edx, byte [ebx + 1]
mov ebx, ebp
jmp 0x405473
add edx, 0xffffffd0
cmp dl, 9
ja 0x405d4c
cmp edi, 3
ja 0x405d4c
or edi, edi
jne 0x405b59
pushfd
xor edi, edi
inc edi
popfd
mov edx, dword [esp + 0x14]
or edx, edx
je 0x405a4c
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx]
or edx, edx
js 0x405cad
lea edx, [edx + edx*4]
mov ecx, dword [esp + 0x14]
lea eax, [eax + edx*2 - 0x30]
movzx edx, byte [ebx + 1]
mov dword [ecx], eax
jmp 0x405a50
cmp edi, 2
push 3
nop
nop
pop edx
cmove edi, edx
jmp 0x405ae2
sub eax, 0x30
movzx edx, byte [ebx + 1]
mov ebx, ebp
mov dword [ecx], eax
jmp 0x405473
lea ebp, [edx + 0x63]
xor ch, byte [ebp + 0x58]
nop
nop
mov ebp, esi
call fcn.00403bd0
jmp 0x4054f2
Function at 0x401810
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x14
push ebx
push ebp
push esi
push edi
call fcn.004010b0
push 0x411090
mov esi, eax
call fcn.004017f0
mov esi, dword [esi + 0xc]
add esp, 4
mov dword [esp + 0x14], eax
mov ebx, dword [esi + 0xc]
mov dword [esp + 0x18], ebx
mov edx, dword [ebx]
cmp edx, ebx
mov dword [esp + 0x10], edx
je 0x4018be
jmp 0x401849
mov edx, dword [esp + 0x10]
mov esi, dword [edx + 0x18]
test esi, esi
je 0x4018be
mov eax, dword [esi + 0x3c]
xor ebp, ebp
mov edi, dword [eax + esi + 0x78]
mov eax, dword [edi + esi + 0x20]
add edi, esi
add eax, esi
mov ecx, dword [edi + 0x1c]
add ecx, esi
mov dword [esp + 0x20], ecx
mov ecx, dword [edi + 0x24]
add ecx, esi
mov dword [esp + 0x1c], ecx
mov ecx, dword [edi + 0x18]
test ecx, ecx
jbe 0x4018b4
mov ebx, eax
mov eax, dword [ebx]
mov ecx, dword [esp + 0x14]
add eax, esi
push 0x411090
push ecx
push eax
call fcn.00401770
push eax
call fcn.00401000
mov ecx, dword [esp + 0x38]
add esp, 0x10
cmp eax, ecx
je 0x4018c8
mov eax, dword [edi + 0x18]
inc ebp
add ebx, 4
cmp ebp, eax
jb 0x40187c
mov edx, dword [esp + 0x10]
mov ebx, dword [esp + 0x18]
mov edx, dword [edx]
cmp edx, ebx
mov dword [esp + 0x10], edx
jne 0x401845
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x14
ret
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
xor edx, edx
pop edi
mov dx, word [eax + ebp*2]
mov eax, dword [ecx + edx*4]
add eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
Function at 0x10001970
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, ecx
cmp dword [esi + 8], 0
jne 0x100019d9
mov eax, dword [esi + 4]
lea ecx, [ebp - 8]
mov edx, dword [esi]
push ecx
push 0x40
push eax
push edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [esi + 4]
mov dword [ebp - 0xc], eax
push dword [esi + 0xc]
push dword [esi]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0xc], 0
je 0x100019d2
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esi + 8], 1
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x100019e0
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
mov esi, ecx
cmp dword [esi + 8], 0
je 0x10001a49
mov eax, dword [esi + 4]
lea ecx, [ebp - 8]
mov edx, dword [esi]
push ecx
push 0x40
push eax
push edx
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
push dword [esi + 4]
mov dword [ebp - 0xc], eax
push dword [esi + 0x18]
push dword [esi]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0xc], 0
je 0x10001a42
lea eax, [ebp - 4]
push eax
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov dword [esi + 8], 0
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x10003920
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006e4c0
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x1008c0c0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov eax, dword [ebp + 8]
lea ecx, [edi + 0xc]
mov dword [edi], eax
mov dword [edi + 4], 5
mov dword [edi + 8], 0
push 5
mov dword [edi + 0xc], 0
mov dword [edi + 0x10], 0
mov dword [edi + 0x14], 0
call fcn.10003ce0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
lea ecx, [eax + 5]
mov byte [eax + 4], 0
mov dword [edi + 0x10], ecx
mov dword [ebp - 4], 0
lea ecx, [edi + 0x18]
push 5
mov dword [edi + 0x18], 0
mov dword [edi + 0x1c], 0
mov dword [edi + 0x20], 0
call fcn.10003ce0
mov eax, dword [edi + 0x18]
mov dword [eax], 0
mov byte [eax + 4], 0
add eax, 5
mov dword [edi + 0x1c], eax
push dword [edi + 4]
push dword [ebp + 0xc]
push dword [edi + 0xc]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
push dword [edi + 4]
push dword [edi]
push dword [edi + 0x18]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [edi + 8], 0
jne 0x10003a4a
mov eax, dword [edi + 4]
lea edx, [ebp - 0x14]
mov ecx, dword [edi]
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
push edx
push 0x40
push eax
push ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call esi
push dword [edi + 4]
mov dword [ebp - 0x18], eax
push dword [edi + 0xc]
push dword [edi]
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
cmp dword [ebp - 0x18], 0
je 0x10003a43
lea eax, [ebp + 8]
push eax
push dword [ebp - 0x14]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
call esi
mov dword [edi + 8], 1
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
Function at 0x10008140
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x1000816c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x10008194
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x1000819a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x10008202
jg 0x100081b1
test esi, esi
je 0x10008202
test ecx, ecx
jl 0x100081fd
jg 0x100081bb
test eax, eax
je 0x100081fd
cmp edi, ecx
jg 0x100081cf
jl 0x100081c5
cmp esi, eax
jae 0x100081cf
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x10008205
mov ecx, dword [ebp + 8]
jmp 0x1000820f
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x10008229
jg 0x1000820f
test esi, esi
je 0x10008229
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x10008229
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10008240
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 8
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
test eax, eax
jg 0x10008264
jl 0x10008259
test ecx, ecx
jne 0x10008264
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x1000827e
push eax
push ecx
push dword [ebp + 8]
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push esi
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x100082ca
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 4], edx
mov eax, dword [eax]
test eax, eax
je 0x100082d0
mov edi, dword [ebp + 8]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp + 8], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
jmp 0x100082d0
lea eax, [ebx + 0x2c]
mov dword [ebp - 4], eax
cmp dword [ebx + 0x4c], 0
mov esi, dword [ebp + 8]
je 0x10008346
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x100082fc
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 [ebp - 4]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x10008334
nop dword [eax]
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x10008346
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x10008310
test edi, edi
je 0x10008346
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x100086d0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x1008c0c0]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x10008700
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x1000873c
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x1000873c
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x10008813
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10008764
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10008770
movsx eax, bl
jmp 0x100087a8
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x100087d2
sub eax, 1
je 0x100087d2
sub eax, 2
jne 0x10008813
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmove ebx, ecx
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x100087f0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x10008813
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1006bfcb
mov esp, ebp
pop ebp
ret 4