joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1015a43c
Capabilities:
Clear file content

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
mov ebx, dword [ebp + 8]
lea ecx, [ebp - 0x2c]
push esi
push edi
push dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push dword [ebp + 0xc]
push ebx
call fcn.1015a3b8
mov eax, dword [ebp - 0x2c]
and eax, dword [ebp - 0x28]
cmp eax, 0xffffffff
je 0x1015a5ab
mov eax, dword [ebp - 0x24]
and eax, dword [ebp - 0x20]
cmp eax, 0xffffffff
je 0x1015a5ab
mov ecx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
mov dword [ebp - 4], eax
test ecx, ecx
jl 0x1015a560
jg 0x1015a498
test eax, eax
je 0x1015a556
push 1
push 0x1000
call fcn.1014d8f8
mov esi, eax
pop ecx
pop ecx
test esi, esi
jne 0x1015a4bb
push 0xc
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1015a54d
push 0x8000
push ebx
call fcn.1015a2e9
pop ecx
pop ecx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x18]
test eax, eax
jl 0x1015a4e4
jg 0x1015a4df
cmp ecx, 0x1000
jb 0x1015a4e4
mov ecx, 0x1000
push edi
push ecx
push esi
push ebx
call fcn.1015203f
add esp, 0x10
cmp eax, 0xffffffff
je 0x1015a529
mov ecx, dword [ebp - 4]
cdq
sub ecx, eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], ecx
sbb eax, edx
mov dword [ebp - 8], eax
test eax, eax
jg 0x1015a4df
jl 0x1015a510
test ecx, ecx
jne 0x1015a4d1
push dword [ebp - 0xc]
push ebx
call fcn.1015a2e9
push esi
call fcn.1014d4f2
add esp, 0xc
xor ebx, ebx
jmp 0x1015a5b9
cmp byte [edi + 0x24], 0
je 0x1015a540
cmp dword [edi + 0x20], 5
jne 0x1015a540
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], 0xd
cmp byte [edi + 0x1c], 0
je 0x1015a54b
mov ebx, dword [edi + 0x18]
jmp 0x1015a54d
xor ebx, ebx
push esi
call fcn.1014d4f2
pop ecx
jmp 0x1015a5b9
test ecx, ecx
jg 0x1015a522
jl 0x1015a560
test eax, eax
jae 0x1015a522
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10152f7b
and eax, edx
add esp, 0x10
cmp eax, 0xffffffff
jne 0x1015a580
cmp byte [edi + 0x1c], 0
je 0x1015a522
jmp 0x1015a5b1
push ebx
call fcn.1014a0e6
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x1015a522
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0xd
mov byte [edi + 0x24], 1
mov dword [edi + 0x20], eax
pop ebx
mov byte [edi + 0x1c], 1
mov dword [edi + 0x18], ebx
jmp 0x1015a5b9
cmp byte [edi + 0x1c], 0
je 0x1015a5b6
mov ebx, dword [edi + 0x18]
jmp 0x1015a5b9
push 0x16
pop ebx
push 0
push dword [ebp - 0x28]
push dword [ebp - 0x2c]
push dword [ebp - 0x14]
call fcn.10152f7b
add esp, 0x10
mov eax, ebx
pop edi
pop esi
pop ebx
leave
ret

Function at 0x1015bd10
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1015bd3d
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1015bd3d
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x401000
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, eax
sub esp, 0x14
call sym._GetDesktopWindow_0
mov dword [esp + 0xc], 5
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.shell32.dll_Control_RunDLLW
sub esp, 0x10
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_ExitProcess]

Function at 0x401180
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x10
mov dword [esp], 1
call sym.__configure_wide_argv
call sym.__initialize_wide_environment
call sym.___p___argc
mov esi, dword [eax]
call sym.___p___wargv
mov edi, dword [eax]
call sym.__get_initial_wide_environment
mov ebx, eax
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 8]
mov edx, dword [eax + 0x3c]
cmp word [eax + edx + 0x5c], 2
sete al
movzx eax, al
add eax, 1
mov dword [esp], eax
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call dbg.wmain
mov dword [esp], eax
call sym._exit

Function at 0x4011f0
Capabilities:
Accept command line arguments
Encrypt data using rc4 prga

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push esi
push ebx
push ecx
sub esp, 0x6c
call dword [sym.imp.kernel32.dll_GetCommandLineW]
mov ebx, eax
movzx eax, word [eax]
test ax, ax
je 0x401257
xor ecx, ecx
xor edx, edx
jmp 0x401239
cmp ax, 0x5c
jne 0x4012c8
add edx, 1
movzx eax, word [ebx + 2]
add ebx, 2
test ax, ax
je 0x401257
cmp ax, 9
je 0x401245
cmp ax, 0x20
jne 0x401220
test ecx, ecx
je 0x4012b3
movzx eax, word [ebx + 2]
add ebx, 2
xor edx, edx
test ax, ax
jne 0x401239
lea eax, [ebp - 0x5c]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_GetStartupInfoW]
sub esp, 4
test byte [ebp - 0x30], 1
je 0x4012e8
movzx esi, word [ebp - 0x2c]
mov dword [esp], 0
call dword [sym.imp.kernel32.dll_GetModuleHandleW]
sub esp, 4
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], 0
mov dword [esp], eax
call dbg.wWinMain@16
sub esp, 0x10
lea esp, [ebp - 0xc]
pop ecx
pop ebx
pop esi
pop ebp
lea esp, [ecx - 4]
ret
add ebx, 2
movzx eax, word [ebx]
cmp ax, 9
je 0x4012b0
cmp ax, 0x20
je 0x4012b0
jmp 0x401257
cmp ax, 0x22
jne 0x401249
and edx, 1
jne 0x401249
xor ecx, 1
jmp 0x40122d
mov eax, 1
mov esi, 1
mov word [ebp - 0x2c], ax
jmp 0x401270
Function at 0x4039cf
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x114
push esi
push edi
push str.StartServiceCtrlDispatcherA
push str.ADVAPI32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, str.Serpiei
mov edi, eax
push esi
call fcn.00403061
test eax, eax
pop ecx
je 0x403a23
and dword [ebp - 8], 0
and dword [ebp - 4], 0
lea eax, [ebp - 0x10]
mov dword [ebp - 0x10], esi
push eax
mov dword [ebp - 0xc], 0x403756
call edi
pop edi
xor eax, eax
pop esi
leave
ret 0x10
and byte [ebp - 0x114], 0
push 0x40
pop ecx
xor eax, eax
lea edi, [ebp - 0x113]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x114]
push eax
call fcn.00402ca7
lea eax, [ebp - 0x114]
push 1
push eax
push str.Microsoft_.NET_COM_Integration_with_SOAP
push str.Microsoft_.Net_Frameworek_COMi_Suppoot
push esi
call fcn.004031c0
add esp, 0x18
call fcn.00402217
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x430004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..text
mov ebx, 0x408ed0
nop
nop
mov ecx, 0x411c7789
nop
nop
nop
test eax, eax
nop
nop
je 0x43004e
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x430024
nop
mov eax, section..data
nop
mov ebx, 0x42e1d0
nop
mov ecx, 0x462060c2
nop
nop
test eax, eax
nop
nop
nop
nop
nop
je 0x430084
nop
nop
xor dword [eax], ecx
nop
nop
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
nop
jne 0x43006c
nop
nop
nop
nop
nop
nop
nop
popal
nop
nop
jmp 0x401219
Function at 0x402932
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push dword [ebp + 8]
mov dword [ebp - 8], ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x402a41
push ebx
push esi
xor esi, esi
push esi
push 0x80
push 4
push esi
push 3
push 0x10000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x402a3f
push edi
push 0x34
pop edi
push esi
push ebx
mov dword [ebp + 8], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, edi
jae 0x40298f
mov dword [ebp + 8], esi
mov edi, eax
push edi
call fcn.00432f36
mov esi, eax
pop ecx
test esi, esi
je 0x402a3e
push edi
push 0
push esi
call fcn.005534a0
and dword [ebp - 4], 0
add esp, 0xc
lea eax, [ebp - 4]
push 0
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 8], 0
je 0x402a37
push str.__GS__
push esi
call fcn.00554430
pop ecx
pop ecx
test eax, eax
jne 0x4029ed
lea eax, [esi + 0xa]
push str.__Dict__
push eax
call fcn.00554430
pop ecx
pop ecx
cmp dword [esi + 0x18], 0
je 0x402a3e
push 0x24
call fcn.00432f09
pop ecx
mov ecx, eax
test ecx, ecx
je 0x402a14
and dword [ecx + 0x1c], 0
xor eax, eax
mov dword [ecx + 0x20], 7
mov word [ecx + 0xc], ax
jmp 0x402a16
xor ecx, ecx
mov dword [ebp + 8], ecx
test ecx, ecx
je 0x402a3e
mov eax, dword [esi + 0x18]
mov dword [ecx], eax
movzx eax, byte [esi + 0x1c]
mov dword [ecx + 8], eax
mov ecx, dword [ebp - 8]
lea eax, [ebp + 8]
mov ecx, dword [ecx]
push eax
call fcn.004265a8
push esi
call fcn.00432f3f
pop ecx
pop edi
pop esi
pop ebx
leave
ret 4
Function at 0x402aa9
Capabilities:
Check if file exists
Create directory
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x17a8
call fcn.00554f90
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0x10]
push esi
push edi
mov edi, dword [ebp + 0xc]
xor eax, eax
mov esi, 0x206
push esi
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.005534a0
xor eax, eax
push esi
push eax
mov word [ebp - 0x414], ax
lea eax, [ebp - 0x412]
push eax
call fcn.005534a0
add esp, 0x18
push str.Dict
call fcn.004036f5
mov ecx, eax
call fcn.0040e275
push eax
lea eax, [ebp - 0x20c]
push 0x5bf410
push eax
call fcn.00554d64
mov esi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
add esp, 0x10
lea eax, [ebp - 0x20c]
push eax
call esi
test eax, eax
jne 0x402b46
push eax
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
push str..dcel
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x414]
push str._s_d_s
push eax
call fcn.00554d64
add esp, 0x14
lea eax, [ebp - 0x414]
push eax
call esi
test eax, eax
jne 0x402c5b
push eax
push 0x80
push 2
push eax
push 3
push 0x10000000
lea eax, [ebp - 0x414]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x402c5b
push 0x1387
lea eax, [ebp - 0x179b]
push 0
push eax
mov byte [ebp - 0x179c], 0
call fcn.005534a0
push 0
call fcn.00554f34
add esp, 0x10
mov dword [ebp - 0x17a4], edx
push eax
push 0
call fcn.00554f34
pop ecx
push eax
push 0
push 0
push 1
push 1
push dword [ebp + 8]
lea ecx, [ebp - 0x179c]
push 0x4e20
push str.__Dict__
push str.__GS__
call fcn.00403aff
push edi
lea ecx, [ebp - 0x179c]
call fcn.004036bc
push ebx
lea ecx, [ebp - 0x179c]
call fcn.004036bc
mov edi, 0x5bf400
push edi
lea ecx, [ebp - 0x179c]
call fcn.004036bc
push edi
lea ecx, [ebp - 0x179c]
call fcn.004036bc
and dword [ebp - 0x17a0], 0
push 0
lea eax, [ebp - 0x17a0]
push eax
push dword [ebp - 0x176c]
lea eax, [ebp - 0x179c]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00553d0c
leave
ret 0xc
Function at 0x404b4b
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor ebx, ebx
push ebx
push ebx
mov dword [ebp - 0x30], eax
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov esi, eax
test esi, esi
je 0x404bcf
push edi
shl eax, 2
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, eax
test edi, edi
je 0x404b94
push edi
push esi
call dword [sym.imp.USER32.dll_GetKeyboardLayoutList]
mov esi, eax
test esi, esi
jne 0x404b98
xor eax, eax
jmp 0x404bce
push 0x28
lea eax, [ebp - 0x2c]
dec esi
push eax
push dword [edi + esi*4]
call sub.IMM32.dll_ImmGetIMEFileNameW
test eax, eax
je 0x404bbc
lea eax, [ebp - 0x2c]
push eax
push dword [ebp - 0x30]
call dword [sym.imp.KERNEL32.dll_lstrcmpiW]
test eax, eax
je 0x404bc2
test esi, esi
jne 0x404b98
jmp 0x404bc5
mov ebx, dword [edi + esi*4]
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, ebx
pop edi
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.00553d0c
leave
ret 4
Function at 0x404f2b
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push eax
push str.Control_PanelInput_MethodHot_Keys_
lea eax, [ebp - 0x194]
push 0x5bf43c
push eax
call fcn.00554d64
add esp, 0x10
lea eax, [ebp - 0x198]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x194]
push eax
push reloc.WSOCK32.dll_accept
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x404f8a
xor eax, eax
jmp 0x40501f
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x19c]
push eax
lea eax, [ebp - 0x1a4]
push eax
push 0
push str.Key_Modifiers
push dword [ebp - 0x198]
mov dword [ebp - 0x1a4], 3
mov dword [ebp - 0x1a0], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
je 0x404fd8
push dword [ebp - 0x198]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x404f83
mov eax, dword [ebp - 0x19c]
mov ecx, 0xc004
and eax, ecx
cmp eax, ecx
sete al
mov byte [edi], al
lea eax, [ebp - 0x1a0]
push eax
lea eax, [ebp - 0x19c]
push eax
lea eax, [ebp - 0x1a4]
push eax
push 0
push str.Virtual_Key
push dword [ebp - 0x198]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x404fca
mov ax, word [ebp - 0x19c]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop edi
call fcn.00553d0c
leave
ret 8

Function at 0x40751b
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
movzx ecx, word [ebp + 8]
push esi
push 0x100
mov esi, 0x632ef8
push esi
push 2
push ecx
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoW]
mov eax, esi
pop esi
pop ebp
ret
Function at 0x407b8d
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x600
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x600], ecx
push esi
lea ecx, [ebp - 0x5f4]
call fcn.00406c09
mov eax, dword [0x6328a4]
mov dword [0x6328a8], eax
lea eax, [ebp - 0x5f8]
push eax
push 9
xor esi, esi
push esi
push str.SOFTWAREMicrosoftCTFTIP
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x407c7f
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push esi
push eax
call fcn.005534a0
add esp, 0xc
jmp 0x407c56
lea eax, [ebp - 0x5fc]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x5f8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x407c55
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x5f4]
push eax
call fcn.00554537
pop ecx
pop ecx
mov ecx, dword [ebp - 0x600]
lea eax, [ebp - 0x5f4]
push eax
push dword [ebp - 0x5fc]
call fcn.004089ba
push dword [ebp - 0x5fc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc esi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push esi
push dword [ebp - 0x5f8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x407bfe
push dword [ebp - 0x5f8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00553d0c
leave
ret

Function at 0x407c8c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 4]
push eax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0x5bf674
push dword [ebp + 0xc]
mov dword [ebp - 8], 1
mov dword [ebp - 4], 0x64
call edi
test eax, eax
je 0x407cca
xor eax, eax
jmp 0x407d1d
lea eax, [ebp - 4]
push eax
lea eax, [esi + 0x66]
push eax
lea eax, [ebp - 8]
push eax
push 0
push str.Profile
push dword [ebp + 0xc]
mov dword [ebp - 8], 1
mov dword [ebp - 4], 0x64
call edi
test eax, eax
jne 0x407cc6
push 4
pop eax
mov dword [ebp - 8], eax
mov dword [ebp - 4], eax
lea eax, [ebp - 4]
push eax
lea eax, [esi + 0xcc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push str.KeyboardLayout
push dword [ebp + 0xc]
call edi
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
leave
ret 8
Function at 0x407d23
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2ec
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0x2ec], ecx
lea ecx, [ebp - 0x2e0]
push ecx
push str.34745C63_B2F0_4784_8B67_5E12C8701A31
push eax
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x407e3b
mov eax, dword [esi]
push edi
push 0x10
mov dword [esi + 4], eax
xor edi, edi
lea eax, [esi + 0xc]
push edi
push eax
call fcn.00555255
movzx eax, ax
mov dword [ebp - 0x2e8], eax
xor eax, eax
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push edi
push eax
call fcn.005534a0
add esp, 0x18
jmp 0x407e08
lea eax, [ebp - 0x2e4]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x407e07
lea ecx, [ebp - 0x2dc]
call fcn.004069c7
mov eax, dword [ebp - 0x2e8]
push dword [ebp - 0x2e4]
mov ecx, dword [ebp - 0x2ec]
mov word [ebp - 0x2dc], ax
lea eax, [ebp - 0x2dc]
push eax
call fcn.00407c8c
test eax, eax
je 0x407dfb
lea eax, [ebp - 0x2dc]
push eax
mov ecx, esi
call fcn.00409d65
push dword [ebp - 0x2e4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
inc edi
push 0x104
lea eax, [ebp - 0x20c]
push eax
push edi
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x407d9b
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
jmp 0x407e50
mov eax, dword [esi + 4]
sub eax, dword [esi]
mov ecx, 0xd0
cdq
idiv ecx
xor ecx, ecx
cmp ecx, eax
sbb eax, eax
neg eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00553d0c
leave
ret 8

Function at 0x407e5f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
lea eax, [ebp - 8]
push eax
push str.34745C63_B2F0_4784_8B67_5E12C8701A31
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x407f0e
mov esi, dword [ebp + 8]
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp + 0xc]
push eax
lea eax, [esi + 2]
push eax
lea eax, [ebp - 4]
push eax
push 0
push str.Default
push dword [ebp - 8]
xor ebx, ebx
inc ebx
mov dword [ebp - 4], ebx
mov dword [ebp + 0xc], 0x64
call edi
test eax, eax
jne 0x407f0e
lea eax, [ebp + 0xc]
push eax
lea eax, [esi + 0x66]
push eax
lea eax, [ebp - 4]
push eax
push 0
push str.Profile
push dword [ebp - 8]
mov dword [ebp - 4], ebx
mov dword [ebp + 0xc], 0x64
call edi
test eax, eax
jne 0x407f0e
push 4
pop eax
mov dword [ebp - 4], eax
mov dword [ebp + 0xc], eax
lea eax, [ebp + 0xc]
push eax
lea eax, [esi + 0xcc]
push eax
lea eax, [ebp - 4]
push eax
push 0
push str.KeyboardLayout
push dword [ebp - 8]
call edi
test eax, eax
jne 0x407f0e
push dword [ebp - 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, ebx
jmp 0x407f10
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 8
Function at 0x407f1a
Capabilities:
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2e8
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x6327c4]
push ebx
mov dword [0x6327c8], eax
lea eax, [ebp - 0x2e0]
push eax
push 9
xor ebx, ebx
push ebx
push str.SoftwareMicrosoftCTFAssemblies
push reloc.WSOCK32.dll_accept
mov dword [ebp - 0x2e8], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x408040
push edi
push 0x206
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push ebx
push eax
call fcn.005534a0
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
mov edi, ebx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
jmp 0x408023
lea eax, [ebp - 0x2e4]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x408015
lea ecx, [ebp - 0x2dc]
call fcn.004069c7
push 0x10
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00555255
mov ecx, dword [ebp - 0x2e8]
add esp, 0xc
mov word [ebp - 0x2dc], ax
push dword [ebp - 0x2e4]
lea eax, [ebp - 0x2dc]
push eax
call fcn.00407e5f
test eax, eax
je 0x408009
lea eax, [ebp - 0x2dc]
push eax
mov ecx, 0x6327c4
call fcn.00409d65
push dword [ebp - 0x2e4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x104
lea eax, [ebp - 0x20c]
inc edi
push eax
push edi
push dword [ebp - 0x2e0]
call ebx
test eax, eax
je 0x407f99
push dword [ebp - 0x2e0]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.00553d0c
leave
ret
Function at 0x40804d
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x6f4
mov eax, dword [0x630f50]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0x6e8]
push eax
push 9
push 0
push str.SYSTEMCurrentControlSetControlKeyboard_Layouts
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [ebp - 0x6f4], ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x4081fb
push ebx
push edi
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.005534a0
add esp, 0xc
lea eax, [ebp - 0x20c]
push 0x104
push eax
xor ebx, ebx
push ebx
push dword [ebp - 0x6e8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test eax, eax
jne 0x4081f1
push esi
lea eax, [ebp - 0x6e4]
push eax
lea eax, [ebp - 0x20c]
push eax
push dword [ebp - 0x6e8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x4081ce
lea ecx, [ebp - 0x6e0]
call fcn.00406acc
lea eax, [ebp - 0x20c]
push eax
lea eax, [ebp - 0x6de]
push eax
call fcn.00554537
push 0x10
lea eax, [ebp - 0x20c]
push 0
push eax
call fcn.00555255
add esp, 0x14
mov esi, eax
lea eax, [ebp - 0x6f0]
push eax
lea eax, [ebp - 0x6be]
push eax
lea eax, [ebp - 0x6ec]
push eax
push 0
push str.IME_File
push dword [ebp - 0x6e4]
mov word [ebp - 0x6e0], si
mov dword [ebp - 0x6ec], 1
mov dword [ebp - 0x6f0], 0x190
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov eax, 0xe000
shr esi, 0x10
cmp si, ax
lea eax, [ebp - 0x52e]
push eax
push str.Layout_Text
push str.Layout_Display_Name
push dword [ebp - 0x6e4]
jbe 0x4081a9
call fcn.004077e3
mov ecx, dword [ebp - 0x6f4]
add esp, 0x10
lea eax, [ebp - 0x6e0]
push eax
call fcn.00406ed2
jmp 0x4081c6
call fcn.004077e3
add esp, 0x10
test eax, eax
je 0x4081c6
lea eax, [ebp - 0x6e0]
push eax
mov ecx, 0x6327ac
call fcn.00409e52
push dword [ebp - 0x6e4]
call edi
push 0x104
lea eax, [ebp - 0x20c]
push eax
inc ebx
push ebx
push dword [ebp - 0x6e8]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyW]
test eax, eax
je 0x4080d1
pop esi
push dword [ebp - 0x6e8]
call edi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00553d0c
leave
ret