joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40f830
Capabilities:
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x14
push ebx
push ebp
mov ebp, dword [esp + 0x20]
push esi
xor ebx, ebx
push ebx
lea eax, [esp + 0x18]
push eax
push 0x40
push edi
push ebp
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f95e
cmp dword [esp + 0x14], 0x40
jne 0x40f95e
movzx eax, word [edi]
mov ecx, 0x5a4d
mov esi, 0xf8
cmp ax, cx
je 0x40f8b6
mov edx, 0x4550
cmp ax, dx
jne 0x40f95e
cmp dword [edi + 0x40], esi
mov dword [edi + 0x14c], ebx
jl 0x40f95e
mov eax, dword [edi + 0x14c]
push ebx
cdq
lea ecx, [esp + 0x1c]
push ecx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40f8db
mov eax, dword [esp + 0x14]
jmp 0x40f8e5
mov eax, dword [edi + 0x3c]
cmp eax, ebx
je 0x40f95e
lea ecx, [eax + 0xf8]
cmp ecx, dword [edi + 0x40]
mov dword [edi + 0x14c], eax
jg 0x40f95e
cmp eax, 0x40
jmp 0x40f890
lea ecx, [edi + 0x44]
mov edx, ebp
call fcn.0040fdb0
cmp eax, ebx
je 0x40f95e
cmp dword [edi + 0x44], 0x4550
je 0x40f933
movzx eax, word [edi + 0x44]
mov edx, 0x5a4d
cmp dx, ax
je 0x40f914
mov ecx, 0x454e
cmp cx, ax
je 0x40f914
mov edx, 0x454c
cmp dx, ax
jne 0x40f95e
mov dword [esp + 0x10], 1
mov eax, dword [esp + 0x10]
mov dword [edi + 0x150], ebx
mov byte [edi + 0x155], bl
pop esi
pop ebp
pop ebx
add esp, 0x14
ret
cmp word [edi + 0x58], bx
je 0x40f95e
cmp byte [edi + 0x5e], 3
jae 0x40f945
cmp byte [edi + 0x5f], 5
jb 0x40f95e
movzx ecx, word [edi + 0x4a]
mov eax, 1
mov byte [edi + 0x155], al
mov dword [edi + 0x150], ecx
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
pop esi
pop ebp
pop ebx
add esp, 0x14
ret

Function at 0x40fa10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x1c]
push esi
push edi
mov edi, ecx
xor esi, esi
push esi
cdq
lea ecx, [esp + 0x14]
push ecx
push edx
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x40fa8a
test edi, edi
jle 0x40fa7c
cmp edi, 0x1000
mov esi, edi
jl 0x40fa45
mov esi, 0x1000
push 0
lea edx, [esp + 0x28]
push edx
push esi
push ebx
push ebp
mov dword [esp + 0x38], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40fa95
cmp dword [esp + 0x24], esi
jne 0x40fa95
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 8]
push esi
push ebx
push ecx
call edx
sub edi, esi
test edi, edi
jg 0x40fa36
mov eax, 1
pop edi
pop esi
pop ebp
add esp, 0x10
ret 8
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x10
ret 8
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x10
ret 8
Function at 0x40fb90
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x460708
push 0x435b80
mov eax, dword fs:[0]
push eax
sub esp, 0x54
push ebx
push esi
push edi
mov eax, dword [0x465ac0]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
xor edi, edi
xor ebx, ebx
lea eax, [ebp - 0x2c]
push eax
mov esi, dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x40fd80
cmp dword [ebp - 0x2c], edi
jne 0x40fbef
cmp dword [ebp - 0x28], edi
jne 0x40fbef
lea edi, [ebx + 0x57]
jmp 0x40fd83
push 0x158
call fcn.00432058
add esp, 4
mov ebx, eax
mov dword [ebp - 0x24], ebx
cmp ebx, edi
je 0x40fd80
mov dword [ebx + 0x40], edi
mov dword [ebx + 0x14c], edi
mov dword [ebx + 0x150], edi
mov byte [ebx + 0x154], 0
mov byte [ebx + 0x155], 0
mov ecx, dword [ebp - 0x2c]
mov dword [ebx + 0x40], ecx
push esi
mov edi, ebx
call fcn.0040f830
add esp, 4
test eax, eax
jne 0x40fc41
mov byte [ebx + 0x155], al
mov edi, 0x57
mov dword [ebp - 0x20], edi
lea edx, [ebp - 0x64]
mov esi, dword [ebp + 0xc]
mov dword [esi], edx
mov eax, dword [esi + 4]
xor ecx, ecx
mov dword [eax], ecx
mov edx, dword [esi + 4]
mov dword [edx + 4], ecx
mov dword [esi + 8], 0x40ff50
mov eax, dword [ebp + 0x10]
mov dword [esi + 0xc], eax
mov dword [ebp - 4], ecx
cmp dword [ebx + 0x150], ecx
jbe 0x40fd51
movzx eax, word [ebx + 0x5c]
mov edx, 0x10b
cmp ax, dx
je 0x40fc96
mov edx, 0x20b
cmp ax, dx
jne 0x40fd51
mov edx, 0x10b
cmp ax, dx
jne 0x40fcd5
push 4
mov edi, dword [ebx + 0x14c]
add edi, 0x58
mov eax, esi
call fcn.0040f9c0
mov edi, dword [ebx + 0x14c]
add edi, 0x98
push 8
mov eax, esi
call fcn.0040f9c0
mov eax, dword [ebx + 0xe0]
mov edi, dword [ebx + 0xdc]
jmp 0x40fd49
mov eax, dword [ebx + 0x14c]
cdq
push ecx
lea ecx, [ebp - 0x34]
push ecx
push edx
push eax
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x40fcf6
mov eax, dword [ebp - 0x24]
jmp 0x40fd09
lea ecx, [ebx + 0x44]
mov esi, pe_nt_image_headers32
mov edx, dword [ebp + 8]
call fcn.0040fdb0
mov esi, dword [ebp + 0xc]
test eax, eax
jne 0x40fd16
mov dword [ebp - 4], 0xfffffffe
jmp 0x40fd83
push 4
mov edi, dword [ebx + 0x14c]
add edi, 0x58
mov eax, esi
call fcn.0040f9c0
mov edi, dword [ebx + 0x14c]
add edi, 0xa8
push 8
mov eax, esi
call fcn.0040f9c0
mov eax, dword [ebx + 0xf0]
mov edi, dword [ebx + 0xec]
push eax
mov eax, esi
call fcn.0040f9c0
mov ecx, dword [ebx + 0x40]
push ecx
mov edx, dword [ebp + 8]
push edx
push esi
call fcn.0040faa0
xor edi, edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xfffffffe
jmp 0x40fd83
mov edi, dword [ebp - 0x20]
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
test ebx, ebx
je 0x40fd97
push ebx
call fcn.004324f7
add esp, 4
xor eax, eax
test edi, edi
sete al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x410020
Capabilities:
Print debug messages

Disassembly:
push ecx
mov eax, dword [0x465ac0]
xor eax, esp
mov dword [esp], eax
push edi
xor edi, edi
cmp dword [esi + 8], edi
je 0x410043
lea eax, [edi + 1]
pop edi
mov ecx, dword [esp]
xor ecx, esp
call fcn.00430e7d
pop ecx
ret
push str.ObCtrl.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 8], eax
test eax, eax
je 0x41008c
push str.GetComInstance
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x41008c
call eax
mov dword [esi + 4], eax
test eax, eax
je 0x41008c
mov edx, dword [eax]
mov edx, dword [edx + 0x10]
lea ecx, [esi + 0xc]
push ecx
mov ecx, eax
call edx
mov edi, eax
test edi, edi
jne 0x4100a8
push str.cant_open_ctrl_device_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [esi + 8]
mov dword [esi + 4], 0
test eax, eax
je 0x4100a8
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [esi + 8], 0
mov ecx, dword [esp + 4]
mov eax, edi
pop edi
xor ecx, esp
call fcn.00430e7d
pop ecx
ret
Function at 0x412780
Capabilities:
Get system information on windows
Print debug messages

Disassembly:
sub esp, 0x24
push esi
push edi
mov edi, eax
xor eax, eax
push 0x11c
mov esi, ecx
push eax
push esi
mov dword [esp + 0x14], eax
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
call fcn.00435330
add esp, 0xc
push esi
mov dword [esi], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x412955
push str.GetNativeSystemInfo
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4127f7
lea ecx, [esp + 8]
push ecx
call eax
jmp 0x412802
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
cmp dword [esi + 0x10], 2
jne 0x41294a
cmp dword [esi + 4], 4
jbe 0x41294a
mov edx, dword [esp + 8]
mov eax, 9
lea ecx, [eax - 8]
cmp ax, dx
je 0x41283d
mov eax, 6
cmp ax, dx
je 0x41283d
test edi, edi
je 0x412843
mov dword [edi], 0
jmp 0x412843
test edi, edi
je 0x412843
mov dword [edi], ecx
mov eax, dword [esi + 4]
xor edi, edi
sub eax, 5
je 0x4128e5
sub eax, ecx
je 0x412876
sub eax, 4
jne case.default.0x412882
xor edx, edx
cmp byte [esi + 0x11a], cl
setne dl
add edx, 0xd
mov edi, edx
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
mov eax, dword [esi + 8]
cmp eax, 3
ja case.default.0x412882
jmp dword [eax*4 + 0x412960]
xor eax, eax
cmp byte [esi + 0x11a], cl
setne al
add eax, 5
mov edi, eax
pop edi
pop esi
add esp, 0x24
ret
xor edx, edx
cmp byte [esi + 0x11a], cl
setne dl
add edx, 7
mov edi, edx
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
xor eax, eax
cmp byte [esi + 0x11a], cl
setne al
add eax, 9
mov edi, eax
pop edi
pop esi
add esp, 0x24
ret
xor edx, edx
cmp byte [esi + 0x11a], cl
setne dl
add edx, 0xb
mov edi, edx
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
mov eax, dword [esi + 8]
sub eax, 0
je 0x412940
sub eax, ecx
je 0x412903
sub eax, ecx
jne case.default.0x412882
cmp byte [esi + 0x11a], cl
jne 0x412910
cmp dx, 9
jne 0x412910
mov edi, 2
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
mov esi, dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x59
call esi
test eax, eax
jne 0x41292b
mov edi, 3
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
push 0x59
call esi
test eax, eax
je case.default.0x412882
mov edi, 4
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
mov edi, ecx
mov eax, edi
pop edi
pop esi
add esp, 0x24
ret
push str.This_sample_does_not_support_this_version_of_Windows.
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x24
ret
Function at 0x41ad74
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
xor ebx, ebx
xor edi, edi
mov dword [ebp - 4], ecx
cmp dword [ebp + 8], ebx
je 0x41adbb
call fcn.0041f947
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 8]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x41adbb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x41add7
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
mov ecx, dword [ebp - 4]
push edi
call fcn.0041a8ec
mov esi, eax
test edi, edi
je 0x41add5
test ebx, ebx
je 0x41add5
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov eax, esi
pop edi
pop esi
pop ebx
leave
ret 4

Function at 0x41b5a4
Capabilities:
Get graphical window text

Disassembly:
push 4
mov eax, 0x449213
call fcn.00435790
mov esi, ecx
cmp dword [esi + 0x50], 0
jne 0x41b5c9
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [esi + 0x20]
call dword [sym.imp.USER32.dll_GetWindowTextW]
jmp 0x41b60f
lea ecx, [ebp - 0x10]
call fcn.00403000
mov ecx, dword [esi + 0x50]
mov eax, dword [ecx]
and dword [ebp - 4], 0
lea edx, [ebp - 0x10]
push edx
call dword [eax + 0x8c]
push 0xffffffffffffffff
push dword [ebp - 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.0041512d
add esp, 0x10
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
mov esi, eax
call fcn.00402fc0
mov eax, esi
call fcn.00435868
ret 8

Function at 0x41d85a
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ebx
xor ebx, ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 4], ebx
cmp dword [ebp + 0xc], ebx
je 0x41d8a2
call fcn.0041f947
mov esi, dword [eax + 0xc]
push 0xf0
push dword [ebp + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x41d8a2
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov dword [ebp - 4], eax
test eax, eax
je 0x41d8e5
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
mov esi, dword [ebp + 8]
mov dword [ebp + 0xc], 1
test ebx, ebx
je 0x41d8ce
push dword [ebp + 0x10]
mov eax, dword [edi]
push ebx
push esi
mov ecx, edi
call dword [eax + 0x20]
cmp dword [ebp - 4], 0
mov dword [ebp + 0xc], eax
je 0x41d8ce
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_FreeResource]
cmp dword [esi + 0x4c], 0
je 0x41d8e2
mov ecx, dword [esi + 0x4c]
push dword [ebp + 0x10]
mov eax, dword [ecx]
call dword [eax + 0xa0]
mov eax, dword [ebp + 0xc]
pop edi
pop esi
pop ebx
leave
ret 0xc
Function at 0x430e7d
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x465ac0]
jne 0x430e87
repz ret
jmp fcn.00439353

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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
xor esi, esi
cmp dword [ebp + 8], esi
jne 0x432a7e
call fcn.00432f73
mov dword [eax], esi
call fcn.00432f60
push esi
push esi
push esi
push esi
push esi
mov dword [eax], 0x16
call fcn.004324c1
add esp, 0x14
push 0x16
pop eax
jmp 0x432ad3
test dword [ebp + 0xc], 0xfffffff9
jne 0x432a5a
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x432aab
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.00432f86
pop ecx
call fcn.00432f60
mov eax, dword [eax]
jmp 0x432ad3
test al, 0x10
jne 0x432ad1
test al, 1
je 0x432ad1
test byte [ebp + 0xc], 2
je 0x432ad1
call fcn.00432f73
mov dword [eax], 5
call fcn.00432f60
mov dword [eax], 0xd
jmp 0x432aa2
xor eax, eax
pop esi
pop ebp
ret

Function at 0x443800
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.00438d62
and dword [ebp - 4], 0
cmp dword [0x469d2c], 0
mov ebx, eax
jne 0x4438b1
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x443962
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x443962
push eax
call fcn.00438cf0
mov dword [esp], 0x456bd0
push edi
mov dword [0x469d2c], eax
call esi
push eax
call fcn.00438cf0
mov dword [esp], 0x456bbc
push edi
mov dword [0x469d30], eax
call esi
push eax
call fcn.00438cf0
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x469d34], eax
call esi
push eax
call fcn.00438cf0
pop ecx
mov dword [0x469d3c], eax
test eax, eax
je 0x4438b1
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.00438cf0
pop ecx
mov dword [0x469d38], eax
mov eax, dword [0x469d38]
cmp eax, ebx
je 0x443909
cmp dword [0x469d3c], ebx
je 0x443909
push eax
call fcn.00438d6b
push dword [0x469d3c]
mov esi, eax
call fcn.00438d6b
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x443909
test edi, edi
je 0x443909
call esi
test eax, eax
je 0x443900
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x443900
test byte [ebp - 0xc], 1
jne 0x443909
or dword [ebp + 0x10], 0x200000
jmp 0x443942
mov eax, dword [0x469d30]
cmp eax, ebx
je 0x443942
push eax
call fcn.00438d6b
pop ecx
test eax, eax
je 0x443942
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x443942
mov eax, dword [0x469d34]
cmp eax, ebx
je 0x443942
push eax
call fcn.00438d6b
pop ecx
test eax, eax
je 0x443942
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x469d2c]
call fcn.00438d6b
pop ecx
test eax, eax
je 0x443962
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x443964
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x406234
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
pushal
call 0x406243
pop dword [ebp - 0x44]
mov eax, 0x633d9ac1
add eax, 0x9d02c782
sub dword [ebp - 0x44], eax
mov dword [ebp - 0x54], 0xbee2185
sub dword [ebp - 0x54], 0xbd9bdc3a
mov dword [ebp - 0x50], 0x13752fde
sub dword [ebp - 0x50], 0xe141e399
mov dword [ebp - 0x4c], 0x91fb9f91
add dword [ebp - 0x4c], 0xba50a49d
mov dword [ebp - 0x48], 0x7ac1e5c0
sub dword [ebp - 0x48], 0x7ac1e5c0
lea eax, [ebp - 0x54]
push eax
mov eax, 0x34535a87
sub eax, 0x3412d983
add eax, dword [ebp - 0x44]
call dword [eax]
mov dword [ebp - 0x54], 0xab17e419
sub dword [ebp - 0x54], 0x36a57ac3
mov dword [ebp - 0x50], 0x2e2ef358
sub dword [ebp - 0x50], 0xecc291e3
mov dword [ebp - 0x4c], 0xa45a2f4c
add dword [ebp - 0x4c], 0xbf153d20
mov dword [ebp - 0x48], 0x350b7190
sub dword [ebp - 0x48], 0x350b7190
lea ebx, [ebp - 0x54]
push ebx
push eax
mov eax, 0x6288bd1e
add eax, 0x9db7c3e2
add eax, dword [ebp - 0x44]
call dword [eax]
push 0x40
push 0x1000
push 0x31c03
push 0
call eax
mov ecx, 0x32e9
mov edi, eax
mov ebx, 0x46e400
add ebx, dword [ebp - 0x44]
mov esi, 0xd2adc557
sub esi, 0x7366ad98
add dword [ebp - 0xc], edx
mov edx, dword [ebx]
add edx, esi
sub dword [ebp - 0x38], 0x70d1b494
mov dword [edi], edx
xor dword [ebp - 0x38], edi
add edi, 4
add ebx, 0xf98b258c
sub ebx, 0xf98b2588
loop 0x406359
add eax, 0x5b2a5b13
add eax, 0xa4d66364
mov ebx, eax
add eax, 5
mov ecx, 0x1df3de9e
add ecx, 0xe24c2162
add ecx, dword [ebp - 0x44]
call ebx
leave
ret

Function at 0x40669d
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x427dcc], 0
push esi
jne 0x4066d4
xor ecx, ecx
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 0x4066ae
mov dword [ecx*4 + 0x427dc8], eax
inc ecx
cmp ecx, 0x100
jl 0x4066a9
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x406705
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x427dc8]
xor eax, esi
inc ecx
dec edx
jne 0x4066e7
pop edi
not eax
pop esi
ret 0xc
Function at 0x401688
Capabilities:
Check if file exists
Get common file path
Read .ini file

Disassembly:
push 0x230
mov eax, 0x564f25
call fcn.0053cd89
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
and dword [ebp - 0x230], 0
mov edi, edx
mov esi, ecx
mov dword [ebp - 0x228], edi
mov dword [ebp - 0x234], eax
call fcn.00401414
push str.DCEX.Model
lea ecx, [ebp - 0x220]
call fcn.00402372
and dword [ebp - 4], 0
push edi
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00401906
add esp, 0xc
mov byte [ebp - 4], 2
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402760
lea eax, [ebp - 0x21c]
push eax
mov ecx, ebx
call fcn.0040145b
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x21c]
add ecx, 0xfffffff0
call fcn.00402760
push 1
push 0x23
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, 0x598e00
test eax, eax
je 0x40185a
push ebx
lea ecx, [ebp - 0x238]
call fcn.00402372
push dword [ebp - 0x228]
mov dword [ebp - 4], 3
push eax
lea eax, [ebp - 0x21c]
push eax
call fcn.00401906
add esp, 0xc
mov byte [ebp - 4], 5
mov ecx, dword [ebp - 0x238]
add ecx, 0xfffffff0
call fcn.00402760
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x22c]
call fcn.00402372
push str.epsonEpson_Scan_2ModelsES
push eax
lea eax, [ebp - 0x23c]
push eax
mov byte [ebp - 4], 6
call fcn.0040195d
push dword [ebp - 0x228]
mov byte [ebp - 4], 7
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401906
push str.DCP.ini
push eax
lea eax, [ebp - 0x220]
push eax
mov byte [ebp - 4], 8
call fcn.0040195d
add esp, 0x24
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
call fcn.00402760
mov ecx, dword [ebp - 0x23c]
add ecx, 0xfffffff0
call fcn.00402760
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
call fcn.00402760
push dword [ebp - 0x220]
call edi
test eax, eax
je 0x40183a
push dword [ebp - 0x220]
push 0
push str.DataVersion
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x40183a
js 0x40183a
mov dword [ebp - 0x230], eax
lea eax, [ebp - 0x21c]
push eax
lea ecx, [ebp - 0x220]
call fcn.0040145b
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402760
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x21c]
add ecx, 0xfffffff0
call fcn.00402760
push ebx
lea ecx, [ebp - 0x22c]
call fcn.00402372
push dword [ebp - 0x228]
mov dword [ebp - 4], 0xd
push eax
lea eax, [ebp - 0x224]
push eax
call fcn.00401906
add esp, 0xc
mov byte [ebp - 4], 0xf
mov ecx, dword [ebp - 0x22c]
add ecx, 0xfffffff0
call fcn.00402760
mov ebx, dword [ebp - 0x234]
push dword [ebx]
call edi
test eax, eax
je 0x4018d2
push dword [ebx]
push 0
push str.DataVersion
push dword [ebp - 0x224]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
test eax, eax
je 0x4018d2
cmp eax, dword [ebp - 0x230]
jl 0x4018d2
lea eax, [ebp - 0x224]
push eax
mov ecx, ebx
call fcn.0040145b
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
call fcn.00402760
call fcn.0053ce0c
ret 8
Function at 0x4027dc
Capabilities:
Create new key via cryptacquirecontext
Generate random numbers via winapi

Disassembly:
push 0xac
mov eax, 0x564e8f
call fcn.0053cd89
push 0xf0000000
xor ebx, ebx
push 0x18
push ebx
push ebx
lea eax, [ebp - 0xb8]
push eax
mov esi, ecx
mov byte [ebp - 0xb1], bl
mov dword [ebp - 0xb8], ebx
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x402889
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x40282c
push 0x2f
jmp 0x40283c
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x402847
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x402849
mov eax, esi
push 4
push 0x12
push eax
lea esi, [ebp - 0x60]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._Error_in_AcquireContext_0x_08x__n
push ebx
mov ecx, esi
call fcn.00404c1a
mov edi, eax
call fcn.004027b4
pop ecx
pop ecx
lea ecx, [ebp - 0x60]
or dword [ebp - 4], 0xffffffff
call fcn.00404ba8
jmp 0x402918
push esi
push 0x10
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
jne 0x402911
push 0x2f
mov esi, str...COMMONHash256.cpp
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x4028b3
push 0x2f
jmp 0x4028c3
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
test eax, eax
je 0x4028ce
push 0x5c
push esi
call fcn.005385d0
pop ecx
pop ecx
inc eax
jmp 0x4028d0
mov eax, esi
push 4
push 0x18
push eax
lea esi, [ebp - 0xb0]
call fcn.00404b3c
mov esi, eax
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str._Error_in_CryptGenRandom_0x_08x__n
push ebx
mov ecx, esi
call fcn.00404c1a
mov edi, eax
call fcn.004027b4
pop ecx
pop ecx
lea ecx, [ebp - 0xb0]
jmp 0x40287b
mov byte [ebp - 0xb1], 1
cmp dword [ebp - 0xb8], ebx
je 0x40292d
push ebx
push dword [ebp - 0xb8]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov al, byte [ebp - 0xb1]
call fcn.0053ce0c
ret