joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401560
Capabilities:
Delete file

Disassembly:
push 0xffffffffffffffff
push 0x40ace4
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0x10], esi
mov dword [esi], 0x40c7d4
mov ecx, dword [esi + 8]
mov dword [esp + 0x1c], 2
test ecx, ecx
je 0x4015a2
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [esi + 8], 0
mov eax, dword [esi + 0x1f4c]
mov ebx, dword [sym.imp.KERNEL32.dll_DeleteFileA]
lea edi, [esi + 0x1f4c]
push eax
call ebx
mov eax, dword [esi + 0x1f50]
lea ebp, [esi + 0x1f50]
push eax
call ebx
mov ecx, ebp
mov byte [esp + 0x1c], 1
call sub.MFC42.DLL_CString::CString
mov ecx, edi
mov byte [esp + 0x1c], 0
call sub.MFC42.DLL_CString::CString
push sub.MFC42.DLL_CString::CString
push 5
add esi, 0x1f38
push 4
push esi
mov dword [esp + 0x2c], 0xffffffff
call fcn.00409950
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x401980
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3c
push ebx
push esi
mov esi, dword [esp + 0x48]
push edi
push 0
push 0
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov edi, dword [sym.imp.MSVCRT.dll_fread]
push esi
push 1
lea eax, [esp + 0x24]
push 0xe
push eax
call edi
push esi
push 1
lea ecx, [esp + 0x44]
push 0x28
push ecx
call edi
mov ecx, dword [esp + 0x5a]
mov ebx, dword [esp + 0x50]
and ecx, 0xffff
add esp, 0x2c
imul ecx, ebx
lea eax, [ecx + 0x1f]
and al, 0xe0
cdq
and edx, 7
add eax, edx
mov edi, eax
mov eax, ecx
cdq
and edx, 7
add eax, edx
lea edx, [ebx + ebx*2]
sar edi, 3
sar eax, 3
sub edi, eax
mov eax, dword [esp + 0x28]
dec eax
mov dword [esp + 0xc], edx
test eax, eax
jl 0x401a41
mov ecx, dword [esp + 0x5c]
mov edx, dword [esp + 0x50]
push ebp
lea ebx, [ecx*4]
sub ebx, ecx
imul ecx, eax
lea edx, [edx + ecx*2]
neg ebx
add ecx, edx
inc eax
mov ebp, ecx
mov dword [esp + 0x50], eax
mov eax, dword [esp + 0x10]
push esi
push 1
push eax
push ebp
call dword [sym.imp.MSVCRT.dll_fread]
push 1
push edi
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
mov eax, dword [esp + 0x6c]
add esp, 0x1c
add ebp, ebx
dec eax
mov dword [esp + 0x50], eax
jne 0x401a17
pop ebp
pop edi
pop esi
pop ebx
add esp, 0x3c
ret 0x1c

Function at 0x401e10
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
mov al, 0x46
mov edx, 0x100
mov byte [esp + 5], al
mov byte [esp + 7], al
xor al, al
mov word [esp], 0xe0ff
mov byte [esp + 8], al
mov byte [esp + 0xb], al
mov byte [esp + 0x10], al
mov byte [esp + 0x11], al
mov eax, dword [ecx + 4]
lea ecx, [esp]
push eax
push 1
push 0x12
push ecx
mov word [esp + 0x12], 0x1000
mov byte [esp + 0x14], 0x4a
mov byte [esp + 0x16], 0x49
mov word [esp + 0x19], 0x101
mov word [esp + 0x1c], dx
mov word [esp + 0x1e], dx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x24
ret

Function at 0x401e80
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x48
push ebx
push ebp
mov ebx, ecx
push esi
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
push edi
mov eax, dword [ebx + 4]
lea esi, [ebx + 0x101c]
mov ecx, 0x10
lea edi, [esp + 0x15]
mov word [esp + 0x10], 0xdbff
mov word [esp + 0x12], 0x4300
mov byte [esp + 0x14], 0
push eax
rep movsd dword es:[edi], dword [esi]
push 1
lea ecx, [esp + 0x18]
push 0x45
push ecx
call ebp
mov edx, dword [ebx + 4]
lea esi, [ebx + 0x105c]
push edx
mov ecx, 0x10
lea edi, [esp + 0x29]
push 1
lea eax, [esp + 0x28]
mov byte [esp + 0x2c], 1
push 0x45
push eax
rep movsd dword es:[edi], dword [esi]
call ebp
add esp, 0x20
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret
Function at 0x401f00
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x14
mov ax, word [ecx + 0x14]
push ebx
mov edx, eax
mov word [esp + 4], 0xc0ff
and edx, 0xffff
mov word [esp + 6], 0x1100
and edx, 0x800000ff
mov byte [esp + 8], 8
jns 0x401f33
dec edx
or edx, 0xffffff00
inc edx
xor ebx, ebx
movzx dx, dl
mov bl, ah
xor ax, ax
shl edx, 8
mov al, bl
add edx, eax
mov ax, word [ecx + 0x10]
mov word [esp + 9], dx
mov edx, eax
and edx, 0xffff
and edx, 0x800000ff
jns 0x401f66
dec edx
or edx, 0xffffff00
inc edx
xor ebx, ebx
mov ecx, dword [ecx + 4]
movzx dx, dl
mov bl, ah
xor ax, ax
shl edx, 8
mov al, bl
push ecx
add edx, eax
mov al, 3
mov word [esp + 0xf], dx
mov edx, 1
mov byte [esp + 0x12], dl
mov byte [esp + 0x17], dl
mov byte [esp + 0x1a], dl
push edx
mov byte [esp + 0x15], al
mov byte [esp + 0x1c], al
lea edx, [esp + 0xc]
mov al, 0x11
push 0x13
push edx
mov byte [esp + 0x20], 0
mov byte [esp + 0x21], 2
mov byte [esp + 0x22], al
mov byte [esp + 0x25], al
mov byte [esp + 0x1f], al
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
pop ebx
add esp, 0x14
ret
Function at 0x401fd0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x1c
mov edx, dword [0x40c629]
push ebx
mov eax, dword [0x40c621]
push esi
mov esi, ecx
push edi
mov ecx, dword [0x40c625]
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c62d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x20], 0xc4ff
mov word [esp + 0x22], 0x1f00
mov byte [esp + 0x24], 0
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c634]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40202b
mov ecx, dword [0x40c645]
mov edx, dword [0x40c649]
mov eax, dword [0x40c641]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c64d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 1
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c654]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xb
jbe 0x40208c
mov ecx, dword [0x40c665]
mov edx, dword [0x40c669]
mov eax, dword [0x40c661]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c66d]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov word [esp + 0x22], 0xb500
mov byte [esp + 0x24], 0x10
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c674]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x4020f4
mov ecx, dword [0x40c71d]
mov edx, dword [0x40c721]
mov eax, dword [0x40c719]
mov dword [esp + 0x19], ecx
mov ecx, dword [esi + 4]
mov dword [esp + 0x1d], edx
push ecx
mov dword [esp + 0x19], eax
mov eax, dword [0x40c725]
push 1
lea edx, [esp + 0x18]
push 0x15
push edx
mov byte [esp + 0x24], 0x11
mov dword [esp + 0x31], eax
call edi
add esp, 0x10
xor ebx, ebx
mov ecx, dword [esi + 4]
mov al, byte [ebx + 0x40c72c]
push ecx
push 1
lea edx, [esp + 0x17]
push 1
push edx
mov byte [esp + 0x1f], al
call edi
add esp, 0x10
inc ebx
cmp ebx, 0xa1
jbe 0x402158
pop edi
pop esi
pop ebx
add esp, 0x1c
ret

Function at 0x402190
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x10
xor al, al
mov dl, 0x11
mov byte [esp + 6], al
mov byte [esp + 0xb], al
mov byte [esp + 0xd], al
mov eax, dword [ecx + 4]
push eax
push 1
lea ecx, [esp + 8]
push 0xe
push ecx
mov word [esp + 0x10], 0xdaff
mov word [esp + 0x12], 0xc00
mov byte [esp + 0x14], 3
mov byte [esp + 0x15], 1
mov byte [esp + 0x17], 2
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], 3
mov byte [esp + 0x1a], dl
mov byte [esp + 0x1c], 0x3f
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x20
ret
Function at 0x402ec0
Capabilities:
Write file on windows

Disassembly:
push ecx
mov al, byte [esp + 0xc]
push esi
dec al
mov esi, ecx
js 0x402f74
movsx eax, al
push ebp
push edi
mov edi, dword [sym.imp.MSVCRT.dll_fwrite]
lea ebp, [eax*2 + 0x40c500]
inc eax
mov dword [esp + 0xc], eax
mov ax, word [ebp]
mov edx, dword [esp + 0x14]
and eax, edx
test ax, ax
je 0x402f07
movsx ecx, byte [esi + 1]
mov al, byte [esi]
mov dl, byte [ecx*2 + 0x40c500]
or al, dl
mov byte [esi], al
mov al, byte [esi + 1]
sub ebp, 2
dec al
mov byte [esi + 1], al
jns 0x402f63
mov al, byte [esi]
cmp al, 0xff
jne 0x402f46
mov byte [esp + 0x18], al
mov eax, dword [esi + 4]
push eax
push 1
lea ecx, [esp + 0x20]
push 1
push ecx
call edi
mov edx, dword [esi + 4]
lea eax, [esp + 0x28]
push edx
push 1
push 1
push eax
mov byte [esp + 0x38], 0
call edi
add esp, 0x20
jmp 0x402f5c
mov ecx, dword [esi + 4]
lea edx, [esp + 0x18]
push ecx
push 1
push 1
push edx
mov byte [esp + 0x28], al
call edi
add esp, 0x10
mov byte [esi + 1], 7
mov byte [esi], 0
mov eax, dword [esp + 0xc]
dec eax
mov dword [esp + 0xc], eax
jne 0x402ee7
pop edi
pop ebp
pop esi
pop ecx
ret 8
Function at 0x4036d0
Capabilities:
Capture webcam image

Disassembly:
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x1f54]
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
push 0
push 0
push 0
push 0
push esi
push 0x4037f0
call sub.MFC42.DLL_AfxBeginThread
mov eax, dword [esi + 0x1f58]
test eax, eax
jne 0x403719
push 0
push 0
push 1
push 1
push 0
push 0
push 0
push 0
call sub.AVICAP32.dll_capCreateCaptureWindowA
mov dword [esi + 0x1f58], eax
mov ecx, dword [esi + 0x1f58]
push ebx
mov ebx, dword [sym.imp.USER32.dll_IsWindow]
push ecx
call ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
test eax, eax
je 0x40379c
mov edx, dword [esi + 0x1f58]
push 0
push 0
push 0x40a
push edx
call edi
test eax, eax
je 0x40379c
mov eax, dword [esi + 0x1f58]
push eax
call ebx
test eax, eax
je 0x403768
mov ecx, dword [esi + 0x1f58]
push 0
push 0
push 0x43d
push ecx
call edi
mov edx, dword [esi + 0x1f58]
push edx
call ebx
test eax, eax
je 0x403791
lea ecx, [esi + 0x1f4c]
call sub.MFC42.DLL_CString::LockBuffer
push eax
mov eax, dword [esi + 0x1f58]
push 0
push 0x419
push eax
call edi
lea ecx, [esi + 0x1f4c]
call sub.MFC42.DLL_CString::UnlockBuffer
mov ecx, dword [esi + 0x1f58]
push ecx
call ebx
test eax, eax
pop ebx
je 0x4037d2
mov edx, dword [esi + 0x1f58]
push 0
push 0
push 0x40b
push edx
call edi
mov edi, eax
mov eax, dword [esi + 0x1f54]
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, edi
pop edi
pop esi
ret 4
mov eax, dword [esi + 0x1f54]
xor edi, edi
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, edi
pop edi
pop esi
ret 4
Function at 0x4039d0
Capabilities:
Accept command line arguments
Get common file path

Disassembly:
sub esp, 0x304
push ebx
push ebp
push esi
mov esi, dword [esp + 0x314]
mov ebx, ecx
push edi
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
mov dword [ebx], 0x40c868
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov edi, dword [esp + 0x320]
mov dword [0x410974], eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
call sub.MFC42.DLL_operatornew
mov dword [0x410978], eax
mov edi, esi
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.MSVCRT.dll__strlwr]
mov eax, ecx
mov esi, edi
mov edi, dword [0x410974]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x410974]
push ecx
call ebp
mov edi, dword [esp + 0x328]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [0x410978]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x410978]
push eax
call ebp
mov ecx, dword [esp + 0x330]
add esp, 0x10
lea edx, [esp + 0x214]
mov dword [0x4100ec], ecx
push 0xff
push edx
push 0
mov dword [ebx + 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [esp + 0x14]
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
lea edi, [esp + 0x14]
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov byte [esp + ecx + 0x17], al
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.MSVCRT.dll_strrchr]
mov edx, eax
or ecx, 0xffffffff
xor eax, eax
lea esi, [esp + 0x11c]
lea edi, [edx + 1]
mov dword [esp + 0x18], esi
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x11c]
mov byte [edx], 0
push ecx
call ebp
add esp, 0xc
push str.flash
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
call dword [sym.imp.MSVCRT.dll_strstr]
mov edi, dword [0x410978]
mov esi, eax
add esp, 8
lea eax, [esp + 0x114]
neg esi
sbb esi, esi
neg esi
mov dl, byte [eax]
mov cl, dl
cmp dl, byte [edi]
jne 0x403b69
test cl, cl
je 0x403b65
mov dl, byte [eax + 1]
mov cl, dl
cmp dl, byte [edi + 1]
jne 0x403b69
add eax, 2
add edi, 2
test cl, cl
jne 0x403b45
xor edi, edi
jmp 0x403b6e
sbb edi, edi
sbb edi, 0xffffffff
lea eax, [esp + 0x14]
push eax
call fcn.00404430
cmp eax, 0x20
jle 0x403ba2
test esi, esi
jne 0x403bb0
test edi, edi
je 0x403bb0
push 5
push 0x521
mov ecx, ebx
call fcn.00404a80
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
mov ecx, ebx
mov dword [ebx + 0xc], 1
call fcn.00403d70
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
add esp, 0x304
ret 0xc
Function at 0x403d70
Capabilities:
Get common file path

Disassembly:
sub esp, 0x38
push ebx
push esi
xor esi, esi
push edi
mov edi, ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
lea eax, [esp + 0x14]
push eax
mov dword [esp + 0x18], 0x30
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], 0x403ce0
mov dword [esp + 0x24], esi
mov dword [esp + 0x28], esi
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], esi
mov dword [esp + 0x34], esi
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], esi
mov dword [esp + 0x40], str.AStuckWnd
mov dword [esp + 0x44], esi
call dword [sym.imp.USER32.dll_RegisterClassExA]
push esi
push ebx
push esi
push esi
push esi
push esi
push esi
push esi
push esi
push 0x410128
push str.AStuckWnd
push esi
call dword [sym.imp.USER32.dll_CreateWindowExA]
cmp eax, esi
mov dword [edi + 4], eax
jne 0x403df4
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x38
ret
lea ecx, [esp + 0xc]
mov dword [esp + 0x10], 1
push ecx
push esi
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x403e4d
push str.Shell32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
cmp ebx, esi
je 0x403e4d
push str.SHChangeNotifyRegister
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [edi + 4]
lea edx, [esp + 0xc]
push edx
push 1
push 0x458
push 0x100
push 2
push ecx
call eax
push ebx
mov dword [edi + 8], eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [edi + 8]
xor eax, eax
cmp ecx, esi
pop edi
pop esi
pop ebx
setne al
add esp, 0x38
ret
Function at 0x404810
Capabilities:
Read file on windows

Disassembly:
mov eax, 0x1000
call fcn.00409ae0
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x10]
push 0x64
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 0x10]
push 0x410284
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebx, dword [sym.imp.MSVCRT.dll_fseek]
mov ebp, eax
push 2
push 0xffffffffffffffce
push ebp
call ebx
push ebp
push 0x32
lea edx, [esp + 0x82c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x24
push 1
push 0xffffffffffffff9c
push ebp
call ebx
push ebp
push 0x32
lea eax, [esp + 0x24]
push 1
push eax
call dword [sym.imp.MSVCRT.dll_fread]
mov al, byte [esp + 0x5d]
add esp, 0x1c
cmp al, 0xaa
jne 0x40490f
or ecx, 0xffffffff
mov edi, str.___
xor eax, eax
lea edx, [esp + 0x10]
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 + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x810]
or ecx, 0xffffffff
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 + 0x810]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x10]
or ecx, 0xffffffff
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
and ecx, 3
rep movsb byte es:[edi], byte [esi]
jmp 0x404862
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
lea edi, [esp + 0x814]
or ecx, 0xffffffff
xor eax, eax
add esp, 4
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
mov esi, edi
mov edi, dword [esp + 0x1014]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 0x810]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
pop edi
dec ecx
pop esi
pop ebp
mov eax, ecx
pop ebx
add esp, 0x1000
ret 4

Function at 0x404960
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x64
lea eax, [esp]
push esi
push edi
push 0x64
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea ecx, [esp + 8]
push 0x410284
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
push 2
push 0xffffffffffffffce
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
push 0x32
lea edx, [esp + 0x24]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
lea edi, [esp + 0x30]
or ecx, 0xffffffff
xor eax, eax
add esp, 0x28
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, dword [esp + 0x70]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea edi, [esp + 8]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
pop edi
mov eax, ecx
pop esi
add esp, 0x64
ret 4
Function at 0x4049f0
Capabilities:
Extract resource via kernel32 functions
Write file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebp
push esi
push edi
push 0x410020
push eax
call dword [sym.imp.MSVCRT.dll_fopen]
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x404a74
mov ecx, dword [esp + 0x14]
push 0x410288
and ecx, 0xffff
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x404a74
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x404a74
push ebx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push edi
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
je 0x404a60
push ebp
push 1
push ebx
push esi
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
push ebp
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, 1
test esi, esi
pop ebx
jne 0x404a76
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x404a80
Capabilities:
Create process on windows
Get common file path

Disassembly:
sub esp, 0x200
lea eax, [esp]
push ebx
push esi
push edi
push eax
push 0xff
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov edx, dword [esp + 0x214]
lea ecx, [esp + 0x10c]
push 0xff
push ecx
push edx
push 0
call dword [sym.imp.USER32.dll_LoadStringA]
lea eax, [esp + 0x10c]
push eax
call fcn.00403c10
lea edi, [esp + 0x110]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
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 eax, dword [esp + 0x214]
mov ecx, ebx
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x14]
push ecx
call fcn.004049f0
add esp, 0xc
lea edx, [esp + 0xc]
push 5
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop esi
cmp eax, 0x20
pop ebx
jg 0x404b45
push 5
push 0
lea eax, [esp + 8]
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
cmp eax, 0x20
jg 0x404b45
xor eax, eax
add esp, 0x200
ret 8
mov eax, 1
add esp, 0x200
ret 8
Function at 0x404e90
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x19c
push ebx
push ebp
push esi
push edi
push str.User32
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, eax
mov ecx, 0x67
xor eax, eax
lea edi, [esp + 0x10]
rep stosd dword es:[edi], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ebp, 0x4050b0
push str.SendMessageTimeoutA
push ebx
sub ebp, 0x405040
call edi
mov esi, dword [esp + 0x1b0]
mov dword [esp + 0x1c], eax
push esi
call dword [sym.imp.USER32.dll_IsWindowUnicode]
test eax, eax
je 0x404f0b
push str.GetWindowLongW
push ebx
call edi
push str.GetClassInfoExW
push ebx
mov dword [esp + 0x1c], eax
call edi
mov dword [esp + 0x10], eax
lea eax, [esp + 0x2c]
push 0x40
push eax
push esi
call dword [sym.imp.USER32.dll_GetClassNameW]
jmp 0x404f34
push str.GetWindowLongA
push ebx
call edi
push str.GetClassInfoExA
push ebx
mov dword [esp + 0x1c], eax
call edi
lea ecx, [esp + 0x2c]
push 0x80
push ecx
push esi
mov dword [esp + 0x1c], eax
call dword [sym.imp.USER32.dll_GetClassNameA]
push 0xffffffffffffffe0
push esi
mov dword [esp + 0x28], esi
call dword [sym.imp.USER32.dll_GetClassLongA]
push 0xfffffffffffffffa
push esi
mov word [esp + 0x2c], ax
call dword [sym.imp.USER32.dll_GetWindowLongA]
xor ebx, ebx
mov dword [esp + 0x28], eax
push ebx
push esi
mov dword [esp + 0xe4], ebx
mov dword [esp + 0x1b0], 0xc8
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp edi, eax
jne 0x404f7f
mov dword [esp + 0x18], ebx
lea edx, [esp + 0x10]
push 0x19c
push edx
push ebp
push 0x405040
push esi
call fcn.00404d30
add esp, 0x14
test eax, eax
jne 0x404fd3
mov eax, dword [esp + 0x1b8]
cmp eax, ebx
je 0x404fa9
mov dword [eax], ebx
mov edi, dword [esp + 0x1b4]
cmp edi, ebx
je 0x404fbd
mov ecx, 0xc
xor eax, eax
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1bc]
pop edi
pop esi
pop ebp
mov byte [eax], bl
xor eax, eax
pop ebx
add esp, 0x19c
ret
mov edx, dword [esp + 0x1b8]
mov eax, dword [esp + 0x1b4]
cmp edx, ebx
je 0x404ff5
mov ecx, 0xc
lea esi, [esp + 0xac]
mov edi, eax
rep movsd dword es:[edi], dword [esi]
cmp eax, ebx
je 0x405002
mov ecx, dword [esp + 0xdc]
mov dword [edx], ecx
mov esi, dword [esp + 0x1bc]
lea edx, [esp + 0xe0]
push 0xc8
push edx
push esi
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov byte [esi + 0xc8], bl
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x19c
ret