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

Disassembly:
sub esp, 0x414
push ebx
push ebp
push esi
lea eax, [esp + 0x31c]
push edi
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea ecx, [esp + 0x21c]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebp, dword [esp + 0x428]
mov dword [esp + 0x10], eax
mov edx, dword [ebp]
test edx, edx
je 0x401390
lea edi, [esp + 0x21c]
or ecx, 0xffffffff
xor eax, eax
lea ebx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
mov ebx, dword [ebp + 4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test ebx, ebx
rep movsb byte es:[edi], byte [esi]
je 0x4012a3
mov edi, 0x408264
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebp
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea ebp, [esp + 0x14]
and ecx, 3
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, ebp
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 ebp, dword [esp + 0x428]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, 0x408264
xor eax, eax
lea ebx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
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 ebx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebx
mov ebx, ecx
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 ebx, [esp + 0x118]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x320]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, ebx
lea ebx, [esp + 0x118]
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, edx
or ecx, 0xffffffff
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
lea eax, [esp + 0x18]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x120]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x40138d
mov edx, dword [ebp + 8]
add ebp, 8
test edx, edx
mov dword [esp + 0x428], ebp
jne 0x401216
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x414
ret
or eax, 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x414
ret
Function at 0x4013a0
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
lea eax, [esp]
mov dword [esp], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [esp + 0x10]
cmp eax, 1
jne 0x4013c9
add esp, 0x94
ret
cmp eax, 2
jne 0x4013f4
mov eax, dword [esp + 4]
cmp eax, 4
jne 0x4013e3
mov eax, 2
add esp, 0x94
ret
cmp eax, 5
jne 0x4013f4
mov eax, 3
add esp, 0x94
ret
xor eax, eax
add esp, 0x94
ret

Function at 0x401480
Capabilities:
Create service
Persist via windows service
Start service
Stop service

Disassembly:
sub esp, 0x20
push ebx
push esi
push edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4014b9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannt_open_Service_Manager_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x20
ret
push 0
push 0
lea eax, [esp + 0x14]
push 0
push eax
push str.Extended_Base
push str.System32drivers_sense3.sys
push 1
push 2
push 1
push 0xf01ff
push str.Sense3
push str.Sense3
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call ebx
cmp eax, 0x431
jne 0x401556
push 0xf01ff
push str.Sense3
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40152b
push str.cannot_open_service_n
call fcn.00401190
add esp, 4
mov eax, 0xfffffffe
pop edi
pop esi
pop ebx
add esp, 0x20
ret
lea ecx, [esp + 0x10]
push ecx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401556
push str.cannot_stop_service_n
call fcn.00401190
add esp, 4
mov eax, 0xfffffffd
pop edi
pop esi
pop ebx
add esp, 0x20
ret
test esi, esi
jne 0x401574
call ebx
push eax
push str.cannt_open_service_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x20
ret
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
jne 0x40159d
call ebx
push eax
push str.cannt_start_service_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
pop ebx
add esp, 0x20
ret
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
call fcn.004015c0
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
Function at 0x4015c0
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x14
lea eax, [esp + 0x10]
lea ecx, [esp]
push eax
push ecx
push 0
push 0xf003f
push 0
push 0
push 0
push str.SystemCurrentControlSetServicesSENSE3
push 0x80000002
mov dword [esp + 0x28], 1
mov dword [esp + 0x2c], 2
mov dword [esp + 0x30], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
je 0x401617
push str.cannt_create_register_key_r_n
call fcn.00401190
add esp, 4
add esp, 0x14
ret
mov eax, dword [esp]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push edi
lea edx, [esp + 0xc]
push 4
push edx
push 4
push 0
push str.Type
push eax
call esi
mov edx, dword [esp + 8]
lea ecx, [esp + 0x10]
push 4
push ecx
push 4
push 0
push str.Start
push edx
call esi
mov ecx, dword [esp + 8]
lea eax, [esp + 0x14]
push 4
push eax
push 4
push 0
push str.ErrorControl
push ecx
call esi
mov edi, str.Extended_Base
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [esp + 8]
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.Extended_Base
push 1
push eax
push str.Group
push edx
call esi
mov edi, str.System32Drivers_sense3.sys
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push str.System32Drivers_sense3.sys
push 1
push eax
mov eax, dword [esp + 0x18]
push str.ImagePath
push eax
call esi
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
test eax, eax
je 0x4016c8
push str.write_register_key_value_failed_r_n
call fcn.00401190
add esp, 4
add esp, 0x14
ret

Function at 0x4016d0
Capabilities:
Create service
Delete service

Disassembly:
push esi
push edi
push 0x408128
call fcn.004011d0
mov esi, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
add esp, 4
push 0xf003f
push 0
push 0
call esi
test eax, eax
jne 0x40170e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannt_open_service_manger_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
ret
push 0xf003f
push 0
push 0
call esi
mov esi, eax
push 0xf01ff
push str.s3usbnt
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x401744
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
push 0x408138
call fcn.004017a0
add esp, 4
push 0
push 0
push 0
push 0
push 0
push str.System32Driversxusbd.sys
push 0
push 1
push 1
push 0xf01ff
push str.xusbd
push str.xusbd
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, eax
call esi
test edi, edi
jne 0x401798
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannt_create_service_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop edi
pop esi
ret
push edi
call esi
pop edi
xor eax, eax
pop esi
ret
Function at 0x4017a0
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x20c
push ebx
push ebp
lea eax, [esp + 0x110]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov ebp, dword [esp + 0x218]
mov dword [esp + 8], eax
mov ebx, dword [ebp]
test ebx, ebx
je 0x4018e9
push esi
push edi
lea edi, [esp + 0x118]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
mov edx, dword [ebp + 4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
test edx, edx
rep movsb byte es:[edi], byte [esi]
je 0x401860
mov edi, 0x408264
or ecx, 0xffffffff
xor eax, eax
lea ebp, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, ebp
mov ebp, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebp
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
lea ebp, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, ebp
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 ebp, dword [esp + 0x220]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x408264
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
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
lea edx, [esp + 0x14]
and ecx, 3
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 + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x4018ce
mov dword [esp + 0x10], 0xffffffff
mov ebx, dword [ebp + 8]
add ebp, 8
test ebx, ebx
mov dword [esp + 0x220], ebp
jne 0x4017d3
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20c
ret
Function at 0x401950
Capabilities:
Delete service
Stop service

Disassembly:
push 0x408030
call fcn.004017a0
push 0x408040
call fcn.004017a0
push 0x408050
call fcn.004017a0
push 0x408060
call fcn.004017a0
push 0x408070
call fcn.004017a0
push 0x408080
call fcn.004017a0
push 0x408090
call fcn.004017a0
push 0x4080a0
call fcn.004017a0
push 0x4080b0
call fcn.004017a0
push 0x408138
call fcn.004017a0
push 0x4080e0
call fcn.004017a0
push 0x4080f0
call fcn.004017a0
push 0x408100
call fcn.004017a0
push 0x408110
call fcn.004017a0
push 0x408148
call fcn.004017a0
push 0x408128
call fcn.004017a0
add esp, 0x40
call fcn.004013a0
dec eax
je 0x401a1e
dec eax
je 0x401a19
dec eax
je 0x401a14
push str.unknown_os_version_r_n
call fcn.00401190
add esp, 4
mov eax, 1
ret
jmp 0x401bc0
jmp 0x401a40
jmp 0x401a30
push 0x4080e0
call fcn.004017a0
add esp, 4
xor eax, eax
ret
mov ecx, dword [0x408ef0]
xor eax, eax
test ecx, ecx
je 0x401a51
call 0x401a70
mov ecx, dword [0x408ef4]
test ecx, ecx
je 0x401a60
jmp 0x401b80
ret
sub esp, 0x1c
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
jne 0x401aa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannot_open_service_manager_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
push 0xf01ff
push str.Sense3
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401ad6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannot_open_service_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
lea eax, [esp + 4]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401afd
push str.cannt_stop_service__r_n
call fcn.00401190
add esp, 4
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x401b1d
push str.cannt_delete_Sense3_service_r_n
call fcn.00401190
add esp, 4
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
call fcn.00401b30
xor eax, eax
pop esi
add esp, 0x1c
ret
push esi
push edi
push 0xf003f
push 0
push 0
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
push 0xf01ff
push str.xusbd
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x401bb4
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
ret
mov ecx, dword [0x408ef0]
xor eax, eax
test ecx, ecx
je 0x401bd1
jmp 0x401a70
ret
Function at 0x401a70
Capabilities:
Delete service
Stop service

Disassembly:
push 0x408030
call fcn.004017a0
push 0x408040
call fcn.004017a0
push 0x408050
call fcn.004017a0
push 0x408060
call fcn.004017a0
push 0x408070
call fcn.004017a0
push 0x408080
call fcn.004017a0
push 0x408090
call fcn.004017a0
push 0x4080a0
call fcn.004017a0
push 0x4080b0
call fcn.004017a0
push 0x408138
call fcn.004017a0
push 0x4080e0
call fcn.004017a0
push 0x4080f0
call fcn.004017a0
push 0x408100
call fcn.004017a0
push 0x408110
call fcn.004017a0
push 0x408148
call fcn.004017a0
push 0x408128
call fcn.004017a0
add esp, 0x40
call fcn.004013a0
dec eax
je 0x401a1e
dec eax
je 0x401a19
dec eax
je 0x401a14
push str.unknown_os_version_r_n
call fcn.00401190
add esp, 4
mov eax, 1
ret
jmp 0x401bc0
jmp 0x401a40
jmp 0x401a30
push 0x4080e0
call fcn.004017a0
add esp, 4
xor eax, eax
ret
mov ecx, dword [0x408ef0]
xor eax, eax
test ecx, ecx
je 0x401a51
call 0x401a70
mov ecx, dword [0x408ef4]
test ecx, ecx
je 0x401a60
jmp 0x401b80
ret
sub esp, 0x1c
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
test eax, eax
jne 0x401aa3
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannot_open_service_manager_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
push 0xf01ff
push str.Sense3
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x401ad6
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.cannot_open_service_error_code___d_r_n
call fcn.00401190
add esp, 8
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
lea eax, [esp + 4]
push eax
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
jne 0x401afd
push str.cannt_stop_service__r_n
call fcn.00401190
add esp, 4
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
push esi
call dword [sym.imp.ADVAPI32.dll_DeleteService]
test eax, eax
jne 0x401b1d
push str.cannt_delete_Sense3_service_r_n
call fcn.00401190
add esp, 4
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret
call fcn.00401b30
xor eax, eax
pop esi
add esp, 0x1c
ret
push esi
push edi
push 0xf003f
push 0
push 0
or esi, 0xffffffff
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
push 0xf01ff
push str.xusbd
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
test eax, eax
je 0x401bb4
push eax
call dword [sym.imp.ADVAPI32.dll_DeleteService]
xor esi, esi
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, esi
pop edi
pop esi
ret
mov ecx, dword [0x408ef0]
xor eax, eax
test ecx, ecx
je 0x401bd1
jmp 0x401a70
ret

Function at 0x401b30
Capabilities:
Delete registry key

Disassembly:
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
push str.SystemCurrentControlSetServicesSENSE3Enum
push 0x80000002
call esi
test eax, eax
je 0x401b54
push str.cannt_delete_register_key_Sense3Enum
call fcn.00401190
add esp, 4
push str.SystemCurrentControlSetServicesSENSE3
push 0x80000002
call esi
test eax, eax
pop esi
je 0x401b70
push str.cannt_delete_register_key_Sense3
call fcn.00401190
pop ecx
ret
Function at 0x401be0
Capabilities:
Get common file path
Terminate process

Disassembly:
sub esp, 0x31c
lea eax, [esp + 0x114]
push ebx
push ebp
push esi
push edi
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x124]
push 0x4085dc
push ecx
call fcn.00402275
mov edi, eax
add esp, 8
test edi, edi
jne 0x401c2e
push str.connt_open_application_file_r_n
call fcn.00401190
add esp, 4
push 1
call fcn.00402180
push edi
call fcn.004066d8
push eax
call fcn.00406660
mov esi, eax
push esi
call fcn.00402145
push edi
mov ebp, eax
push 1
push esi
push ebp
call fcn.0040205d
push edi
call fcn.00402007
lea edi, [esi - 8]
add esp, 0x20
xor ecx, ecx
xor eax, eax
test edi, edi
mov dword [esp + 0x14], edi
jbe 0x401c71
movsx edx, byte [eax + ebp]
add ecx, edx
inc eax
cmp eax, edi
jb 0x401c66
cmp dword [esi + ebp - 4], ecx
je 0x401c8b
push str.check_sum_invalid_or_not_package_r_n
call fcn.00401190
add esp, 4
push 1
call fcn.00402180
mov ebx, dword [esi + ebp - 8]
lea eax, [esp + 0x228]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
cmp ebx, edi
jae 0x401d67
mov ecx, dword [ebx + ebp]
lea eax, [ebx + ebp]
lea edx, [ebx + ebp + 4]
mov dword [esp + 0x1c], eax
lea ebx, [ebx + ecx + 0x108]
lea edi, [esp + 0x228]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x20]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x10], esi
mov esi, edi
mov edi, dword [esp + 0x10]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
mov dword [esp + 0x18], edx
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
lea esi, [esp + 0x20]
push 0x408594
not ecx
mov eax, esi
sub edi, ecx
mov esi, edi
mov edx, ecx
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x24]
push ecx
call fcn.00402275
mov esi, eax
add esp, 8
test esi, esi
je 0x401d74
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push esi
push 1
mov eax, dword [edx]
add ecx, 0x104
push eax
push ecx
call fcn.00401efd
push esi
call fcn.00402007
mov eax, dword [esp + 0x28]
add esp, 0x14
cmp ebx, eax
jb 0x401caa
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x31c
ret
push 1
call fcn.00402180
nop
nop
nop
nop
nop
Function at 0x404311
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x408728
cmp edx, dword [eax]
je 0x404333
add eax, 8
inc ecx
cmp eax, 0x4087b8
jl 0x404324
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x408728]
jne 0x404461
mov eax, dword [0x408f50]
cmp eax, 1
je 0x40443b
test eax, eax
jne 0x404364
cmp dword [0x408674], 1
je 0x40443b
cmp edx, 0xfc
je 0x404461
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40439b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.004059d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00404630
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x4043de
lea eax, [ebp - 0x1a4]
push eax
call fcn.00404630
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x407458
push edi
call fcn.00405b50
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.004059d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.004059e0
lea eax, [ebp - 0xa0]
push 0x407438
push eax
call fcn.004059e0
push dword [esi + 0x40872c]
lea eax, [ebp - 0xa0]
push eax
call fcn.004059e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00405ac0
add esp, 0x2c
pop edi
jmp 0x404461
lea eax, [ebp + 8]
lea esi, [esi + 0x40872c]
push 0
push eax
push dword [esi]
call fcn.00404630
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 0x4010b0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap flags
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
push eax
mov eax, 0x4058
call fcn.00401f90
xor ecx, ecx
xor ebx, ebx
lea esi, [ebp - 0x4018]
sub esp, eax
mov eax, dword [esp + eax]
mov dword [ebp - 0x402c], edx
lea edx, [ebp - 0x402c]
mov dword [esp + 0x18], edx
mov edx, 0x2000
mov dword [esp + 0x14], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 0x10], esi
mov dword [esp + 4], eax
mov dword [esp], 0x400
call dword [sym.imp.kernel32.dll_FormatMessageW]
mov edi, dword [sym.imp.kernel32.dll_GetStdHandle]
sub esp, 0x1c
mov ebx, eax
mov dword [esp], 0xfffffff5
call edi
lea ecx, [ebp - 0x401c]
xor edx, edx
sub esp, 4
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ecx
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteConsoleW]
sub esp, 0x14
test eax, eax
je 0x401158
mov edx, dword [ebp - 0x401c]
lea esp, [ebp - 0xc]
mov eax, edx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [ebp - 0x4038], eax
mov ecx, dword [sym.imp.kernel32.dll_GetConsoleOutputCP]
mov dword [ebp - 0x4044], ecx
call ecx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], edx
xor edx, edx
mov dword [esp + 0x18], ecx
xor ecx, ecx
mov dword [esp + 0x14], edx
xor edx, edx
mov dword [esp + 4], edx
mov dword [esp + 0x10], ecx
mov dword [esp], eax
mov eax, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [ebp - 0x403c], eax
call eax
mov ecx, dword fs:[0x18]
mov dword [ebp - 0x4040], ecx
mov dword [ebp - 0x4030], eax
sub esp, 0x20
mov dword [esp + 8], eax
xor eax, eax
mov dword [esp + 4], eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x4038]
mov dword [ebp - 0x4034], eax
sub esp, 0xc
test eax, eax
je 0x40114b
mov ecx, dword [ebp - 0x4044]
call ecx
xor edx, edx
xor ecx, ecx
mov dword [esp + 0x1c], edx
mov edx, dword [ebp - 0x4030]
mov dword [esp + 0x18], ecx
mov ecx, dword [ebp - 0x4034]
mov dword [esp + 0xc], ebx
xor ebx, ebx
mov dword [esp + 8], esi
xor esi, esi
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ecx
mov dword [esp + 4], ebx
mov ebx, dword [ebp - 0x403c]
mov dword [esp], eax
call ebx
lea ebx, [ebp - 0x401c]
sub esp, 0x20
mov dword [esp], 0xfffffff5
call edi
mov edi, dword [ebp - 0x4034]
mov edx, dword [ebp - 0x4030]
sub esp, 4
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_WriteFile]
mov ecx, dword [ebp - 0x4040]
sub esp, 0x14
mov dword [esp + 8], edi
xor edi, edi
mov dword [esp + 4], edi
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapFree]
sub esp, 0xc
jmp 0x401145
Function at 0x401ef0
Capabilities:
Get process heap force flags
Terminate process

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 dl
movzx edx, dl
inc edx
mov dword [esp], edx
call sym.__set_app_type
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], esi
call sym._wmain
mov dword [esp], eax
call sub.ucrtbase.dll_exit
nop
nop