joyce8/EMBER2024-capa huggingface dataset:
Function at 0x41666f
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0x10]
mov edx, dword [edx]
sub esp, 0xc
xor eax, eax
and edx, 7
cmp ecx, 5
jb 0x4167c1
add dword [ebp + 0xc], 5
or dword [ebp - 4], 0xffffffff
push ebx
push esi
mov esi, dword [ebp + 8]
lea ecx, [esi + ecx - 4]
push edi
mov dword [ebp - 8], ecx
lea edi, [eax + esi]
jmp 0x4166ab
mov al, byte [edi]
and al, 0xfe
cmp al, 0xe8
je 0x4166b0
inc edi
cmp edi, dword [ebp - 8]
jb 0x4166a2
mov eax, edi
sub eax, esi
cmp edi, dword [ebp - 8]
jae 0x4167a1
mov ecx, eax
sub ecx, dword [ebp - 4]
cmp ecx, 3
jbe 0x416734
xor edx, edx
mov cl, byte [edi + 4]
mov dword [ebp - 4], eax
test cl, cl
je 0x4166dc
cmp cl, 0xff
jne 0x416763
movzx esi, cl
movzx ecx, byte [edi + 3]
shl esi, 8
or esi, ecx
movzx ecx, byte [edi + 2]
shl esi, 8
or esi, ecx
movzx ecx, byte [edi + 1]
shl esi, 8
or esi, ecx
sub esi, eax
sub esi, dword [ebp + 0xc]
mov ebx, esi
mov dword [ebp - 0xc], ebx
test edx, edx
je 0x416774
movzx esi, byte [edx + 0x404e90]
push 0x18
shl esi, 3
pop ecx
sub ecx, esi
shr ebx, cl
mov cl, bl
test cl, cl
je 0x416724
cmp cl, 0xff
jne 0x416771
push 0x20
pop ecx
sub ecx, esi
xor esi, esi
inc esi
shl esi, cl
dec esi
xor esi, dword [ebp - 0xc]
jmp 0x4166fa
dec ecx
shl edx, cl
and edx, 7
je 0x4166c9
movzx ecx, byte [edx + 0x404e90]
mov ebx, edi
sub ebx, ecx
cmp byte [edx + 0x404e88], 0
mov cl, byte [ebx + 4]
je 0x416760
test cl, cl
je 0x416760
cmp cl, 0xff
jne 0x4166c9
mov dword [ebp - 4], eax
and edx, 3
add edx, edx
or edx, 1
inc eax
jmp 0x41669d
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp + 8]
mov ecx, ebx
shr ecx, 0x18
and cl, 1
dec cl
not cl
mov byte [edi + 4], cl
mov ecx, ebx
shr ecx, 0x10
mov byte [edi + 3], cl
mov ecx, ebx
shr ecx, 8
mov byte [edi + 2], cl
mov byte [edi + 1], bl
add eax, 5
jmp 0x41669d
mov esi, eax
sub esi, dword [ebp - 4]
push 3
lea ecx, [esi - 1]
shl edx, cl
pop edi
and edx, 7
cmp edi, esi
sbb ecx, ecx
not ecx
pop edi
and ecx, edx
mov edx, dword [ebp + 0x10]
pop esi
mov dword [edx], ecx
pop ebx
leave
ret 0xc

Function at 0x418173
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
lea eax, [esi + 4]
xor ebx, ebx
cmp dword [eax], ebx
jne 0x41818d
push ebx
push ebx
push eax
call fcn.00417fde
cmp eax, ebx
jne 0x4181e6
push edi
lea edi, [esi + 8]
cmp dword [edi], ebx
jne 0x4181a1
push ebx
push ebx
push edi
call fcn.00417fde
cmp eax, ebx
jne 0x4181e5
lea eax, [esi + 4]
call fcn.00418104
mov eax, edi
call fcn.00418104
mov byte [esi + 0x10], bl
cmp dword [esi + 0xc], ebx
je 0x4181bc
xor eax, eax
jmp 0x4181e5
lea eax, [ebp - 4]
push eax
push ebx
push esi
push 0x41812e
push ebx
push ebx
call fcn.004238ef
add esp, 0x18
mov dword [esi + 0xc], eax
cmp eax, ebx
jne 0x4181b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, ebx
jne 0x4181e5
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret
Function at 0x41d58a
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x3d], bl
mov byte [ebp - 0x3c], 0x45
mov byte [ebp - 0x3b], 0x7a
mov byte [ebp - 0x3a], 0x61
mov byte [ebp - 0x39], 0x67
mov byte [ebp - 0x38], 0x66
mov byte [ebp - 0x37], 0x72
mov byte [ebp - 0x36], 0x7f
mov byte [ebp - 0x35], 0x52
mov byte [ebp - 0x34], 0x7f
mov byte [ebp - 0x33], 0x7f
mov byte [ebp - 0x32], 0x7c
mov byte [ebp - 0x31], 0x70
mov byte [ebp - 0x30], 0x13
call fcn.0041d288
sub al, 0xcb
xchg edi, eax
inc edx
lea eax, [ebp - 0x40]
push eax
call fcn.0041d298
push eax
push esi
push dword [ebp + 8]
call fcn.0041d24d
add esp, 0x10
mov dword [ebp - 0x88], eax
call fcn.0041d288
invalid

Function at 0x41d6e9
Capabilities:
Contain obfuscated stackstrings

Disassembly:
mov byte [ebp - 0x2b], bl
mov byte [ebp - 0x2a], 0xd4
mov byte [ebp - 0x29], bl
mov byte [ebp - 0x28], 0x67
mov byte [ebp - 0x27], 0x44
mov byte [ebp - 0x26], 0x4a
mov byte [ebp - 0x25], 0x4f
mov byte [ebp - 0x24], 0x67
mov byte [ebp - 0x23], 0x42
mov byte [ebp - 0x22], 0x49
mov byte [ebp - 0x21], 0x59
mov byte [ebp - 0x20], 0x4a
mov byte [ebp - 0x1f], 0x59
mov byte [ebp - 0x1e], 0x52
mov byte [ebp - 0x1d], 0x6a
mov byte [ebp - 0x1c], 0x2b
call fcn.0041d298
push eax
push esi
push dword [ebp + 8]
call fcn.0041d24d
add esp, 0x30
mov dword [ebp - 0xb8], eax
invalid
cmp bl, 0xff
Function at 0x41df80
Capabilities:
Contain obfuscated stackstrings

Disassembly:
jne 0x41e10e
and byte [ebp - 0x6b8], 0
and byte [ebp - 0x6b7], 0
mov byte [ebp - 0x6b6], 0x9b
and byte [ebp - 0x6b5], 0
mov byte [ebp - 0x6b4], 0x33
mov byte [ebp - 0x6b3], 0x16
mov byte [ebp - 0x6b2], 0xd
mov byte [ebp - 0x6b1], 0x10
mov byte [ebp - 0x6b0], 1
mov byte [ebp - 0x6af], 0x34
mov byte [ebp - 0x6ae], 0x16
mov byte [ebp - 0x6ad], 0xb
mov byte [ebp - 0x6ac], 7
mov byte [ebp - 0x6ab], 1
mov byte [ebp - 0x6aa], 0x17
mov byte [ebp - 0x6a9], 0x17
mov byte [ebp - 0x6a8], 0x29
mov byte [ebp - 0x6a7], 1
mov byte [ebp - 0x6a6], 9
mov byte [ebp - 0x6a5], 0xb
mov byte [ebp - 0x6a4], 0x16
mov byte [ebp - 0x6a3], 0x1d
mov byte [ebp - 0x6a2], 0x64
lea eax, [ebp - 0x6b8]
push eax
call fcn.0041d298
pop ecx
push eax
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0041d24d
add esp, 0xc
mov dword [ebp - 0x690], eax
mov byte [ebp - 0x6a0], 0x8b
or byte [ebp - 0x69f], 0xff
mov byte [ebp - 0x69e], 0x55
mov byte [ebp - 0x69d], 0x8b
mov byte [ebp - 0x69c], 0xec
lea eax, [ebp - 0x694]
push eax
push 5
lea eax, [ebp - 0x6a0]
push eax
push dword [ebp - 0x33c]
push 0xffffffffffffffff
invalid
xchg ebp, eax
jo 0x41e081
invalid

Function at 0x423d10
Capabilities:
Hash data using sha256

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
xor ecx, ecx
mov dword [eax], 0x6a09e667
mov dword [eax + 4], 0xbb67ae85
mov dword [eax + 8], 0x3c6ef372
mov dword [eax + 0xc], 0xa54ff53a
mov dword [eax + 0x10], 0x510e527f
mov dword [eax + 0x14], 0x9b05688c
mov dword [eax + 0x18], 0x1f83d9ab
mov dword [eax + 0x1c], 0x5be0cd19
mov dword [eax + 0x20], ecx
mov dword [eax + 0x24], ecx
pop ebp
ret 4
Function at 0x100011d0
Capabilities:
Allocate thread local storage
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, 1
lock xadd dword [0x10047b00], eax
inc eax
cmp eax, 1
jne 0x10001298
push esi
mov esi, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 0x10047e64
call esi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push 0x10047e64
mov dword [0x10047e58], eax
call esi
push 8
call fcn.1001937a
mov esi, eax
add esp, 4
xor eax, eax
mov word [esi], ax
mov ecx, dword [0x10047e54]
mov edx, dword [ecx]
call dword [edx + 0xc]
push esi
mov dword [esi + 4], eax
push dword [0x10047e58]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 8], eax
mov ecx, 0x10047e5c
lea eax, [ebp - 8]
mov dword [ebp - 4], esi
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.10007000
mov esi, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x10047e64
call esi
push 0x10047e64
call esi
push str.Kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
pop esi
test eax, eax
je 0x10001298
push 0x1003e9d8
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [0x10045a60]
test eax, eax
cmovne ecx, eax
mov dword [0x10045a60], ecx
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x10001650
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push esi
push edi
mov ecx, 0x10047e50
call fcn.10006de0
mov ecx, dword [ebp + 8]
movzx esi, ax
mov edi, esi
test cx, cx
js 0x10001673
add esi, ecx
jmp 0x10001681
movsx eax, cx
neg eax
cmp edi, eax
jl 0x1000167e
add esi, ecx
movzx edi, si
mov ecx, dword [ebp + 0x10]
call fcn.100024c0
push dword [ebp + 0x1c]
mov ecx, 0x10047d18
push dword [ebp + 0x18]
push dword [ebp + 0x14]
push eax
push dword [ebp + 0xc]
push edi
call fcn.1000de80
push dword [0x10047e58]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x100016b6
mov word [eax], si
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x100016c0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push esi
push edi
mov ecx, 0x10047e50
call fcn.10006de0
mov ecx, dword [ebp + 8]
movzx esi, ax
mov eax, dword [ebp + 0xc]
mov edx, esi
mov dword [esp + 0xc], eax
test cx, cx
js 0x100016ed
add esi, ecx
jmp 0x100016fb
movsx eax, cx
neg eax
cmp edx, eax
jl 0x100016f8
add esi, ecx
movzx edx, si
push 0
push dword [ebp + 0x18]
lea eax, [esp + 0x14]
mov ecx, 0x10047d18
push dword [ebp + 0x14]
push dword [ebp + 0x10]
push eax
push edx
call fcn.1000de80
push dword [0x10047e58]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x1000172b
mov word [eax], si
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x100039d0
Capabilities:
Get common file path
Get startup folder

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10032837
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x10045014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x220], esi
mov dword [ebp - 0x224], esi
xor eax, eax
mov dword [ebp - 0x21c], 0
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x23
push 0
mov dword [ebp - 0x21c], 1
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
jne 0x10003ac8
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10003a60
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, esi
call fcn.10002cf0
mov ecx, dword [esi + 0x10]
test ecx, ecx
je 0x10003ab8
lea eax, [ecx - 1]
cmp ecx, eax
jbe 0x10003af2
mov edx, dword [esi + 0x14]
mov ecx, esi
cmp edx, 8
jb 0x10003a98
mov ecx, dword [esi]
cmp word [ecx + eax*2], 0x5c
je 0x10003ab8
mov ecx, esi
cmp edx, 8
jb 0x10003aa8
mov ecx, dword [esi]
cmp word [ecx + eax*2], 0x2f
je 0x10003ab8
push 0x5c
mov ecx, esi
call fcn.10006980
push 9
push str.BDLogging
mov ecx, esi
call fcn.10002e00
jmp 0x10003ad6
push 7
push str.c:_temp
mov ecx, esi
call fcn.10002cf0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.10019013
mov esp, ebp
pop ebp
ret
call fcn.10006b40
int3
Function at 0x10006de0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100328fd
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x10045014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x10006e89
lea esi, [ebx + 0x14]
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push 8
mov dword [ebp - 4], 0
call fcn.1001937a
mov edi, eax
add esp, 4
xor eax, eax
mov word [edi], ax
mov ecx, dword [ebx + 4]
mov eax, dword [ecx]
call dword [eax + 0xc]
push edi
mov dword [edi + 4], eax
push dword [ebx + 8]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov dword [ebp - 0x18], eax
lea ecx, [ebx + 0xc]
lea eax, [ebp - 0x18]
mov dword [ebp - 0x14], edi
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.10007000
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ax, word [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
mov ax, word [eax]
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 0x1000edd0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003326d
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x10045014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [ebp + 8], 0
mov dword [ebp - 4], 0
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
je 0x1000eeb4
cmp dword [edi + 0x48], 0
je 0x1000eeb4
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x34], 0
je 0x1000ee60
push dword [edi + 0x3c]
call dword [sym.imp.KERNEL32.dll_SetEvent]
push 0xffffffffffffffff
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
je 0x1000ee50
push esi
call ebx
jmp 0x1000eeb4
push dword [edi + 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x34], 0
push esi
call ebx
mov edx, dword [ebp + 8]
mov ecx, edx
lea eax, [ecx + 2]
mov dword [ebp + 8], eax
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1000ee70
sub ecx, dword [ebp + 8]
sar ecx, 1
push ecx
push edx
lea ecx, [edi + 4]
call fcn.10002cf0
push dword [edi + 0x3c]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
lea eax, [edi + 0x38]
push eax
push 0
push edi
push 0x1000f100
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 0x34], eax
mov byte [ebp + 0xb], 1
test eax, eax
jne 0x1000eeb8
mov byte [ebp + 0xb], 0
push esi
call ebx
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x1000fd90
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1003339a
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x10045014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, edx
mov esi, ecx
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0x10]
push ecx
push dword [ebp + 0xc]
mov ecx, eax
call fcn.10012560
mov edx, eax
add esp, 8
test edx, edx
js 0x1000fefe
cmp dword [esi], 1
jne 0x1000fef4
push 0x44
call fcn.1001937a
mov ebx, eax
add esp, 4
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0
lea esi, [ebx + 0x18]
mov dword [ebx], vtable.stream::CAsyncStream.0
lea edi, [ebx + 0x10]
mov dword [ebx + 4], vtable.CRefCounted.0
mov dword [ebx + 8], 1
mov dword [ebx + 0xc], 0
mov dword [edi], 0
push 8
mov dword [ebp - 0x18], esi
mov dword [esi], 0
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
call fcn.1001937a
add esp, 4
mov dword [eax + 4], 0
mov dword [esi], eax
mov dword [eax], esi
lea eax, [ebx + 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x10]
mov dword [ebx + 0x14], ecx
mov eax, dword [ecx]
call dword [eax]
push edi
push 0
push ebx
push 0x10011c90
push 0
push 0
mov dword [ebp - 4], 0xffffffff
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0xc], eax
test eax, eax
jne 0x1000fed1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
test esi, esi
jle 0x1000feaa
movzx esi, si
or esi, 0x80070000
test esi, esi
jns 0x1000fed1
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax + 0x10]
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp + 0x10]
xor esi, esi
mov ecx, dword [ebp - 0x10]
mov dword [eax], ebx
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x10]
mov dword [ecx], eax
mov eax, edx
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 0x10012110
Capabilities:
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push esi
push 0
push 0x80
push 4
push 0
push 1
push 0x40000000
push ecx
mov esi, edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x10012151
lea ecx, [ebp - 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov ecx, dword [esi]
test eax, eax
jne 0x10012168
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1001218b
movzx eax, ax
or eax, 0x80070000
pop esi
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x10]
or eax, dword [ebp - 0xc]
jne 0x10012190
push eax
lea eax, [ebp - 8]
mov dword [ebp - 4], 0xfeff
push eax
push 2
lea eax, [ebp - 4]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 2
push 0
push 0
push 0
push ecx
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x10012189
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1001218b
movzx eax, ax
or eax, 0x80070000
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x100121d0
Capabilities:
Delete file
Get file size
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10033684
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x10045014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x18], esi
mov ebx, ecx
lea edx, [ebp - 0x14]
call fcn.10012110
test eax, eax
js 0x100123bb
mov edi, dword [ebp - 0x14]
lea eax, [ebp - 0x24]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x10012250
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x100123bb
movzx eax, ax
or eax, 0x80070000
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test esi, esi
je 0x100122ff
cmp dword [ebp - 0x20], 0
jl 0x100122ff
jg 0x1001226d
cmp dword [ebp - 0x24], esi
jb 0x100122ff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, ebx
lea ecx, [esi + 2]
nop dword [eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10012280
sub esi, ecx
mov edx, 2
sar esi, 1
xor ecx, ecx
add esi, 6
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1001933b
add esp, 4
mov edi, eax
push ebx
push esi
push edi
call fcn.10020f06
add esp, 0xc
push str..old
push esi
push edi
call fcn.10020f6a
mov esi, dword [sym.imp.KERNEL32.dll_DeleteFileW]
add esp, 0xc
push edi
call esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x100122e1
push ebx
call esi
push edi
call fcn.10019344
add esp, 4
lea edx, [ebp - 0x14]
mov ecx, ebx
call fcn.10012110
test eax, eax
js 0x100123bb
mov edi, dword [ebp - 0x14]
push 0x1c
call fcn.1001937a
mov esi, eax
add esp, 4
mov dword [ebp - 0x14], esi
mov dword [ebp - 4], 0
mov ecx, ebx
mov eax, dword [ebp - 0x18]
mov dword [esi], vtable.stream::detail::CFileStream.0
mov dword [esi + 4], vtable.CRefCounted.0
mov dword [esi + 8], 1
lea edx, [ecx + 2]
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], eax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012345
sub ecx, edx
mov edx, 2
sar ecx, 1
lea eax, [ecx + 1]
xor ecx, ecx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1001933b
mov ecx, ebx
mov edx, eax
add esp, 4
mov dword [esi + 0x10], edx
lea edi, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10012380
sub ecx, edi
sar ecx, 1
push ebx
lea eax, [ecx + 1]
push eax
push edx
call fcn.10020f06
add esp, 0xc
lea eax, [ebp - 0x1c]
push eax
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x100123b4
mov eax, dword [ebp - 0x1c]
mov dword [esi + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [eax], esi
xor eax, eax
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 0x100123d0
Capabilities:
Delete file
Get file size
Move file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
mov edi, ecx
mov ecx, dword [ebp + 8]
mov edx, ecx
lea esi, [edx + 2]
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x100123e6
sub edx, esi
sar edx, 1
push 0
lea eax, [edx + edx]
lea edx, [esp + 0x10]
push edx
push eax
push ecx
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp + 0xc]
add dword [edi + 0x14], ecx
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x14], eax
test ecx, ecx
je 0x100124e4
cmp dword [edi + 0x14], ecx
jb 0x100124e4
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [edi + 0x10]
lea ecx, [esi + 2]
nop dword [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x10012440
sub esi, ecx
mov edx, 2
sar esi, 1
xor ecx, ecx
add esi, 6
mov eax, esi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.1001933b
add esp, 4
mov dword [esp + 0x10], eax
push dword [edi + 0x10]
push esi
push eax
call fcn.10020f06
add esp, 0xc
push str..old
push esi
mov esi, dword [esp + 0x18]
push esi
call fcn.10020f6a
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x100124af
push dword [edi + 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push esi
call fcn.10019344
mov ecx, dword [edi + 0x10]
lea edx, [edi + 0xc]
add esp, 4
call fcn.10012110
test eax, eax
js 0x10012505
lea eax, [esp + 0x18]
push eax
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
neg eax
sbb eax, eax
and eax, dword [esp + 0x18]
mov dword [edi + 0x14], eax
mov eax, dword [esp + 0x14]
test eax, eax
je 0x100124f3
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x10012505
movzx eax, ax
or eax, 0x80070000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4