joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40575c
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x445810
push esi
call fcn.00405b88
push esi
call fcn.0040570f
mov edi, eax
test edi, edi
jne 0x40577d
xor eax, eax
jmp 0x4057cf
push edi
call fcn.00405dea
test byte [0x451bb8], 0x80
je 0x405796
mov al, byte [edi]
test al, al
je 0x405779
cmp al, 0x5c
je 0x405779
sub edi, esi
jmp 0x4057ae
call fcn.00405e83
test eax, eax
je 0x4057a8
test byte [eax], 0x10
je 0x405779
push esi
call fcn.004056c2
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40579a
call fcn.0040567b
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x405840
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 0x40585c
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x40585f
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x40588e
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x4058d2
test edi, edi
jne 0x405899
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x4058cc
Function at 0x4058d6
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.00405eaa
test eax, eax
mov esi, dword [esp + 0x18]
je 0x4058fa
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x405a33
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x448198], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x448198
je 0x40593e
push 1
push 0
push esi
call fcn.0040585f
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x405a39
cmp eax, edi
jg 0x405a39
mov esi, 0x447c10
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x405a39
cmp eax, edi
jg 0x405a39
push esi
push ebp
push str._s_s_r_n
push 0x447810
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x451bb0]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.00405baa
push 4
push 0xc0000000
push esi
call fcn.0040585f
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x405a33
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x405a2c
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x405a2c
cmp edi, dword [esp + 0x18]
jne 0x405a2c
push str._Rename__r_n
push esi
call fcn.004057d4
test eax, eax
jne 0x405a40
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.00405b88
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x447810
push eax
call fcn.00405820
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x451c30]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409350
push eax
call fcn.004057d4
test eax, eax
je 0x4059f7
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x405a67
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x405a5c
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x4059f9
Function at 0x405a6f
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405ae0
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x2000
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405acf
cmp dword [ebp + 0x14], 1
je 0x405ad1
cmp dword [ebp + 0x14], 2
je 0x405ad1
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x1fff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x405f16
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x44859c], 0
push esi
jne 0x405f4d
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405f27
mov dword [ecx*4 + 0x448598], eax
inc ecx
cmp ecx, 0x100
jl 0x405f22
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405f7e
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x448598]
xor eax, esi
inc ecx
dec edx
jne 0x405f60
pop edi
not eax
pop esi
ret 0xc

Function at 0xae92c0
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.00ae9410
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0xae92e6
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xae92d2
add dl, dl
jne 0xae92f1
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xae9344
xor eax, eax
add dl, dl
jne 0xae92fe
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0xae93e5
add dl, dl
jne 0xae930d
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xae9318
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xae9323
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xae932e
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0xae933a
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0xae92dd
mov eax, 1
add dl, dl
jne 0xae9352
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0xae935d
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xae9349
sub eax, ebx
mov ebx, 1
jne 0xae9390
mov ecx, 1
add dl, dl
jne 0xae9376
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xae9381
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xae936d
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xae92dd
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0xae93a7
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0xae93b2
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0xae939e
cmp eax, 0x7d00
jae 0xae93d5
cmp eax, 0x500
jb 0xae93d0
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xae92dd
cmp eax, 0x7f
ja 0xae93d8
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0xae92dd
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0xae9406
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 0xae92dd
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x401000
Capabilities:
Create pipe

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push esi
push 0x14
call fcn.004031b5
add esp, 4
push 1
push eax
mov dword [ebp - 8], eax
call dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
mov eax, dword [ebp - 8]
push 0
push 0
push 1
push eax
call dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
mov edx, dword [ebp + 8]
lea ecx, [ebp - 0xc]
push ecx
push 0
push 0x100
push 0x100
push 0xff
push 6
push 3
push edx
mov dword [ebp - 0xc], 0xc
mov dword [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov esi, eax
mov eax, dword [ebp - 8]
test eax, eax
je 0x401070
push eax
call fcn.00403249
add esp, 4
cmp esi, 0xffffffff
jne 0x40107c
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov eax, esi
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x401220
Capabilities:
Check mutex on windows

Disassembly:
cmp dword [0x416040], 0
jne 0x4012db
push str.MoticamListMutex20121024
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
push 0x2710
push eax
mov dword [0x416044], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x40126d
mov eax, dword [0x416044]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x416044], 0
xor al, al
ret
push str.MoticamListMem20121024
push 1
push 6
mov byte [0x416048], 1
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [0x416040], eax
test eax, eax
je 0x401291
cmp eax, 0xffffffff
jne 0x4012db
push str.MoticamListMem20121024
push 0x100
push 0
push 4
push 0
push 0xffffffffffffffff
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [0x416040], eax
test eax, eax
je 0x4012de
cmp eax, 0xffffffff
je 0x4012de
push esi
call fcn.00401480
mov esi, eax
test esi, esi
je 0x4012da
push 0x100
push 0
push esi
call fcn.00406bb0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop esi
mov al, 1
ret
mov dword [0x416040], 0
xor al, al
ret

Function at 0x401480
Capabilities:
Read file via mapping

Disassembly:
cmp byte [0x416048], 0
push 0
push 0
push 0
je 0x4014a1
mov eax, dword [0x416040]
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
ret
mov ecx, dword [0x416040]
push 4
push ecx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
ret
Function at 0x401870
Capabilities:
Create pipe
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x258
mov eax, dword [0x41403c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x41604c]
push esi
push edi
push eax
push str..pipeMoticamNamedPipe_
push 0x412318
mov edi, ecx
lea ecx, [ebp - 0x44]
push 0x20
push ecx
call fcn.004034f5
lea edx, [ebp - 0x44]
push edx
call section..text
mov esi, eax
add esp, 0x18
test esi, esi
je 0x401982
push ebx
push 0x104
lea eax, [ebp - 0x24c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0
push 0
push edi
lea ecx, [ebp - 0x24c]
push ecx
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteW]
mov edi, dword [sym.imp.ADVAPI32.dll_InitializeSecurityDescriptor]
mov ebx, dword [sym.imp.ADVAPI32.dll_SetSecurityDescriptorDacl]
call fcn.004019a0
test al, al
je 0x401981
push 0x14
call fcn.004031b5
add esp, 4
push 1
push eax
mov dword [ebp - 0x254], eax
call edi
mov edx, dword [ebp - 0x254]
push 0
push 0
push 1
push edx
call ebx
lea eax, [ebp - 0x258]
push eax
push 0
push 0x100
push 0x100
push 0xff
push 6
push 3
lea ecx, [ebp - 0x44]
push ecx
mov dword [ebp - 0x258], 0xc
mov dword [ebp - 0x250], 1
call dword [sym.imp.KERNEL32.dll_CreateNamedPipeW]
mov esi, eax
mov eax, dword [ebp - 0x254]
test eax, eax
je 0x401972
push eax
call fcn.00403249
add esp, 4
cmp esi, 0xffffffff
jne 0x401979
xor esi, esi
test esi, esi
jne 0x4018f2
pop ebx
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.004031a6
mov esp, ebp
pop ebp
ret

Function at 0x4019a0
Capabilities:
Connect pipe
Create thread
Write file on windows
Write pipe

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40f9f8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
mov eax, dword [0x41403c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push esi
call dword [sym.imp.KERNEL32.dll_ConnectNamedPipe]
test eax, eax
je 0x401a4f
call fcn.00401cc0
push 0
test al, al
je 0x401a33
lea eax, [ebp - 0x14]
push eax
push 1
lea ecx, [ebp - 0xd]
push ecx
push esi
mov byte [ebp - 0xd], 1
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x416054
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
inc dword [0x41606c]
push 0x416054
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0
push 0
push esi
push 0x4014c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x14]
push edx
push 1
lea eax, [ebp - 0xd]
push eax
push esi
mov byte [ebp - 0xd], 0
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret
Function at 0x401a60
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x40f9bb
mov eax, dword fs:[0]
push eax
sub esp, 0x114
mov eax, dword [0x41403c]
xor eax, esp
mov dword [esp + 0x10c], eax
push ebx
push esi
mov eax, dword [0x41403c]
xor eax, esp
push eax
lea eax, [esp + 0x120]
mov dword fs:[0], eax
mov ebx, dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, ecx
push 0
lea eax, [esp + 0x10]
push eax
push 0x100
lea ecx, [esp + 0x20]
push ecx
push esi
mov dword [esp + 0x20], 0
call ebx
cmp eax, 1
jne 0x401aff
cmp dword [esp + 0xc], 0x100
jne 0x401aff
mov ecx, esi
lea edx, [esp + 0x14]
call fcn.00401b70
cmp eax, 0xffffffff
je 0x401aff
test eax, eax
jne 0x401aa7
push eax
lea edx, [esp + 0x14]
push edx
push 0x100
lea eax, [esp + 0x20]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x401aa7
push 0x416054
mov dword [esp + 0x14], 0x416054
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [esp + 0x128], 0
mov eax, dword [0x41606c]
dec eax
mov dword [0x41606c], eax
test eax, eax
jg 0x401b36
mov esi, 0x416074
call fcn.00402d00
push 0x416054
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x120]
mov dword fs:[0], ecx
pop ecx
pop esi
pop ebx
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.004031a6
mov esp, ebp
pop ebp
ret

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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x110
mov eax, dword [0x41403c]
xor eax, esp
mov dword [esp + 0x10c], eax
mov eax, dword [0x416070]
push esi
push edi
mov edi, dword [sym.imp.MUCam32.dll_MUCam_isConnected]
test eax, eax
je 0x401d8a
push 0
lea ecx, [esp + 0x10]
push ecx
push 0x100
lea edx, [esp + 0x1c]
push edx
push eax
mov esi, eax
mov word [esp + 0x24], 0x515
call dword [sym.imp.KERNEL32.dll_WriteFile]
cmp eax, 1
jne 0x401d3f
cmp dword [esp + 0xc], 0x100
jne 0x401d3f
push 0
lea eax, [esp + 0x10]
push eax
push 0x100
lea ecx, [esp + 0x1c]
push ecx
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [esp + 0x11], 0
jne 0x401d63
xor eax, eax
cmp byte [esp + 0x12], al
setne al
pop edi
pop esi
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.004031a6
mov esp, ebp
pop ebp
ret
mov eax, dword [0x416074]
mov dword [0x416070], 0
test eax, eax
je 0x401d80
push eax
call edi
add esp, 4
test al, al
jne 0x401d8a
mov ecx, 0x416074
call fcn.004021d0
mov eax, dword [0x416074]
test eax, eax
jne 0x401da9
xor al, al
pop edi
pop esi
mov ecx, dword [esp + 0x10c]
xor ecx, esp
call fcn.004031a6
mov esp, ebp
pop ebp
ret
push eax
call edi
mov ecx, dword [esp + 0x118]
add esp, 4
pop edi
pop esi
xor ecx, esp
call fcn.004031a6
mov esp, ebp
pop ebp
ret
Function at 0x401dd0
Capabilities:
Get process image filename
Read file on windows
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x420
mov eax, dword [0x41403c]
xor eax, ebp
mov dword [ebp - 4], eax
call fcn.00401220
test al, al
je 0x401fd1
push esi
push edi
call fcn.004012f0
xor edi, edi
cmp eax, edi
jne 0x401e50
cmp byte [0x416048], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
jne 0x401e1e
mov eax, dword [0x416040]
cmp eax, edi
je 0x401e1e
push eax
call esi
mov dword [0x416040], edi
mov eax, dword [0x416044]
cmp eax, edi
je 0x401fcf
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov eax, dword [0x416044]
push eax
call esi
mov dword [0x416044], edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004031a6
mov esp, ebp
pop ebp
ret
mov ecx, 0x415f40
xor esi, esi
sub ecx, eax
push ebx
mov ebx, eax
mov dword [ebp - 0x41c], ecx
test byte [ebx + 4], 1
je 0x401f77
mov ecx, dword [ebx]
push ecx
push str..pipeMoticamNamedPipe_
push str._s_d
lea edx, [ebp - 0x20c]
push 0x104
push edx
call fcn.004034f5
add esp, 0x14
lea edi, [ebp - 0x20c]
call fcn.00401090
mov edi, eax
test edi, edi
je 0x401ef0
push 0
lea eax, [ebp - 0x420]
push eax
push 1
lea ecx, [ebp - 0x415]
push ecx
push edi
mov byte [ebp - 0x415], 0
mov dword [ebp - 0x420], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp byte [ebp - 0x415], 1
je 0x401ed6
call fcn.00401360
push edi
call dword [sym.imp.KERNEL32.dll_FlushFileBuffers]
push edi
call dword [sym.imp.KERNEL32.dll_DisconnectNamedPipe]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x401f77
mov eax, dword [ebx]
push eax
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
test edi, edi
je 0x401f3a
push 0x104
lea edx, [ebp - 0x414]
push edx
push edi
call dword [sym.imp.PSAPI.DLL_GetProcessImageFileNameW]
lea eax, [ebp - 0x414]
push str.MoticamHandler.exe
push eax
call fcn.00403495
add esp, 8
test eax, eax
je 0x401f3a
push 0
push edi
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
cmp byte [0x416048], 0
je 0x401f77
cmp dword [0x416040], 0
je 0x401f77
cmp esi, 0x1f
ja 0x401f77
call fcn.00401480
test eax, eax
je 0x401f77
mov edx, dword [ebp - 0x41c]
xor ecx, ecx
mov dword [eax + esi*8], ecx
mov dword [eax + esi*8 + 4], ecx
mov dword [edx + ebx], ecx
push eax
mov dword [edx + ebx + 4], ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
inc esi
add ebx, 8
cmp esi, 0x20
jl 0x401e62
cmp byte [0x416048], 0
pop ebx
jne 0x401fa8
mov eax, dword [0x416040]
test eax, eax
je 0x401fa8
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x416040], 0
mov eax, dword [0x416044]
test eax, eax
je 0x401fcf
push eax
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov ecx, dword [0x416044]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [0x416044], 0
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004031a6
mov esp, ebp
pop ebp
ret
Function at 0x402d00
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esi + 0x108]
push ebx
xor ebx, ebx
push edi
mov byte [esi + 0x104], bl
cmp eax, ebx
je 0x402d48
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x402d35
mov eax, dword [esi + 0x108]
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x108], ebx
mov eax, dword [esi]
cmp eax, ebx
je 0x402d58
push eax
call dword [sym.imp.MUCam32.dll_MUCam_closeCamera]
add esp, 4
mov edi, dword [esi + 0x100]
cmp edi, ebx
je 0x402d8a
mov eax, dword [edi]
cmp eax, ebx
je 0x402d7b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [edi + 8]
push edx
mov dword [edi], ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call fcn.00403513
add esp, 4
mov dword [esi + 0x100], ebx
pop edi
mov byte [esi + 0xf8], bl
mov dword [esi + 0xfc], ebx
pop ebx
ret

Function at 0x403040
Capabilities:
Create thread

Disassembly:
mov eax, dword [esi]
push eax
call dword [sym.imp.MUCam32.dll_MUCam_getFrameFormat]
add esp, 4
cmp eax, 6
jne 0x40305a
mov byte [esi + 0x11d], 1
jmp 0x403061
mov byte [esi + 0x11d], 3
movzx ecx, word [esi + 0x11a]
movzx eax, byte [esi + 0x11c]
movzx edx, word [esi + 0x118]
imul eax, ecx
movzx ecx, byte [esi + 0x11d]
imul eax, edx
imul eax, ecx
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [esi + 0x10c], 1
mov dword [esi + 0x114], eax
cmp eax, 0xa
jb 0x4030ed
mov eax, dword [esi + 0x120]
test eax, eax
je 0x4030b7
push eax
call fcn.00403513
add esp, 4
mov edx, dword [esi + 0x114]
push edx
call fcn.004036e7
add esp, 4
push 0
push 0
push esi
push 0x402120
push 0
push 0
mov dword [esi + 0x120], eax
mov byte [esi + 0x104], 1
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi + 0x108], eax
ret

Function at 0x4030f0
Capabilities:
Terminate thread

Disassembly:
mov eax, dword [esi + 0x108]
mov byte [esi + 0x104], 0
test eax, eax
je 0x40313a
push 0xbb8
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x403123
mov eax, dword [esi + 0x108]
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov ecx, dword [esi + 0x108]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x108], 0
ret

Function at 0x4031a6
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x41403c]
jne 0x4031b0
repz ret
jmp fcn.00403907
Function at 0x40691b
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x41403c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
push esi
push edi
mov dword [ebp - 0x1c], eax
call fcn.00405d99
and dword [ebp - 0x14], 0
cmp dword [0x415ea8], 0
mov dword [ebp - 0x18], eax
jne 0x4069ce
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ebx, eax
test ebx, ebx
je 0x406a76
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxW
push ebx
call edi
test eax, eax
je 0x406a76
mov esi, dword [sym.imp.KERNEL32.dll_EncodePointer]
push eax
call esi
push str.GetActiveWindow
push ebx
mov dword [0x415ea8], eax
call edi
push eax
call esi
push str.GetLastActivePopup
push ebx
mov dword [0x415eac], eax
call edi
push eax
call esi
push str.GetUserObjectInformationW
push ebx
mov dword [0x415eb0], eax
call edi
push eax
call esi
mov dword [0x415eb8], eax
test eax, eax
je 0x4069ce
push str.GetProcessWindowStation
push ebx
call edi
push eax
call esi
mov dword [0x415eb4], eax
mov eax, dword [0x415eb4]
mov ecx, dword [ebp - 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_DecodePointer]
cmp eax, ecx
je 0x406a27
cmp dword [0x415eb8], ecx
je 0x406a27
push eax
call esi
push dword [0x415eb8]
mov edi, eax
call esi
mov ebx, eax
test edi, edi
je 0x406a27
test ebx, ebx
je 0x406a27
call edi
test eax, eax
je 0x406a1e
lea ecx, [ebp - 0x24]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call ebx
test eax, eax
je 0x406a1e
test byte [ebp - 8], 1
jne 0x406a27
or dword [ebp + 0x10], 0x200000
jmp 0x406a5a
mov eax, dword [0x415eac]
cmp eax, dword [ebp - 0x18]
je 0x406a5a
push eax
call esi
test eax, eax
je 0x406a5a
call eax
mov dword [ebp - 0x14], eax
test eax, eax
je 0x406a5a
mov eax, dword [0x415eb0]
cmp eax, dword [ebp - 0x18]
je 0x406a5a
push eax
call esi
test eax, eax
je 0x406a5a
push dword [ebp - 0x14]
call eax
mov dword [ebp - 0x14], eax
push dword [0x415ea8]
call esi
test eax, eax
je 0x406a76
push dword [ebp + 0x10]
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push dword [ebp - 0x14]
call eax
jmp 0x406a78
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004031a6
leave
ret