joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1018876
Capabilities:
Encode data using xor

Disassembly:
mov eax, 0x1057117
call fcn.0101d9b8
sub esp, 0x18
push ebx
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, dword [ebp + 0xc]
or dword [ebp - 0x10], 0xffffffff
xor eax, eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
push 0x14
pop ecx
stosd dword es:[edi], eax
push ecx
mov dword [ebp - 0x1c], ecx
stosd dword es:[edi], eax
call fcn.0101dd0b
cmp eax, ebx
pop ecx
mov dword [ebp - 0x20], eax
jne 0x10188c3
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
cmp ecx, ebx
je 0x10188bf
call fcn.010165a3
mov dword [ebp + 8], ebx
xor eax, eax
jmp 0x1018900
mov eax, dword [ebp + 8]
mov eax, dword [eax + 8]
cmp eax, ebx
push esi
jne 0x1018913
xor esi, esi
inc esi
cmp dword [ebp - 0x20], ebx
je 0x10188df
push dword [ebp - 0x20]
call fcn.0101d9dc
pop ecx
cmp dword [ebp - 0x10], 0xffffffff
je 0x10188ee
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
call fcn.010165a3
mov eax, esi
mov dword [ebp + 8], ebx
pop esi
mov ecx, dword [ebp - 0xc]
pop edi
pop ebx
mov dword fs:[0], ecx
leave
ret 8
mov eax, dword [ebp - 0x24]
mov ecx, dword [eax]
add eax, 8
mov dword [ebp - 0x24], ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.01018545
mov byte [ebp - 4], 1
mov edi, dword [ebp - 0x18]
mov eax, dword [edi + 0xc]
cmp dword [eax - 0xc], ebx
push ebx
push ebx
push 3
push ebx
push 1
push SysReAllocString
jne 0x1018942
mov eax, dword [edi + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
jne 0x101898e
xor esi, esi
mov byte [ebp - 4], bl
mov ecx, edi
call fcn.010165a3
mov dword [ebp - 0x18], ebx
jmp 0x10188d1
cmp eax, 0x7a
jne 0x1018951
push ebx
push ebx
lea eax, [ebp - 0x1c]
push eax
push dword [ebp - 0x10]
call sub.WINTRUST.dll_CryptCATAdminCalcHashFromFileHandle
cmp eax, ebx
je 0x101898e
push dword [ebp - 0x1c]
push esi
call fcn.0101e2e2
cmp eax, ebx
pop ecx
pop ecx
je 0x1018951
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x20]
push ebx
mov dword [ebp - 0x14], eax
push esi
lea eax, [ebp - 0x14]
push eax
push dword [ebp - 0x10]
call sub.WINTRUST.dll_CryptCATAdminCalcHashFromFileHandle
cmp eax, ebx
je 0x1018965
lea eax, [edi + 0x10]
push eax
push dword [ebp - 0x1c]
push esi
call fcn.01026b60
test eax, eax
je 0x1018951
push 0x14
pop eax
cmp dword [ebp - 0x14], eax
jbe 0x10189c5
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], ebx
jbe 0x10189db
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0x14]
sub esi, eax
mov dl, byte [esi + eax]
xor byte [eax], dl
inc eax
dec ecx
jne 0x10189d2
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or dword [ebp - 0x10], 0xffffffff
mov byte [ebp - 4], bl
mov ecx, edi
call fcn.010165a3
cmp dword [ebp - 0x24], ebx
mov dword [ebp - 0x18], ebx
jne 0x1018910
jmp 0x10188ce
Function at 0x1019536
Capabilities:
Set file attributes

Disassembly:
mov eax, 0x105730c
call fcn.0101d9b8
push ecx
push ecx
push esi
push edi
mov esi, ecx
and dword [ebp - 4], 0
mov ecx, dword [ebp + 0xc]
call fcn.01010900
mov eax, dword [esi]
mov edi, 0x1004fb4
push edi
push eax
call fcn.0101e7f0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
jne 0x10195a4
mov eax, dword [esi]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov esi, dword [esi]
push edi
push esi
call fcn.0101e7f0
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
jne 0x10195a4
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x101959d
call fcn.010165a3
and dword [ebp + 8], 0
xor eax, eax
jmp 0x101963e
mov eax, dword [ebp + 8]
mov edi, dword [eax + 8]
test edi, edi
je 0x1019622
push ebx
mov eax, edi
mov edi, dword [edi]
add eax, 8
push eax
lea ecx, [ebp - 0x14]
call fcn.01018545
mov byte [ebp - 4], 1
mov ebx, dword [ebp - 0x14]
push dword [ebx + 0x10]
lea esi, [ebx + 0xc]
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
push 0x1005090
push dword [ebp - 0x10]
jne 0x10195e6
call fcn.0101e784
add esp, 0xc
jmp 0x101960e
call fcn.0101e784
push dword [esi]
push 0x1004fa4
push dword [ebp - 0x10]
call fcn.0101e784
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx]
add esp, 0x18
cmp dword [eax - 0xc], 0
jne 0x101960e
push esi
call fcn.010115e7
mov byte [ebp - 4], 0
mov ecx, ebx
call fcn.010165a3
and dword [ebp - 0x14], 0
test edi, edi
jne 0x10195af
pop ebx
push dword [ebp - 0x10]
call fcn.0101e724
pop ecx
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp + 8]
call fcn.010165a3
and dword [ebp + 8], 0
xor eax, eax
inc eax
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
leave
ret 8
Function at 0x101c4cd
Capabilities:
Get file size
Write file on windows

Disassembly:
push 0x20
push 0x1005da8
call fcn.0101d330
mov esi, ecx
mov dword [ebp - 0x28], esi
xor edi, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x1c], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x1c], edi
push 0xffffffffffffffff
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x2c], eax
cmp eax, edi
je 0x101c508
cmp eax, 0x80
jne 0x101c54a
xor eax, eax
inc eax
mov dword [ebp - 0x1c], eax
cmp dword [section.Shared], edi
jle 0x101c51b
mov dword [ebp - 0x20], eax
jmp 0x101c54a
push edi
lea eax, [ebp - 0x24]
push eax
push 2
push 0x1005da4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x20], eax
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x30], eax
push eax
push section.Shared
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
or dword [ebp - 4], 0xffffffff
call fcn.0101c561
mov eax, dword [ebp - 0x20]
call fcn.0101d36b
ret

Function at 0x101c5f4
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push 2
pop eax
mov esi, ecx
mov ebx, 0x10000
push ebx
mov dword [ebp - 0xc], esi
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], eax
call fcn.0101dd0b
test eax, eax
pop ecx
mov dword [ebp - 4], eax
jne 0x101c627
push 0xe
pop eax
jmp 0x101c72b
mov ecx, dword [esi + 4]
mov eax, ecx
cdq
sub eax, edx
mov edx, eax
mov eax, dword [ebp + 8]
sar edx, 1
push edi
mov edi, 0x200
sub eax, edx
cmp eax, edi
jge 0x101c644
mov edi, eax
mov eax, ecx
cdq
push 4
pop ecx
idiv ecx
shl eax, 1
mov esi, eax
sub esi, edi
lea esi, [esi + edi - 2]
lea eax, [edi + esi]
cmp eax, dword [ebp + 8]
jle 0x101c673
cmp esi, dword [ebp + 8]
jge 0x101c71f
mov edi, dword [ebp + 8]
sub edi, esi
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 0xc]
push 0
push 0
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
lea eax, [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push edi
push dword [ebp - 4]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x101c724
push 0x100294c
push dword [ebp - 4]
call fcn.0101e57a
dec dword [ebp - 0x10]
pop ecx
pop ecx
jne 0x101c652
test eax, eax
jne 0x101c6bb
mov eax, dword [ebp - 4]
sub eax, dword [ebp - 4]
mov dword [ebp - 0x10], 0
sar eax, 1
lea edi, [esi + eax*2 + 4]
mov eax, dword [ebp + 8]
mov esi, eax
sub esi, edi
shr esi, 0x10
je 0x101c6fb
mov ecx, dword [ebp - 0xc]
push ebx
push dword [ebp - 4]
push dword [ebp - 8]
push edi
call fcn.0101c464
test eax, eax
jne 0x101c72a
add dword [ebp - 8], ebx
add edi, ebx
inc dword [ebp - 0x10]
cmp dword [ebp - 0x10], esi
jb 0x101c6d7
mov eax, dword [ebp + 8]
mov esi, dword [ebp - 0xc]
sub eax, edi
push eax
push dword [ebp - 4]
mov ecx, esi
push dword [ebp - 8]
push edi
call fcn.0101c464
test eax, eax
jne 0x101c72a
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor eax, eax
jmp 0x101c72a
push 0xb
pop eax
jmp 0x101c72a
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x101c853
Capabilities:
Get file size

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
push edi
mov edi, ecx
cmp dword [edi], 0xffffffff
je 0x101c86b
xor eax, eax
inc eax
jmp 0x101c93f
push ebx
push 0x1005d30
push 1
push 1
xor ebx, ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateEventW]
cmp eax, ebx
mov dword [edi + 0xc], eax
jne 0x101c88c
xor eax, eax
jmp 0x101c93e
lea ecx, [ebp - 0x18]
call fcn.0101c736
test eax, eax
je 0x101c8a6
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0xc], ebx
jmp 0x101c885
push esi
push 0x1005d60
push ebx
lea eax, [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
cmp eax, ebx
mov dword [edi + 0x10], eax
jne 0x101c8d6
push dword [edi + 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea esi, [ebp - 0x18]
mov dword [edi + 0xc], ebx
call fcn.0101c575
xor eax, eax
jmp 0x101c93d
lea esi, [ebp - 0x18]
call fcn.0101c575
push ebx
push 0x80
push 4
push ebx
push 3
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
mov dword [edi], eax
jne 0x101c916
push dword [edi + 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [edi + 0x10]
mov dword [edi + 0xc], ebx
call esi
mov dword [edi + 0x10], ebx
jmp 0x101c8d2
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push ebx
mov esi, eax
push esi
push section.Shared
call dword [sym.imp.KERNEL32.dll_InterlockedCompareExchange]
cmp esi, ebx
jne 0x101c93a
mov ecx, edi
call fcn.0101c4cd
jmp 0x101c93d
xor eax, eax
inc eax
pop esi
pop ebx
pop edi
leave
ret 4
Function at 0x101c949
Capabilities:
Get file size
Write file on windows

Disassembly:
push 0x28
push 0x1005db8
call fcn.0101d330
mov esi, ecx
mov dword [ebp - 0x2c], esi
xor ebx, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
mov dword [ebp - 0x1c], ebx
cmp dword [esi], 0xffffffff
je 0x101caa9
mov ecx, dword [ebp + 0xc]
add ecx, ecx
mov dword [ebp - 0x20], ecx
cmp ecx, ebx
jl 0x101caa9
mov eax, dword [esi + 4]
cdq
push 3
pop edi
idiv edi
cmp ecx, eax
jg 0x101caa9
mov edi, 0x1068004
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
cmp eax, 1
jne 0x101c9a9
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push dword [ebp - 0x20]
push section.Shared
call dword [sym.imp.KERNEL32.dll_InterlockedExchangeAdd]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x20]
add eax, ecx
cmp eax, dword [esi + 8]
jl 0x101ca5f
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x101c9dc
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov dword [ebp - 4], ebx
mov dword [ebp - 0x1c], ebx
push 0xffffffffffffffff
push dword [esi + 0x10]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 0x34], eax
cmp eax, ebx
je 0x101c9fb
cmp eax, 0x80
jne 0x101ca39
mov dword [ebp - 0x1c], 1
mov eax, dword [section.Shared]
cmp eax, dword [esi + 8]
jl 0x101ca39
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x28]
mov ecx, esi
call fcn.0101c5f4
push ebx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x38], eax
push eax
push section.Shared
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
or dword [ebp - 4], 0xffffffff
call fcn.0101ca4e
jmp 0x101ca66
mov dword [ebp - 0x24], 1
cmp dword [ebp - 0x24], ebx
je 0x101c994
push ebx
push ebx
push dword [ebp - 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
lea eax, [ebp - 0x30]
push eax
push dword [ebp - 0x20]
push dword [ebp + 8]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ebx, eax
push edi
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jne 0x101caa5
push dword [esi + 0xc]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, ebx
jmp 0x101caab
xor eax, eax
call fcn.0101d36b
ret 8
Function at 0x101cab8
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x28
call fcn.01026840
cmp eax, 2
jne 0x101cace
xor eax, eax
leave
ret
push esi
push edi
push 0x1005dd4
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
xor esi, esi
cmp edi, esi
jne 0x101caea
xor eax, eax
jmp 0x101cc1d
push 0x1005dc4
push edi
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
cmp eax, esi
je 0x101cc14
push 0xffffffffffffffff
call eax
test eax, eax
je 0x101cc14
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
cmp eax, 0xffffffff
mov dword [0x1065020], eax
jne 0x101cb27
call dword [sym.imp.KERNEL32.dll_FreeConsole]
jmp 0x101cc14
push 0x106501c
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
test eax, eax
je 0x101cb1c
mov eax, dword [0x106501c]
or eax, 3
push eax
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
test eax, eax
je 0x101cb1c
lea eax, [ebp - 0x28]
push eax
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x101cb1c
mov ax, word [ebp - 0x24]
mov word [0x1065018], ax
movsx eax, ax
shl eax, 2
push eax
mov word [0x106501a], 1
call fcn.0101dd0b
cmp eax, esi
pop ecx
mov dword [0x1065024], eax
je 0x101cbd4
mov dx, word [0x1065018]
mov cx, word [ebp - 0x22]
mov word [ebp - 0xc], dx
mov dx, word [0x106501a]
add dx, cx
mov word [ebp - 0xe], cx
lea ecx, [ebp - 0x10]
push ecx
mov word [ebp - 4], si
mov word [ebp - 2], si
push dword [ebp - 4]
mov word [ebp - 0x10], si
push dword [0x1065018]
mov word [ebp - 0xa], dx
push eax
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_ReadConsoleOutputW]
mov ax, word [ebp - 0x22]
mov word [ebp - 2], ax
lea eax, [ebp - 8]
push eax
movsx eax, word [ebp - 0x24]
mov word [ebp - 4], si
push dword [ebp - 4]
push eax
push 0x20
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_FillConsoleOutputCharacterW]
test eax, eax
je 0x101cb1c
push dword [ebp - 4]
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
xor esi, esi
inc esi
push edi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, esi
pop edi
pop esi
leave
ret
Function at 0x101cc26
Capabilities:
Manipulate console buffer

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push esi
xor esi, esi
cmp dword [0x1065024], esi
je 0x101cccb
lea eax, [ebp - 0x24]
push eax
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_GetConsoleScreenBufferInfo]
test eax, eax
je 0x101ccb9
mov cx, word [ebp - 0x1e]
mov dx, word [0x106501a]
mov eax, dword [0x1065018]
add dx, cx
mov word [ebp - 0xa], cx
lea ecx, [ebp - 0xc]
push ecx
mov word [ebp - 4], si
mov word [ebp - 2], si
push dword [ebp - 4]
mov word [ebp - 0xc], si
push eax
push dword [0x1065024]
mov word [ebp - 8], ax
push dword [0x1065020]
mov word [ebp - 6], dx
call dword [sym.imp.KERNEL32.dll_WriteConsoleOutputW]
test eax, eax
je 0x101ccb9
mov eax, dword [ebp - 8]
inc eax
mov word [ebp - 4], ax
mov ax, word [ebp - 6]
mov word [ebp - 2], ax
push dword [ebp - 4]
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_SetConsoleCursorPosition]
push dword [0x1065024]
call fcn.0101d9dc
pop ecx
mov dword [0x1065024], esi
push dword [0x106501c]
push dword [0x1065020]
call dword [sym.imp.KERNEL32.dll_SetConsoleMode]
or dword [0x1065020], 0xffffffff
call dword [sym.imp.KERNEL32.dll_FreeConsole]
pop esi
leave
ret

Function at 0x101cfec
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x106406c]
jne 0x101cffd
test ecx, 0xffff0000
jne 0x101cffd
ret
jmp fcn.0101d007
Function at 0x101eab2
Capabilities:
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov ecx, dword [ebp + 8]
push esi
xor esi, esi
mov dword [ebp - 4], esi
cmp ecx, dword [esi*8 + 0x1064090]
je 0x101ead4
inc esi
cmp esi, 0x13
mov dword [ebp - 4], esi
jb 0x101eac2
cmp esi, 0x13
je 0x101ec10
mov eax, dword [0x106534c]
cmp eax, 1
push ebx
je 0x101ebdf
test eax, eax
jne 0x101eafd
cmp dword [0x1064074], 1
je 0x101ebdf
cmp ecx, 0xfc
je 0x101ec0f
push edi
push 6
pop ecx
mov esi, 0x10061e8
mov edi, 0x10653a8
rep movsd dword es:[edi], dword [esi]
push 0x104
mov ebx, 0x10653c2
push ebx
movsw word es:[edi], word [esi]
push 0
mov byte [0x10654c6], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x101eb4b
push 5
pop ecx
mov esi, 0x10061d0
mov edi, 0x10653c2
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101eb50
sub eax, edx
inc eax
cmp eax, 0x3c
jbe 0x101eb83
mov eax, ebx
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101eb64
sub eax, edx
push 3
lea eax, [eax + 0x1065387]
push 0x10061cc
push eax
call fcn.01022cc0
add esp, 0xc
mov edx, 0x10653a8
mov edi, edx
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x101eb8b
mov eax, dword [ebp - 4]
mov eax, dword [eax*8 + 0x1064094]
mov esi, 0x10061c8
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
mov esi, eax
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x101eba7
mov edi, edx
sub eax, esi
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x101ebb3
mov ecx, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
push 0x12010
mov ecx, eax
and ecx, 3
push 0x10061a0
push edx
rep movsb byte es:[edi], byte [esi]
call fcn.01022bbb
add esp, 0xc
pop edi
jmp 0x101ec0f
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
test eax, eax
je 0x101ec0f
mov edx, dword [esi*8 + 0x1064094]
mov ecx, edx
lea esi, [ecx + 1]
mov bl, byte [ecx]
inc ecx
test bl, bl
jne 0x101ebf7
push 0
sub ecx, esi
lea esi, [ebp - 8]
push esi
push ecx
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebx
pop esi
leave
ret
Function at 0x101f0f2
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x10658d4]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push edi
xor ebx, ebx
cmp eax, ebx
push 2
mov dword [ebp - 4], ebx
mov dword [ebp - 8], ebx
pop edi
jne 0x101f145
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x101f12c
mov dword [0x10658d4], 1
jmp 0x101f14a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x101f140
mov eax, edi
mov dword [0x10658d4], eax
jmp 0x101f145
mov eax, dword [0x10658d4]
cmp eax, 1
jne 0x101f1b1
cmp dword [ebp - 4], ebx
jne 0x101f15f
call esi
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x101f15f
xor eax, eax
jmp 0x101f26e
mov ecx, dword [ebp - 4]
cmp word [ecx], bx
mov eax, ecx
je 0x101f177
add eax, edi
cmp word [eax], bx
jne 0x101f169
add eax, edi
cmp word [eax], bx
jne 0x101f169
sub eax, ecx
add eax, edi
mov esi, eax
mov ecx, esi
call fcn.01020f6a
cmp eax, ebx
jne 0x101f198
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
jmp 0x101f26e
mov ecx, esi
mov esi, dword [ebp - 4]
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ebx, eax
jmp 0x101f188
cmp eax, edi
je 0x101f1b9
cmp eax, ebx
jne 0x101f158
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 4], esi
je 0x101f158
cmp byte [esi], bl
je 0x101f1fe
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x101f158
add dword [ebp - 8], eax
mov eax, esi
lea edi, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x101f1ea
sub eax, edi
lea esi, [esi + eax + 1]
cmp byte [esi], bl
jne 0x101f1cc
mov esi, dword [ebp - 4]
inc dword [ebp - 8]
mov ecx, dword [ebp - 8]
add ecx, ecx
call fcn.01020f6a
cmp eax, ebx
mov dword [ebp - 0xc], eax
jne 0x101f215
push esi
jmp 0x101f27f
mov edi, esi
mov esi, eax
mov eax, dword [ebp - 4]
cmp byte [eax], bl
je 0x101f25f
mov ecx, dword [ebp - 8]
mov eax, esi
sub eax, dword [ebp - 0xc]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x101f273
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x101f243
sub eax, edx
push esi
lea edi, [edi + eax + 1]
call fcn.0101df79
cmp byte [edi], bl
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x101f220
push dword [ebp - 4]
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret
push dword [ebp - 0xc]
call fcn.0101d9dc
pop ecx
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x101f158
Function at 0x101f28f
Capabilities:
Accept command line arguments

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [0x10658d8]
test eax, eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x101f2d3
call esi
test eax, eax
je 0x101f2b8
mov dword [0x10658d8], 1
jmp 0x101f2d8
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x101f2cf
mov dword [0x10658d8], 2
jmp 0x101f2e1
xor eax, eax
jmp 0x101f335
cmp eax, 1
jne 0x101f2dc
call esi
jmp 0x101f335
cmp eax, 2
jne 0x101f2cf
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov esi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push 0
push 0
push 0xffffffffffffffff
push eax
push 1
push 0
mov dword [ebp - 8], eax
call esi
mov edi, eax
test edi, edi
je 0x101f332
lea ecx, [edi + edi]
call fcn.01020f6a
test eax, eax
mov dword [ebp - 4], eax
je 0x101f332
push edi
push eax
push 0xffffffffffffffff
push dword [ebp - 8]
push 1
push 0
call esi
test eax, eax
je 0x101f329
mov eax, dword [ebp - 4]
jmp 0x101f334
push dword [ebp - 4]
call fcn.0101d9dc
pop ecx
xor eax, eax
pop edi
pop esi
leave
ret