joyce8/EMBER2024-capa huggingface dataset:
Function at 0x47bc10
Capabilities:
Get common file path

Disassembly:
push ecx
push ebp
mov ebp, ecx
push esi
push edi
cmp dword [ebp], 0
jne 0x47bcc5
cmp dword [ebp + 4], 0xffffffff
jne 0x47bcc5
push ebx
lea ebx, [ebp + 0x138]
push ebx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edi, 0x62b2e8
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
pop ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [esp + 0x1c]
mov edi, dword [esp + 0x14]
cmp esi, 1
jne 0x47bc8d
push edi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
je 0x47bc8d
pop edi
pop esi
mov eax, 0x2000000
pop ebp
pop ecx
ret 0xc
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0xc]
push eax
push esi
push ecx
push edi
call fcn.0047aa10
add esp, 0x10
test eax, eax
jne 0x47bcb0
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebp
pop ecx
ret 0xc
push eax
call fcn.0047af50
add esp, 4
mov dword [ebp], eax
xor eax, eax
pop edi
pop esi
pop ebp
pop ecx
ret 0xc
pop edi
pop esi
mov eax, 0x1000000
pop ebp
pop ecx
ret 0xc

Function at 0x47c120
Capabilities:
Create directory

Disassembly:
mov ecx, dword [esp + 8]
sub esp, 0x208
test ecx, ecx
je 0x47c1e8
mov al, byte [ecx]
test al, al
je 0x47c1e8
push ebx
push esi
push edi
mov ebx, ecx
mov esi, ecx
cmp al, 0x2f
je 0x47c14b
cmp al, 0x5c
jne 0x47c14d
mov ebx, esi
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x47c143
mov edi, dword [esp + 0x218]
cmp ebx, ecx
je 0x47c184
mov esi, ebx
lea eax, [esp + 0xc]
sub esi, ecx
push esi
push ecx
push eax
call fcn.00488b56
lea ecx, [esp + 0x18]
mov byte [esp + esi + 0x18], 0
push ecx
push edi
call fcn.0047c120
add esp, 0x14
inc ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea edx, [esp + 0x110]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x110]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x114]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
pop edi
pop esi
pop ebx
add esp, 0x208
ret
Function at 0x488b10
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x488b30
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0048a004
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x488b53
test byte [esp + 8], 2
je 0x488b53
call fcn.0048a077
mov dword [eax], 0xd
call fcn.0048a080
mov dword [eax], 5
jmp 0x488b2c
xor eax, eax
ret

Function at 0x499c9d
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x499cd5
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.00497d54
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.00497d2c
jmp 0x499ce1
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x49b392
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x49b3d4
call fcn.004a14c0
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x49b3d4
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x49b3cb
xor eax, eax
jmp 0x49b3dc
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0049b3e2
pop edi
pop esi
pop ebx
ret 4

Function at 0x49ce6f
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov eax, 0x4a9c04
call fcn.00488f28
push ecx
push ecx
push esi
push 0x14
call fcn.004975ee
mov esi, eax
pop ecx
mov dword [ebp - 0x14], esi
and dword [ebp - 4], 0
test esi, esi
je 0x49cec2
mov ecx, esi
call fcn.00497e0e
mov eax, dword [0x62b31c]
lea ecx, [esi + 0x10]
mov dword [ecx], eax
mov eax, dword [ebp + 8]
push dword [ebp + 0x10]
mov dword [esi + 8], eax
mov eax, dword [ebp + 0xc]
mov byte [ebp - 4], 2
mov dword [esi], vtable.CFileException.0
mov dword [esi + 0xc], eax
call fcn.00497a36
jmp 0x49cec4
xor esi, esi
or dword [ebp - 4], 0xffffffff
lea eax, [ebp - 0x10]
push 0x613c30
push eax
mov dword [ebp - 0x10], esi
call fcn.0048939c
pop esi

Function at 0x4a19f0
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 0x4a1a1e
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4a1a3c
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004a1956
jmp 0x4a1a3c
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a1a3c
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004a1956
test edi, edi
mov eax, edi
jne 0x4a1a26
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x401000
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push esi
push edi
xor esi, esi
push 0x20
lea eax, [ebp - 0x2c]
push esi
push eax
call sub.MSVCRT.dll_memset
push 0xa
lea eax, [ebp - 0xc]
push esi
push eax
call sub.MSVCRT.dll_memset
lea eax, [ebp - 0x2c]
push str._NJANYUE_PIPEMESSAGE_HEAD_
push eax
call sub.MSVCRT.dll_strcat
lea eax, [ebp - 0xc]
push 0xa
push eax
push dword [ebp + 8]
call dword [sym.imp.MSVCRT.dll__itoa]
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x2c]
push eax
call sub.MSVCRT.dll_strcat
add esp, 0x34
lea eax, [ebp - 0x2c]
push eax
push esi
push 0x1f0003
call dword [sym.imp.KERNEL32.dll_OpenEventA]
mov edi, eax
cmp edi, esi
jne 0x401080
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x401080
lea eax, [ebp - 0x2c]
push eax
push esi
push 1
push esi
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov edi, eax
mov eax, edi
pop edi
pop esi
leave
ret

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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
push ebx
push esi
push edi
xor edi, edi
mov esi, str..pipedd641d45_0660_497f_874f_5edfdc39d3c5
push edi
push edi
push 3
push edi
push edi
push 0xc0000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4010c6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x4e20
push esi
call dword [sym.imp.KERNEL32.dll_WaitNamedPipeA]
jmp 0x401099
push edi
lea eax, [ebp - 4]
push edi
push eax
push ebx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_SetNamedPipeHandleState]
lea eax, [ebp - 8]
push edi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [ebp - 0xc]
push edi
push eax
lea eax, [ebp - 0x80c]
push 0x800
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
cmp esi, edi
jne 0x401113
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x40112c
push dword [ebp + 0x14]
lea eax, [ebp - 0x80c]
push eax
push dword [ebp + 0x10]
call sub.MSVCRT.dll_memcpy
add esp, 0xc
cmp esi, edi
je 0x4010e8
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
leave
ret
Function at 0x401d80
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x403395
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xd4
push ebx
push ebp
push esi
lea eax, [esp + 0x7c]
push edi
xor ebp, ebp
push eax
push 0x64
mov dword [esp + 0x1c], ebp
call dword [sym.imp.KERNEL32.dll_GetLogicalDriveStringsA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_2
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x1c]
mov dword [esp + 0x18], ebp
rep stosd dword es:[edi], eax
mov al, byte [esp + 0x80]
mov dword [esp + 0xec], 1
test al, al
lea esi, [esp + 0x80]
je 0x401e08
mov ebx, dword [sym.imp.MSVCRT.dll__mbslen]
lea edi, [esp + 0x18]
mov dword [edi], esi
push esi
inc ebp
add edi, 4
call ebx
lea esi, [esi + eax + 1]
add esp, 4
cmp byte [esi], 0
jne 0x401df3
lea esi, [ebp - 1]
test esi, esi
jl 0x401e3b
mov ebx, dword [sym.imp.KERNEL32.dll_GetDriveTypeA]
lea edi, [esp + esi*4 + 0x18]
mov ecx, dword [edi]
push ecx
call ebx
cmp eax, 3
je 0x401e2d
dec esi
sub edi, 4
test esi, esi
jge 0x401e19
jmp 0x401e3b
mov edx, dword [esp + esi*4 + 0x18]
lea ecx, [esp + 0x10]
push edx
call fcn.00402b74
push str.AyBackup
lea ecx, [esp + 0x14]
call sub.MFC42.DLL_CString::operator
mov esi, dword [esp + 0xf4]
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call sub.MFC42.DLL_CString::CString
mov dword [esp + 0x14], 1
lea ecx, [esp + 0x10]
mov byte [esp + 0xec], 0
call fcn.00402b5c
mov ecx, dword [esp + 0xe4]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0xe0
ret

Function at 0x4020c0
Capabilities:
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x4033e8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
push edi
lea ecx, [esp + 8]
mov dword [esp + 0x18], 0
xor esi, esi
call sub.MFC42.DLL_CString::CString_2
mov eax, dword [esp + 0x20]
mov edi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov byte [esp + 0x18], 1
mov ecx, dword [eax - 8]
test ecx, ecx
jle 0x402159
test esi, esi
jl 0x402159
push esi
push 0x5c
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::Find
mov esi, eax
cmp esi, 0xffffffff
je 0x402150
lea eax, [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x28]
call sub.MFC42.DLL_CString::Left
push eax
lea ecx, [esp + 0xc]
mov byte [esp + 0x1c], 2
call fcn.00402b9e
lea ecx, [esp + 0xc]
mov byte [esp + 0x18], 1
call fcn.00402b5c
mov ecx, dword [esp + 8]
push 0
push ecx
call edi
inc esi
mov eax, dword [esp + 0x20]
cmp esi, dword [eax - 8]
jl 0x402103
push 0
push eax
call edi
lea ecx, [esp + 8]
mov byte [esp + 0x18], 0
call fcn.00402b5c
lea ecx, [esp + 0x20]
mov dword [esp + 0x18], 0xffffffff
call fcn.00402b5c
mov ecx, dword [esp + 0x10]
pop edi
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x4021a0
Capabilities:
Copy file
Create directory

Disassembly:
push 0xffffffffffffffff
push 0x403450
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x40
push ebx
push ebp
push esi
push edi
mov ebp, 1
lea ecx, [esp + 0x34]
mov dword [esp + 0x58], ebp
call sub.MFC42.DLL_CFileFind::CFileFind
lea eax, [esp + 0x60]
push str..
lea ecx, [esp + 0x18]
push eax
push ecx
mov byte [esp + 0x64], 2
call sub.MFC42.DLL_operator
lea ecx, [esp + 0x10]
mov byte [esp + 0x58], 3
call sub.MFC42.DLL_CString::CString_2
mov edx, dword [esp + 0x64]
push 0
push edx
mov byte [esp + 0x60], 4
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x14]
push 0
push eax
lea ecx, [esp + 0x3c]
call sub.MFC42.DLL_CFileFind::FindFile
test eax, eax
je 0x402360
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFileFind::FindNextFileA
lea ecx, [esp + 0x20]
mov edi, eax
push ecx
lea ecx, [esp + 0x38]
call sub.MFC42.DLL_CFileFind::GetFileName
mov esi, eax
lea edx, [esp + 0x64]
push 0x40518c
lea eax, [esp + 0x20]
push edx
push eax
mov byte [esp + 0x64], 5
call sub.MFC42.DLL_operator
push esi
lea ecx, [esp + 0x1c]
push eax
push ecx
mov byte [esp + 0x64], 6
call sub.MFC42.DLL_operator_1
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x5c], 7
call fcn.00402b9e
lea ecx, [esp + 0x18]
mov byte [esp + 0x58], 6
call fcn.00402b5c
lea ecx, [esp + 0x1c]
mov byte [esp + 0x58], 5
call fcn.00402b5c
lea ecx, [esp + 0x20]
mov byte [esp + 0x58], 4
call fcn.00402b5c
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFileFind::IsDots
test eax, eax
jne 0x402358
mov edx, dword [esp + 0x34]
push 0x10
lea ecx, [esp + 0x38]
call dword [edx + 0x40]
test eax, eax
je 0x4022f5
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x30], esp
push eax
call sub.MFC42.DLL_CString::CString
push ecx
mov byte [esp + 0x60], 8
mov ecx, esp
mov dword [esp + 0x38], esp
push ecx
lea ecx, [esp + 0x40]
call sub.MFC42.DLL_CFileFind::GetFilePath
mov byte [esp + 0x60], 4
call fcn.004021a0
add esp, 8
jmp 0x402358
lea edx, [esp + 0x24]
lea ecx, [esp + 0x34]
push edx
call sub.MFC42.DLL_CFileFind::GetFilePath
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
push ecx
push eax
mov byte [esp + 0x60], 9
call fcn.004023d0
add esp, 8
lea ecx, [esp + 0x24]
test eax, eax
sete bl
mov byte [esp + 0x58], 4
call fcn.00402b5c
test bl, bl
je 0x402358
lea edx, [esp + 0x28]
lea ecx, [esp + 0x34]
push edx
call sub.MFC42.DLL_CFileFind::GetFilePath
mov ecx, dword [esp + 0x10]
mov eax, dword [eax]
push 0
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
lea ecx, [esp + 0x28]
and ebp, eax
call fcn.00402b5c
test edi, edi
jne 0x40221f
lea ecx, [esp + 0x34]
call sub.MFC42.DLL_CFileFind::Close
lea ecx, [esp + 0x10]
mov byte [esp + 0x58], 3
call fcn.00402b5c
lea ecx, [esp + 0x14]
mov byte [esp + 0x58], 2
call fcn.00402b5c
lea ecx, [esp + 0x34]
mov byte [esp + 0x58], 1
call fcn.00402be0
lea ecx, [esp + 0x60]
mov byte [esp + 0x58], 0
call fcn.00402b5c
lea ecx, [esp + 0x64]
mov dword [esp + 0x58], 0xffffffff
call fcn.00402b5c
mov ecx, dword [esp + 0x50]
pop edi
mov eax, ebp
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x4c
ret
Function at 0x402c34
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4041e8
push 0x402f6c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
push 1
call dword [sym.imp.MSVCRT.dll___set_app_type]
pop ecx
or dword [0x4089c4], 0xffffffff
or dword [0x4089c8], 0xffffffff
call dword [sym.imp.MSVCRT.dll___p__fmode]
mov ecx, dword [0x4089ac]
mov dword [eax], ecx
call dword [sym.imp.MSVCRT.dll___p__commode]
mov ecx, dword [0x4089a8]
mov dword [eax], ecx
mov eax, dword [sym.imp.MSVCRT.dll__adjust_fdiv]
mov eax, dword [eax]
mov dword [0x4089c0], eax
call fcn.00402f6b
cmp dword [0x4052c0], 0
jne 0x402cb7
push 0x402f68
call dword [sym.imp.MSVCRT.dll___setusermatherr]
pop ecx
call fcn.00402f56
push 0x405030
push 0x40502c
call sub.MSVCRT.dll__initterm
mov eax, dword [0x4089a4]
mov dword [ebp - 0x28], eax
lea eax, [ebp - 0x28]
push eax
push dword [0x4089a0]
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCRT.dll___getmainargs]
push 0x405028
push section..data
call sub.MSVCRT.dll__initterm
call dword [sym.imp.MSVCRT.dll___p___initenv]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
push dword [ebp - 0x20]
push dword [ebp - 0x2c]
push dword [ebp - 0x1c]
call fcn.00402780
add esp, 0x30
mov dword [ebp - 0x24], eax
push eax
call dword [sym.imp.MSVCRT.dll_exit]
mov eax, dword [ebp - 0x14]
mov ecx, dword [eax]
mov ecx, dword [ecx]
mov dword [ebp - 0x30], ecx
push eax
push ecx
call sub.MSVCRT.dll__XcptFilter
pop ecx
pop ecx
ret
Function at 0x4011a6
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x180
push ebx
push esi
xor esi, esi
push edi
push esi
push 0x8000080
push 3
push esi
push 1
push 0x80000000
push dword [ebp + 8]
mov dword [ebp - 0xc], esi
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
mov dword [ebp + 8], edi
jne 0x4011e3
or esi, eax
jmp 0x401304
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0xa0]
push 0x40
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4012e7
mov eax, dword [ebp - 0x64]
push esi
add eax, 4
push esi
push eax
push edi
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
call edi
cmp eax, 0xffffffff
jne 0x40121e
push 0xfffffffffffffffd
jmp 0x4012e9
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x20]
push 0x14
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4012e7
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x180]
push 0xe0
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4012e7
cmp word [ebp - 0x1e], si
mov dword [ebp - 8], esi
jbe 0x40128c
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x60]
push 0x28
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4012e7
movzx eax, word [ebp - 0x1e]
add ebx, dword [ebp - 0x50]
inc dword [ebp - 8]
cmp dword [ebp - 8], eax
jl 0x401265
push 1
push esi
push esi
push dword [ebp + 8]
call edi
add ebx, eax
xor edx, edx
mov eax, ebx
div dword [ebp - 0x15c]
test edx, edx
je 0x4012b9
mov eax, ebx
xor edx, edx
div dword [ebp - 0x15c]
inc eax
imul eax, dword [ebp - 0x15c]
mov ebx, eax
mov eax, dword [ebp + 0xc]
push esi
push esi
push ebx
push dword [ebp + 8]
mov dword [eax], ebx
call edi
cmp eax, 0xffffffff
je 0x401217
lea eax, [ebp - 4]
push esi
push eax
lea eax, [ebp - 0x38]
push 0x18
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x4012ec
push 0xfffffffffffffffe
pop esi
jmp 0x4012fb
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp + 0x10]
mov esi, dword [ebp - 0xc]
lea eax, [eax + ebx + 0x18]
mov dword [ecx], eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret

Function at 0x401988
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
push edi
mov edi, dword [esp + 0xc]
push dword [esp + 0x14]
push esi
push 1
push edi
call fcn.00401de3
add esp, 0x10
cmp eax, esi
jae 0x4019ab
push 0xfffffffffffffffc
pop eax
jmp 0x4019dd
dec esi
js 0x4019db
lea eax, [esi + 1]
mov ecx, dword [0x409e84]
movzx esi, byte [edi]
mov edx, ecx
and edx, 0xff
xor edx, esi
shr ecx, 8
movzx edx, word [edx*2 + 0x409ea0]
xor edx, ecx
inc edi
dec eax
mov dword [0x409e84], edx
jne 0x4019b1
xor eax, eax
pop edi
pop esi
ret
Function at 0x4045a5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x407118
cmp edx, dword [eax]
je 0x4045c7
add eax, 8
inc ecx
cmp eax, 0x4071a8
jl 0x4045b8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x407118]
jne 0x4046f5
mov eax, dword [0x409cd4]
cmp eax, 1
je 0x4046cf
test eax, eax
jne 0x4045f8
cmp dword [0x407064], 1
je 0x4046cf
cmp edx, 0xfc
je 0x4046f5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40462f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00405480
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405570
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x404672
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405570
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4063c0
push edi
call fcn.00405680
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00405480
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00405490
lea eax, [ebp - 0xa0]
push 0x4063a0
push eax
call fcn.00405490
push dword [esi + 0x40711c]
lea eax, [ebp - 0xa0]
push eax
call fcn.00405490
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004055eb
add esp, 0x2c
pop edi
jmp 0x4046f5
lea eax, [ebp + 8]
lea esi, [esi + 0x40711c]
push 0
push eax
push dword [esi]
call fcn.00405570
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]
pop esi
leave
ret
Function at 0x4011f9
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, ecx
push edi
cmp dword [ebx + 4], 0xffffffff
je 0x40124a
mov edi, dword [ebp + 8]
test edi, edi
je 0x40124a
cmp dword [ebp + 0xc], 1
jb 0x40124a
push esi
xor esi, esi
and dword [ebp + 8], 0
lea eax, [ebp + 8]
push 0
push eax
mov eax, dword [ebp + 0xc]
sub eax, esi
push eax
lea eax, [esi + edi]
push eax
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x401245
cmp dword [ebp + 8], 0
je 0x401245
add esi, dword [ebp + 8]
cmp esi, dword [ebp + 0xc]
jb 0x401216
mov eax, esi
pop esi
jmp 0x40124c
xor eax, eax
pop edi
pop ebx
pop ebp
ret 8
Function at 0x4039ae
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
and dword [ebp - 4], 0
push esi
mov esi, ecx
cmp dword [esi + 4], 0
je 0x4039e6
lea eax, [ebp - 4]
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
cmp dword [ebp - 4], 0x103
jne 0x4039d9
xor al, al
jmp 0x403a0a
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
and dword [esi + 4], 0
lea eax, [ebp - 4]
push eax
push 0x10000
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp + 0x10]
push 0
call fcn.0042be88
add esp, 0x18
mov dword [esi + 4], eax
test eax, eax
setne al
pop esi
leave
ret 0xc

Function at 0x403b9e
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
test ecx, ecx
je 0x403c07
test edx, edx
je 0x403c07
cmp dword [ebp + 8], 0
je 0x403c07
cmp dword [ebp + 0x10], 0
je 0x403c07
cmp dword [ebp + 0x14], 0
je 0x403c07
push ebx
lea eax, [ebp - 4]
xor ebx, ebx
push eax
push 0x20106
push ebx
push edx
push ecx
mov dword [ebp - 4], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403c02
push esi
push dword [ebp + 0x14]
xor esi, esi
push dword [ebp + 0x10]
inc esi
push esi
push ebx
push dword [ebp + 8]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 4]
test eax, eax
movzx ebx, bl
cmove ebx, esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov al, bl
pop ebx
leave
ret
xor al, al
leave
ret

Function at 0x403ccc
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x403d3e
cmp dword [ebp + 0x10], 4
jb 0x403d3e
xor ebx, ebx
mov dword [esi], ebx
test ecx, ecx
je 0x403d3e
test edx, edx
je 0x403d3e
cmp dword [ebp + 8], ebx
je 0x403d3e
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], ebx
push eax
mov eax, dword [ebp + 0x14]
or eax, 0x20019
mov dword [ebp - 4], ebx
push eax
push ebx
push edx
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403d3a
lea eax, [ebp + 0x10]
push eax
push esi
lea eax, [ebp - 4]
push eax
push ebx
push dword [ebp + 8]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0xc]
xor edx, edx
movzx ebx, bl
inc edx
test eax, eax
cmove ebx, edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, bl
jmp 0x403d40
xor al, al
pop esi
pop ebx
leave
ret