joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4020c0
Capabilities:
Query service status
Start service

Disassembly:
sub esp, 0x1c
push ebx
push esi
push edi
xor ebx, ebx
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4020e2
pop edi
pop esi
pop ebx
add esp, 0x1c
ret
mov eax, dword [esp + 0x2c]
push 0xf01ff
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x402109
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x1c
ret
lea ecx, [esp + 0xc]
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x402120
cmp dword [esp + 0x10], 4
je 0x40212f
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
je 0x402134
mov ebx, 1
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push edi
call esi
pop edi
mov eax, ebx
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x402150
Capabilities:
Query service status
Stop service

Disassembly:
sub esp, 0x20
push ebx
push esi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
test ebx, ebx
mov dword [esp + 8], ebx
jne 0x402174
pop esi
pop ebx
add esp, 0x20
ret
mov eax, dword [esp + 0x2c]
push 0xf01ff
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
test esi, esi
jne 0x40219a
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
pop esi
xor eax, eax
pop ebx
add esp, 0x20
ret
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
lea ecx, [esp + 0x10]
push edi
push ecx
push esi
call ebp
test eax, eax
je 0x402200
mov eax, dword [esp + 0x18]
xor edi, edi
cmp eax, 4
jne 0x4021c7
lea edx, [esp + 0x14]
push edx
push 1
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
lea eax, [esp + 0x14]
push eax
push esi
call ebp
test eax, eax
je 0x402200
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [esp + 0x18], 1
je 0x4021fc
push 0x1f4
call ebx
inc edi
cmp edi, 0x258
jge 0x4021fc
lea ecx, [esp + 0x14]
push ecx
push esi
call ebp
test eax, eax
jne 0x4021d9
mov ebx, dword [esp + 0x10]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push ebx
call esi
pop edi
pop ebp
pop esi
mov eax, 1
pop ebx
add esp, 0x20
ret
Function at 0x404320
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x10c
push esi
call fcn.00401740
test eax, eax
jne 0x40435b
call fcn.00401540
test eax, eax
jne 0x40435b
push str.Your_permission_is_not_enough_to_perform_the_action.
lea ecx, [esp + 8]
mov dword [esp + 8], 0x4161f0
call fcn.00402220
xor eax, eax
pop esi
add esp, 0x10c
ret 0x10
push str.OSCE_ClnExtor_Mutex
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x4043a2
push str.Cannot_start_more_than_one_instance_of_ClnExtor.
lea ecx, [esp + 8]
mov dword [esp + 8], 0x4161f0
call fcn.00402220
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x10c
ret 0x10
lea eax, [esp + 8]
push 4
push eax
call fcn.00404cc0
mov ecx, dword [str.TempClnExtor]
push 0
lea edx, [esp + 0x14]
push ecx
push edx
call fcn.00404d60
lea eax, [esp + 0x1c]
push eax
call fcn.00405140
add esp, 0x18
cmp eax, 3
je 0x404400
test eax, eax
je 0x404400
push str.Delete_the_working_directory_failed__extraction_abort.
lea ecx, [esp + 8]
mov dword [esp + 8], 0x4161f0
call fcn.00402220
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x10c
ret 0x10
call fcn.00404440
test eax, eax
je 0x404418
call fcn.00404620
call fcn.00404580
call fcn.004045d0
lea ecx, [esp + 8]
push ecx
call fcn.004027d0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x10c
ret 0x10

Function at 0x404440
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
push esi
push edi
push str.____IsWindowsXP__n
push 0x419404
push 0x7c5
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 0x18]
add esp, 0x10
rep stosd dword es:[edi], eax
lea eax, [esp + 8]
xor esi, esi
push eax
mov dword [esp + 0xc], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x18], 2
jne 0x4044a0
cmp dword [esp + 0xc], 5
jne 0x4044a0
cmp dword [esp + 0x10], 1
jne 0x4044a0
mov esi, 1
push esi
push str._IsWindowsXP__IsWindowsXP___lu__n
push 0x7d3
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
push 0x41a23c
push 0x419404
push 0x7d4
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
mov eax, esi
pop edi
pop esi
add esp, 0x94
ret
Function at 0x4044e0
Capabilities:
Delete registry key

Disassembly:
push esi
push str.____DeleteLMRegKey__n
push 0x419404
push 0x7db
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
mov esi, dword [esp + 0x18]
add esp, 0x10
test esi, esi
jne 0x404509
xor eax, eax
pop esi
ret
push edi
push esi
push str._DeleteLMRegKey__subkey___s_n
push 0x7e0
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
mov edi, 1
push esi
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
je 0x404551
push eax
push str._DeleteLMRegKey__:_RegDeleteKey_____lu__n
push 0x7e9
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
xor edi, edi
push 0x41a288
push 0x419404
push 0x7ec
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
mov eax, edi
pop edi
pop esi
ret

Function at 0x404620
Capabilities:
Delete registry value

Disassembly:
push ecx
push esi
push str.____DeleteMSIClientEstimatedSizeVal__n
push 0x419404
push 0x804
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
lea eax, [esp + 4]
mov esi, 1
push eax
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionUninstallA97792EC_E172_4B38_85DD_0F853599D5EF
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40469e
mov ecx, dword [esp + 4]
push str.EstimatedSize
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
test eax, eax
je 0x404691
push eax
push str._DeleteMSIClientEstimatedSizeVal__:_RegDeleteValue_____lu__n
push 0x816
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
xor esi, esi
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x4046b8
push eax
push str._DeleteMSIClientEstimatedSizeVal__:_RegOpenKeyEx_____lu__n
push 0x81c
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
xor esi, esi
push 0x41a460
push 0x419404
push 0x81f
push str.D:OfficeScan_srcUtilityClientPackagerClientExtractorcp_ClientExtractor.cpp
call fcn.00404e10
add esp, 0x10
mov eax, esi
pop esi
pop ecx
ret
Function at 0x404cc0
Capabilities:
Get common file path

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x108
push ebx
xor ebx, ebx
cmp eax, 4
jge 0x404cdf
mov eax, 8
pop ebx
add esp, 0x108
ret
lea eax, [esp + 4]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jbe 0x404d4d
lea ecx, [esp + 4]
push 0x41a5bc
push ecx
call fcn.0040d315
add esp, 8
cmp eax, ebx
je 0x404d40
push esi
push edi
mov byte [eax + 1], bl
lea edi, [esp + 0xc]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ebx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x118]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebx
add esp, 0x108
ret
mov eax, 3
pop ebx
add esp, 0x108
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
pop ebx
add esp, 0x108
ret

Function at 0x404e10
Capabilities:
Print debug messages

Disassembly:
mov eax, 0x201c
call fcn.0040c7a0
mov eax, dword [0x41f29c]
push esi
test eax, eax
push edi
je 0x404f8b
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov edx, dword [esp + 0x2028]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
add esi, edx
cmp esi, edx
jbe 0x404e5e
mov al, byte [esi]
cmp al, 0x5c
je 0x404e5e
cmp al, 0x2f
je 0x404e5e
dec esi
cmp esi, edx
ja 0x404e4f
mov edx, dword [esp + 0x2030]
lea ecx, [esp + 0x2034]
push ecx
push edx
lea eax, [esp + 0x102c]
push 0x1000
push eax
call fcn.0040d4c4
add esp, 0x10
lea ecx, [esp + 0x1024]
push ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x18]
push eax
mov eax, dword [esp + 0x1e]
and edx, 0xffff
and eax, 0xffff
push edx
mov edx, dword [esp + 0x1e]
push eax
mov eax, dword [esp + 0x1e]
and ecx, 0xffff
and edx, 0xffff
push ecx
mov ecx, dword [esp + 0x2044]
and eax, 0xffff
push edx
push eax
inc esi
push ecx
push esi
lea edx, [esp + 0x4c]
push str.__s__d___02d__02d__02d:_02d:_02d__x__x___s
push edx
call fcn.0040d2c3
mov eax, dword [0x41f29c]
add esp, 0x30
cmp eax, 1
je 0x404ef9
cmp eax, 3
jne 0x404f44
push 0
push str.MfxTraceWindow
call dword [sym.imp.USER32.dll_FindWindowA]
test eax, eax
je 0x404f34
lea edx, [esp + 0x18]
lea ecx, [esp + 0x24]
push edx
push 0
push 0x4a
push eax
mov dword [esp + 0x28], 0x6e697774
mov dword [esp + 0x2c], 0x1000
mov dword [esp + 0x30], ecx
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x404f3f
lea eax, [esp + 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov eax, dword [0x41f29c]
cmp eax, 2
je 0x404f4e
cmp eax, 3
jne 0x404f8b
push 0x41a5c0
push 0x41f198
call fcn.0040cc3f
mov esi, eax
add esp, 8
test esi, esi
je 0x404f8b
lea edi, [esp + 0x24]
or ecx, 0xffffffff
xor eax, eax
push esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
push 1
push ecx
lea ecx, [esp + 0x30]
push ecx
call fcn.0040d38b
push esi
call fcn.0040cb55
add esp, 0x14
pop edi
pop esi
add esp, 0x201c
ret
Function at 0x404fd0
Capabilities:
Create directory

Disassembly:
sub esp, 0x208
push ebx
mov ebx, dword [esp + 0x210]
push ebp
xor ebp, ebp
push esi
push edi
test ebx, ebx
jne 0x404ff7
pop edi
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x208
ret
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
test ecx, ecx
jle 0x40512f
cmp ecx, 0x104
jg 0x40512f
push eax
push ebx
call fcn.0040c7cf
add esp, 8
test eax, eax
jne 0x405030
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x114]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov al, byte [ebx]
and ecx, 3
cmp al, 0x5c
rep movsb byte es:[edi], byte [esi]
jne 0x405089
cmp byte [ebx + 1], 0x5c
jne 0x405089
lea ecx, [esp + 0x116]
push 0x41a5bc
push ecx
call fcn.0040d5ae
add esp, 8
lea edx, [esp + 0x10]
push 0x41a5bc
push eax
push str._s_s
push edx
jmp 0x4050ae
lea eax, [esp + 0x114]
push 0x41a5bc
push eax
call fcn.0040d5ae
add esp, 8
lea ecx, [esp + 0x10]
push 0x41a5bc
push eax
push 0x41a5b4
push ecx
call fcn.0040d2c3
add esp, 0x10
push 0x41a5bc
push 0
call fcn.0040d5ae
add esp, 8
test eax, eax
je 0x405122
mov esi, dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x41a5bc
lea edx, [esp + 0x14]
push eax
push edx
lea eax, [esp + 0x1c]
push str._s_s_s
push eax
call fcn.0040d2c3
add esp, 0x14
lea ecx, [esp + 0x10]
push 0
push ecx
call esi
test eax, eax
jne 0x40510d
call edi
mov ebp, eax
cmp ebp, 0xb7
jne 0x405122
jmp 0x40510f
xor ebp, ebp
push 0x41a5bc
push 0
call fcn.0040d5ae
add esp, 8
test eax, eax
jne 0x4050d5
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x208
ret
pop edi
pop esi
pop ebp
mov eax, 8
pop ebx
add esp, 0x208
ret
Function at 0x405480
Capabilities:
Copy file

Disassembly:
sub esp, 0x104
push ebx
push ebp
push esi
mov esi, dword [esp + 0x114]
xor ebp, ebp
test esi, esi
je 0x4055c7
mov ebx, dword [esp + 0x118]
test ebx, ebx
je 0x4055c7
push edi
mov edi, dword [esp + 0x120]
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4055ba
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
cmp ebp, 3
jne 0x405581
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, ebp
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [esp + ecx + 0x10]
lea ecx, [esp + 0x10]
cmp eax, ecx
jbe 0x4055ba
mov cl, byte [eax]
cmp cl, 0x5c
je 0x405535
cmp cl, 0x2f
je 0x405535
dec eax
lea edx, [esp + 0x10]
cmp eax, edx
ja 0x405513
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
lea ecx, [esp + 0x10]
cmp eax, ecx
jbe 0x4055ba
lea edx, [esp + 0x10]
push 0
push edx
mov byte [eax], 0
call fcn.00404fd0
add esp, 8
test eax, eax
jne 0x4055ba
mov eax, dword [esp + 0x120]
mov ecx, dword [esp + 0x118]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4055b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
cmp ebp, 5
jne 0x4055ba
push 0x80
push ebx
call fcn.0040d709
add esp, 8
test eax, eax
jne 0x4055ba
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x4055b8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebp, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
xor ebp, ebp
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x104
ret
pop esi
pop ebp
mov eax, 3
pop ebx
add esp, 0x104
ret

Function at 0x4055e0
Capabilities:
Delete file

Disassembly:
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebp
push esi
mov esi, dword [esp + 0x10]
push edi
push esi
xor edi, edi
call ebx
test eax, eax
jne 0x40562d
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebp
mov edi, eax
cmp edi, 5
jne 0x40562d
push 0x80
push esi
call fcn.0040d709
add esp, 8
test eax, eax
jne 0x40562d
push esi
call ebx
test eax, eax
jne 0x405626
call ebp
pop edi
pop esi
pop ebp
pop ebx
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
Function at 0x406c70
Capabilities:
Create process on windows
Create process suspended

Disassembly:
mov edx, dword [esp + 0x18]
sub esp, 0x10
lea eax, [ecx + 0x48]
add ecx, 4
push eax
mov eax, dword [esp + 0x1c]
push ecx
mov ecx, dword [esp + 0x2c]
push ecx
mov ecx, dword [esp + 0x28]
push edx
mov edx, dword [esp + 0x40]
push eax
mov eax, dword [esp + 0x40]
push ecx
mov ecx, dword [esp + 0x2c]
push edx
mov edx, dword [esp + 0x3c]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x406cdc
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0xc]
call fcn.00406b50
mov eax, dword [esp + 0xc]
lea ecx, [esp]
push 0x417280
push ecx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x416218
call fcn.0040d80e
add esp, 0x10
ret 0x20

Function at 0x408310
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, dword [ecx + 4]
sub esp, 0x10
cmp eax, 0xffffffff
push esi
push edi
je 0x408383
mov ecx, dword [esp + 0x28]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
push ecx
mov ecx, dword [esp + 0x20]
push edi
push edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
jne 0x408372
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x26
je 0x408379
push eax
lea ecx, [esp + 0x14]
call fcn.004085a0
mov edx, dword [esp + 0x14]
lea eax, [esp + 8]
push 0x4172f0
push eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0x41622c
call fcn.0040d80e
cmp dword [edi], 0
jne 0x408379
xor esi, esi
mov eax, esi
pop edi
pop esi
add esp, 0x10
ret 0x10
push 0xffffffffffffffff
lea ecx, [esp + 0x14]
call fcn.004085a0
mov ecx, dword [esp + 0x14]
lea edx, [esp + 8]
push 0x4172f0
push edx
mov dword [esp + 0x14], ecx
mov dword [esp + 0x10], 0x41622c
call fcn.0040d80e
nop
nop
nop

Function at 0x4083b0
Capabilities:
Write file on windows

Disassembly:
mov eax, dword [ecx + 4]
sub esp, 0x14
cmp eax, 0xffffffff
push esi
jne 0x4083e5
push eax
lea ecx, [esp + 0x14]
call fcn.004085a0
mov eax, dword [esp + 0x14]
lea ecx, [esp + 8]
push 0x4172f0
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x41622c
call fcn.0040d80e
mov edx, dword [esp + 0x28]
mov esi, dword [esp + 0x20]
lea ecx, [esp + 4]
push edx
mov edx, dword [esp + 0x20]
push ecx
push esi
push edx
push eax
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40843b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
call fcn.004085a0
mov eax, dword [esp + 0x14]
lea ecx, [esp + 8]
push 0x4172f0
push ecx
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], 0x41622c
call fcn.0040d80e
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 4]
test ecx, ecx
je 0x408449
mov dword [ecx], edx
cmp esi, edx
je 0x40847c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea ecx, [esp + 0x14]
call fcn.004085a0
mov edx, dword [esp + 0x14]
lea eax, [esp + 8]
push 0x4172f0
push eax
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], 0x41622c
call fcn.0040d80e
pop esi
add esp, 0x14
ret 0x10
Function at 0x409c20
Capabilities:
Encode data using xor

Disassembly:
push esi
mov esi, dword [esp + 0xc]
test esi, esi
jne 0x409c2f
xor eax, eax
pop esi
ret 0xc
mov eax, dword [0x41afd8]
test eax, eax
je 0x409c3d
call fcn.00409bc0
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
cmp edx, 8
push ebx
not eax
jb 0x409d3f
push edi
mov edi, edx
shr edi, 3
mov ecx, eax
xor ebx, ebx
mov bl, byte [esi]
and ecx, 0xff
xor ecx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [ecx*4 + 0x41f2c0]
sub edx, 8
xor eax, ebx
inc esi
mov ecx, eax
xor ebx, ebx
mov bl, byte [esi]
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov ecx, dword [ecx*4 + 0x41f2c0]
shr eax, 8
xor ecx, eax
inc esi
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov eax, dword [eax*4 + 0x41f2c0]
shr ecx, 8
xor eax, ecx
inc esi
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov ecx, dword [ecx*4 + 0x41f2c0]
shr eax, 8
xor ecx, eax
inc esi
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov eax, dword [eax*4 + 0x41f2c0]
shr ecx, 8
xor eax, ecx
inc esi
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov ecx, dword [ecx*4 + 0x41f2c0]
shr eax, 8
xor ecx, eax
inc esi
mov eax, ecx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [esi + 1]
mov eax, dword [eax*4 + 0x41f2c0]
shr ecx, 8
xor eax, ecx
inc esi
mov ecx, eax
and ecx, 0xff
xor ecx, ebx
shr eax, 8
mov ecx, dword [ecx*4 + 0x41f2c0]
xor eax, ecx
inc esi
dec edi
jne 0x409c57
pop edi
test edx, edx
je 0x409d61
mov ecx, eax
xor ebx, ebx
mov bl, byte [esi]
and ecx, 0xff
xor ecx, ebx
shr eax, 8
mov ecx, dword [ecx*4 + 0x41f2c0]
xor eax, ecx
inc esi
dec edx
jne 0x409d43
pop ebx
pop esi
not eax
ret 0xc
Function at 0x40c7cf
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x40c7ef
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040fdc1
pop ecx
or eax, 0xffffffff
ret
test al, 1
je 0x40c812
test byte [esp + 8], 2
je 0x40c812
call fcn.0040fe34
mov dword [eax], 0xd
call fcn.0040fe3d
mov dword [eax], 5
jmp 0x40c7eb
xor eax, eax
ret

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

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40d734
test byte [esp + 8], 0x80
je 0x40d723
and al, 0xfe
jmp 0x40d725
or al, 1
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
jne 0x40d745
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
call fcn.0040fdc1
pop ecx
or eax, 0xffffffff
ret
xor eax, eax
ret

Function at 0x40e6a5
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x41c3c8
cmp edx, dword [eax]
je 0x40e6c7
add eax, 8
inc ecx
cmp eax, 0x41c458
jl 0x40e6b8
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x41c3c8]
jne 0x40e7f5
mov eax, dword [0x41f784]
cmp eax, 1
je 0x40e7cf
test eax, eax
jne 0x40e6f8
cmp dword [0x41c3c4], 1
je 0x40e7cf
cmp edx, 0xfc
je 0x40e7f5
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40e72f
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00410df0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00410ee0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40e772
lea eax, [ebp - 0x1a4]
push eax
call fcn.00410ee0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x41a610
push edi
call fcn.00410cf0
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00410df0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00410e00
lea eax, [ebp - 0xa0]
push 0x416844
push eax
call fcn.00410e00
push dword [esi + 0x41c3cc]
lea eax, [ebp - 0xa0]
push eax
call fcn.00410e00
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00413c58
add esp, 0x2c
pop edi
jmp 0x40e7f5
lea eax, [ebp + 8]
lea esi, [esi + 0x41c3cc]
push 0
push eax
push dword [esi]
call fcn.00410ee0
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 0x404548
Capabilities:
Accept command line arguments

Disassembly:
push ebx
push esi
push edi
add esp, 0xfffffdf4
mov ebx, edx
mov esi, eax
mov eax, ebx
xor edx, edx
call fcn.0040682c
test esi, esi
jne 0x404580
push 0x105
lea eax, [esp + 4]
push eax
push 0
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, eax
mov edx, esp
mov eax, ebx
call fcn.00406968
jmp 0x40459e
call sub.kernel32.dll_GetCommandLineW
mov edi, eax
mov edx, ebx
mov eax, edi
call fcn.0040448c
mov edi, eax
test esi, esi
je 0x40459e
cmp dword [ebx], 0
je 0x40459e
dec esi
jmp 0x404587
add esp, 0x20c
pop edi
pop esi
pop ebx
ret

Function at 0x405df0
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x4aa050], 0
je 0x405e51
cmp word [0x4aa32c], 0xd7b2
jne 0x405e19
cmp dword [0x4aa334], 0
jbe 0x405e19
mov eax, 0x4aa328
call dword [0x4aa344]
push 0
lea eax, [esp + 4]
push eax
push 0x1d
push str.Runtime_error_____at_00000000
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
push 0
lea eax, [esp + 4]
push eax
push 2
push 0x405e7c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x4a7030], 0
jne 0x405e6d
push 0
push str.Error
push str.Runtime_error_____at_00000000
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret

Function at 0x405fdc
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
mov dword [ebp - 4], edx
mov edi, eax
mov esi, dword [ebp + 0x10]
cmp dword [0x4a7034], 0
je 0x406002
mov edx, esi
mov eax, ebx
call dword [0x4a7034]
jmp 0x406011
mov eax, 8
call fcn.004041d4
mov dword [eax], ebx
mov dword [eax + 4], esi
mov byte [0x4aa051], 1
mov edx, dword [ebp + 8]
push edx
mov edx, dword [ebp + 0xc]
push edx
push eax
mov eax, 0x405fa4
push eax
mov eax, dword [ebp - 4]
push eax
push edi
call sub.kernel32.dll_CreateThread
pop edi
pop esi
pop ebx
pop ecx
pop ebp
ret 0xc