joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401495
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x210
push ebx
push esi
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [0x4726b0]
or eax, 8
push eax
xor ebx, ebx
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x40152a
mov esi, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, 0x105
jmp 0x4014e7
cmp dword [ebp + 0x10], ebx
jne 0x40151e
push ebx
lea eax, [ebp - 0x210]
push eax
push dword [ebp - 4]
call fcn.00401495
test eax, eax
jne 0x4014f9
push edi
lea eax, [ebp - 0x210]
push eax
push ebx
push dword [ebp - 4]
call esi
test eax, eax
je 0x4014ce
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.004065ab
cmp eax, ebx
je 0x401531
push ebx
push dword [0x4726b0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x40152a
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret 0xc
cmp dword [0x4726b0], ebx
jne 0x401527
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
test eax, eax
jne 0x401527
jmp 0x40152a
Function at 0x403577
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
push esi
xor esi, esi
cmp eax, esi
jl 0x4035a1
mov ecx, dword [0x472618]
push esi
add eax, ecx
push esi
push eax
push dword [0x40b014]
mov dword [0x42f1e4], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.00403410
cmp eax, esi
jl 0x40367e
push 4
lea eax, [ebp + 8]
push eax
push dword [0x40b014]
call fcn.0040608d
test eax, eax
jne 0x4035cd
push 0xfffffffffffffffd
pop eax
jmp 0x40367e
add dword [0x42f1e4], 4
push ebx
push dword [ebp + 8]
call fcn.00403410
mov ebx, eax
cmp ebx, esi
jl 0x40367b
cmp dword [ebp + 0x10], esi
jne 0x403649
cmp dword [ebp + 8], esi
jle 0x40367b
mov esi, 0x42f1e8
cmp dword [ebp + 8], 0x4000
mov eax, dword [ebp + 8]
jl 0x40360b
mov eax, 0x4000
push eax
push esi
push dword [0x40b014]
mov dword [ebp - 4], eax
call fcn.0040608d
test eax, eax
je 0x40366d
push dword [ebp - 4]
push esi
push dword [ebp + 0xc]
call fcn.004060bc
test eax, eax
je 0x403645
mov eax, dword [ebp - 4]
sub dword [ebp + 8], eax
add dword [0x42f1e4], eax
add ebx, eax
cmp dword [ebp + 8], 0
jg 0x4035fa
jmp 0x40367b
push 0xfffffffffffffffe
jmp 0x40366f
mov eax, dword [ebp + 8]
cmp eax, dword [ebp + 0x14]
jl 0x403654
mov eax, dword [ebp + 0x14]
push esi
lea ecx, [ebp - 4]
push ecx
push eax
push dword [ebp + 0x10]
push dword [0x40b014]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403672
push 0xfffffffffffffffd
pop eax
jmp 0x40367d
mov ebx, dword [ebp - 4]
add dword [0x42f1e4], ebx
mov eax, ebx
pop ebx
pop esi
leave
ret 0x10
Function at 0x405d52
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
mov eax, 0x409600
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
mov byte [ebp - 0x20], 1
mov byte [ebp - 0x1f], 0
mov word [ebp - 0x1e], 4
mov dword [ebp - 0x10], 0x4095f0
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
test eax, eax
je 0x405da2
xor eax, eax
jmp 0x405dcf
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0xb7
jne 0x405dce
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityW]
test eax, eax
je 0x405dcc
xor eax, eax
jmp 0x405dce
call esi
pop esi
leave
ret 4

Function at 0x405df0
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x457280
xor eax, eax
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x457280], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x405e2f
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405fe4
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov esi, eax
cmp esi, 0xffffffff
je 0x406004
and eax, 0xfffffffe
push eax
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, esi
pop esi
ret 4

Function at 0x40600a
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov ecx, eax
inc ecx
push 0
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
ret 0xc

Function at 0x406039
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
mov eax, dword [0x4096dc]
mov dword [ebp - 8], eax
mov eax, dword [0x4096e0]
dec edi
mov dword [ebp - 4], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
add word [ebp - 4], dx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameW]
test eax, eax
jne 0x406089
test edi, edi
jne 0x406046
and word [esi], di
pop edi
pop esi
leave
ret 8
mov eax, esi
jmp 0x406083
Function at 0x406164
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0x14]
push edi
lea eax, [ebp + 0x18]
push eax
mov eax, dword [ebp + 0x18]
xor edi, edi
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push edi
push dword [ebp + 0xc]
mov word [esi], di
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4061d8
lea eax, [ebp + 0xc]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push edi
push dword [ebp + 0x10]
mov dword [ebp + 0xc], 0x4008
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4061c5
cmp dword [ebp + 0x14], 1
je 0x4061c8
cmp dword [ebp + 0x14], 2
je 0x4061c8
mov word [esi], di
push dword [ebp + 0x18]
mov word [esi + 0x4006], di
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebp
ret 0x14

Function at 0x40653b
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
push esi
mov esi, 0x104
push esi
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
cmp eax, esi
pop esi
jbe 0x40655f
xor eax, eax
test eax, eax
je 0x406572
cmp word [ebp + eax*2 - 0x23e], 0x5c
je 0x406572
xor ecx, ecx
jmp 0x406575
xor ecx, ecx
inc ecx
push dword [ebp + 8]
lea ecx, [ecx*2 + 0x4087bc]
push ecx
lea eax, [ebp + eax*2 - 0x23c]
push str._s_S.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
push 8
push 0
lea eax, [ebp - 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExW]
leave
ret 4

Function at 0x406672
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push esi
mov esi, dword [esp + 8]
push edi
push esi
call fcn.00405fe4
mov edi, eax
cmp edi, 0xffffffff
je 0x4066b3
test byte [esp + 0x10], 1
push esi
je 0x40669c
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
test eax, eax
je 0x4066a4
xor eax, eax
inc eax
jmp 0x4066b5
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x406693
test byte [esp + 0x10], 4
jne 0x4066b3
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
xor eax, eax
pop edi
pop esi
ret 8

Function at 0x406715
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x4572c8
push esi
call fcn.00406297
push esi
call fcn.00405f0d
mov edi, eax
test edi, edi
jne 0x406736
xor eax, eax
jmp 0x406794
push edi
call fcn.004062b9
test byte [0x472628], 0x80
je 0x406753
movzx eax, word [edi]
test ax, ax
je 0x406732
cmp ax, 0x5c
je 0x406732
sub edi, esi
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
sar edi, 1
jmp 0x406775
push esi
call fcn.00406514
test eax, eax
je 0x40676f
test byte [eax], 0x10
je 0x406799
push esi
call fcn.004066e9
push esi
call ebx
cmp eax, edi
jg 0x406760
push esi
call fcn.004066ba
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop ebx
pop edi
pop esi
ret 4
xor eax, eax
jmp 0x406793
Function at 0x406a21
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
push esi
push edi
push 0x40986c
mov ebx, 0x45b2d0
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
mov esi, dword [esp + 0x18]
test esi, esi
mov ebp, dword [sym.imp.KERNEL32.dll_GetShortPathNameW]
mov edi, 0x400
je 0x406a6f
push 1
push 0
push esi
call fcn.0040600a
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebx
push esi
call ebp
test eax, eax
je 0x406b8e
cmp eax, edi
jg 0x406b8e
push edi
mov esi, 0x460128
push esi
push dword [esp + 0x1c]
call ebp
test eax, eax
je 0x406b8e
cmp eax, edi
jg 0x406b8e
push esi
push ebx
push str._ls_ls_r_n
push 0x45bd20
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
mov ebx, eax
mov eax, dword [0x4725dc]
push dword [eax + 0x128]
push esi
call fcn.0040679d
push 4
push 0xc0000000
push esi
call fcn.0040600a
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x18], ebp
je 0x406b8e
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x406b87
push edi
push esi
push ebp
call fcn.0040608d
test eax, eax
je 0x406b87
push str._Rename__r_n
push esi
call fcn.00405f6a
test eax, eax
jne 0x406b25
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
add edi, 0xa
jmp 0x406b5a
push 0x409850
add eax, 0xa
push eax
call fcn.00405f6a
mov ebp, eax
test ebp, ebp
je 0x406b56
lea ecx, [esi + edi]
lea eax, [ecx + ebx]
jmp 0x406b47
mov dl, byte [ecx]
mov byte [eax], dl
dec eax
dec ecx
cmp ecx, ebp
ja 0x406b41
sub ebp, esi
inc ebp
mov eax, ebp
mov ebp, dword [esp + 0x18]
jmp 0x406b5c
mov ebp, dword [esp + 0x18]
mov eax, edi
push ebx
push 0x45bd20
add eax, esi
push eax
call fcn.00405fc0
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
add edi, ebx
push edi
push esi
push ebp
call fcn.004060bc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret

Function at 0x406b93
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x406bb6
push dword [esp + 8]
push dword [esp + 8]
call fcn.00406a21
pop ecx
pop ecx
inc dword [0x472690]
ret 8
Function at 0x406bbf
Capabilities:
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov eax, ebx
and eax, 4
push esi
mov dword [ebp - 4], eax
call fcn.00406715
test bl, 8
mov dword [ebp - 8], eax
je 0x406bfd
push esi
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
neg eax
sbb eax, eax
inc eax
add dword [0x472688], eax
jmp 0x406dd7
mov dword [ebp + 8], ebx
and dword [ebp + 8], 1
push edi
je 0x406c18
test eax, eax
je 0x406d57
test bl, 2
je 0x406d57
push esi
mov edi, 0x45c120
push edi
call fcn.00406297
cmp dword [ebp + 8], 0
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
je 0x406c3a
push str..
push edi
call ebx
jmp 0x406c40
push esi
call fcn.004066e9
cmp word [esi], 0
jne 0x406c50
cmp word [0x45c120], 0x5c
jne 0x406c58
push 0x4087bc
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ebx, [esi + eax*2]
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov edi, eax
cmp edi, 0xffffffff
je 0x406d4c
cmp word [ebp - 0x22c], 0x2e
jne 0x406cab
cmp word [ebp - 0x22a], 0
je 0x406d2f
cmp word [ebp - 0x22a], 0x2e
jne 0x406cab
cmp word [ebp - 0x228], 0
je 0x406d2f
lea eax, [ebp - 0x22c]
push eax
push ebx
call fcn.00406297
test byte [ebp - 0x258], 0x10
je 0x406cd6
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x406d2f
push dword [ebp + 0xc]
push esi
call fcn.00406bbf
jmp 0x406d2f
push esi
push str.Delete:_DeleteFile___s__
call fcn.004064e2
pop ecx
pop ecx
push dword [ebp - 4]
push esi
call fcn.00406672
test eax, eax
push esi
jne 0x406d28
cmp dword [ebp - 4], eax
je 0x406d14
push str.Delete:_DeleteFile_on_Reboot___s__
call fcn.004064e2
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.004050a9
push 0
push esi
call fcn.00406b93
jmp 0x406d2f
push str.Delete:_DeleteFile_failed___s__
call fcn.004064e2
inc dword [0x472688]
pop ecx
pop ecx
jmp 0x406d2f
push 0xfffffffffffffff2
call fcn.004050a9
lea eax, [ebp - 0x258]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileW]
test eax, eax
jne 0x406c7b
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp + 8], 0
je 0x406d57
and word [ebx - 2], 0
xor edi, edi
cmp dword [ebp + 8], edi
je 0x406dd6
cmp dword [ebp - 8], edi
push esi
jne 0x406d6b
push str.RMDir:_RemoveDirectory_invalid_input___s__
jmp 0x406dc0
call fcn.00406514
test eax, eax
je 0x406dd6
push esi
call fcn.004066ba
push esi
push str.RMDir:_RemoveDirectory___s__
call fcn.004064e2
mov eax, dword [ebp - 4]
pop ecx
pop ecx
or eax, 1
push eax
push esi
call fcn.00406672
test eax, eax
push esi
jne 0x406dcf
cmp dword [ebp - 4], edi
je 0x406dbb
push str.RMDir:_RemoveDirectory_on_Reboot___s__
call fcn.004064e2
pop ecx
pop ecx
push esi
push 0xfffffffffffffff1
call fcn.004050a9
push edi
push esi
call fcn.00406b93
jmp 0x406dd6
push str.RMDir:_RemoveDirectory_failed___s__
call fcn.004064e2
inc dword [0x472688]
pop ecx
pop ecx
jmp 0x406dd6
push 0xffffffffffffffe5
call fcn.004050a9
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x406ddd
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [0x46092c], 0
jne 0x406e18
xor ecx, ecx
push esi
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x406df1
mov dword [ecx*4 + 0x460928], eax
inc ecx
cmp ecx, 0x100
jl 0x406dec
pop esi
cmp dword [ebp + 0x10], 0
mov eax, dword [ebp + 8]
not eax
jbe 0x406e45
mov ecx, dword [ebp + 0xc]
movzx edx, byte [ecx]
dec dword [ebp + 0x10]
xor edx, eax
and edx, 0xff
shr eax, 8
xor eax, dword [edx*4 + 0x460928]
inc ecx
cmp dword [ebp + 0x10], 0
ja 0x406e26
not eax
pop ebp
ret 0xc
Function at 0x401b10
Capabilities:
Create process on windows
Self delete
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401a10
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0x38
lea eax, [ebp - 0x3c]
mov dword [ebp - 0x40], 0x3c
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x34], str.open
lea eax, [ebp - 0x40]
mov dword [ebp - 0x30], str.del.bat
mov dword [ebp - 0x24], 1
push eax
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_exit]
int3
Function at 0x402a80
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x402ab0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403b9b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x402aec
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x402aec
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.00403b9b
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x402bc3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x402b14
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 0x402b20
movsx eax, bl
jmp 0x402b58
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 0x402b82
sub eax, 1
je 0x402b82
sub eax, 2
jne 0x402bc3
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.00403b9b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x402ba0
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 0x402bc3
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.00403b9b
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.00403b9b
mov esp, ebp
pop ebp
ret 4
Function at 0x4030c0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x408040]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x40317c
cmp byte [esi + 0x3d], 0
je 0x40317c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x40316a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x403131
sub eax, 1
je 0x403135
sub eax, 2
jne 0x40316a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403b9b
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x403153
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 0x40316a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403b9b
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00403b9b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.00403b9b
mov esp, ebp
pop ebp
ret

Function at 0x404507
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x404546
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x404546
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x404546
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x404546
cmp dword [ecx + 0x74], 0xe
jbe 0x404546
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x4104d1
Capabilities:
Query or enumerate registry value
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
xor esi, esi
push edi
cmp dword [ecx + 0x58], esi
je 0x410524
push esi
push dword [ebp + 8]
call fcn.004106b7
mov edi, eax
test edi, edi
je 0x41051f
lea eax, [ebp - 4]
mov dword [ebp - 4], 4
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
push dword [ebp + 0xc]
push edi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
push edi
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x41051f
mov eax, dword [ebp - 8]
jmp 0x410536
mov eax, dword [ebp + 0x10]
jmp 0x410536
push dword [ecx + 0x6c]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
pop edi
pop esi
leave
ret 0xc

Function at 0x412362
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
xor esi, esi
mov eax, ecx
push edi
mov edi, esi
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], esi
je 0x4123ac
call fcn.00415f9a
push 0xf0
push dword [ebp + 0xc]
mov ebx, dword [eax + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4123a9
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x4123fc
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
mov eax, dword [ebp - 4]
xor ebx, ebx
inc ebx
test esi, esi
je 0x4123d9
mov ecx, dword [eax]
push dword [ebp + 0x10]
push esi
mov esi, dword [ecx + 0x20]
mov ecx, esi
push dword [ebp + 8]
call dword [0x5729c8]
mov ecx, dword [ebp - 4]
call esi
mov ebx, eax
test edi, edi
je 0x4123d9
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, dword [ebp + 8]
mov edi, dword [eax + 0x70]
test edi, edi
je 0x4123fa
mov eax, dword [edi]
push dword [ebp + 0x10]
mov esi, dword [eax + 0xa0]
mov ecx, esi
call dword [0x5729c8]
mov ecx, edi
call esi
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 0xc

Function at 0x4181af
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor edi, edi
mov dword [ebp - 4], ecx
mov esi, edi
cmp dword [ebp + 8], esi
je 0x4181f4
call fcn.00415f9a
push 0xf0
push dword [ebp + 8]
mov ebx, dword [eax + 0xc]
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
je 0x4181f4
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
je 0x418210
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.004b1468
mov ebx, eax
test edi, edi
je 0x41820e
test esi, esi
je 0x41820e
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret 4