joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4013b0
Capabilities:
Create pipe
Create two anonymous pipes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
push esi
push edi
push 0x1000
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x18], edx
push eax
lea eax, [ebp - 4]
mov dword [ebp - 0x2c], 0xc
push eax
lea eax, [ebp - 8]
mov dword [ebp - 0x28], 0
push eax
mov dword [ebp - 0x24], 1
call dword [sym.imp.KERNEL32.dll_CreatePipe]
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x4013f4
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea eax, [ebp - 0x14]
push 2
push 1
push 0
push eax
call edi
push eax
push dword [ebp - 4]
call edi
mov ebx, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push eax
call ebx
test eax, eax
jne 0x40141b
call esi
push 0
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_CreatePipe]
test eax, eax
jne 0x401435
call esi
push 2
push 0
push 0
lea eax, [ebp - 0x1c]
push eax
call edi
push eax
push dword [ebp - 8]
call edi
push eax
call ebx
test eax, eax
jne 0x401450
call esi
push 2
push 0
push 0
lea eax, [ebp - 0x20]
push eax
call edi
push eax
push dword [ebp - 0xc]
call edi
push eax
call ebx
test eax, eax
jne 0x40146b
call esi
push dword [ebp - 8]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call edi
test eax, eax
jne 0x40147c
call esi
push dword [ebp - 0xc]
call edi
test eax, eax
jne 0x401487
call esi
push dword [ebp + 0x10]
mov edx, dword [ebp - 0x10]
push dword [ebp + 8]
mov ecx, dword [ebp - 4]
push dword [ebp - 0x18]
push dword [ebp - 0x14]
call fcn.00401510
add esp, 0x10
push dword [ebp - 4]
call edi
test eax, eax
jne 0x4014ac
call esi
push dword [ebp - 0x10]
call edi
test eax, eax
jne 0x4014b7
call esi
push dword [ebp - 0x14]
call edi
test eax, eax
jne 0x4014c2
call esi
push 0xffffffffffffffff
push dword [0x41e8e4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp + 0xc]
push dword [0x41e8e4]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
push dword [0x41e8e4]
call edi
push dword [ebp - 0x1c]
call edi
test eax, eax
jne 0x4014f2
call esi
push dword [ebp - 0x20]
call edi
test eax, eax
jne 0x4014fd
call esi
pop edi
pop esi
xor al, al
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x401510
Capabilities:
Create a process with modified i/o handles and window
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
xorps xmm0, xmm0
mov dword [ebp - 0x26], 0
xor eax, eax
movlpd qword [ebp - 0x54], xmm0
cmp byte [ebp + 0x14], 0
mov word [ebp - 0x22], ax
mov eax, dword [ebp + 8]
movlpd qword [ebp - 0x4c], xmm0
movlpd qword [ebp - 0x44], xmm0
movlpd qword [ebp - 0x3c], xmm0
movlpd qword [ebp - 0x34], xmm0
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0x2c], 0x101
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x18], eax
je 0x401566
mov eax, 5
jmp 0x401568
xor eax, eax
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x58]
push eax
push dword [ebp + 0x10]
push 0
push 0x10
push 1
push 0
push 0
push dword [ebp + 0xc]
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
jne 0x401596
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [ebp - 0x10]
push dword [ebp - 0xc]
mov dword [0x41e8e4], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x4015b1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esp, ebp
pop ebp
ret
Function at 0x402590
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x424
mov eax, dword [0x41e008]
xor eax, esp
mov dword [esp + 0x420], eax
push ebx
push esi
push edi
lea eax, [esp + 0x14]
mov ebx, ecx
push eax
push 0x20019
push 0
push str.SystemCurrentControlSetServices
push 0x80000002
mov dword [esp + 0x30], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402696
mov ecx, ebx
call fcn.0040e0c0
mov ecx, eax
mov dword [esp + 0x20], eax
call fcn.004092d0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov esi, eax
test esi, esi
je 0x402687
nop dword [eax]
mov ecx, esi
call fcn.00409990
mov edi, eax
lea eax, [esp + 0x10]
push eax
push 0x20019
push 0
push edi
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x402676
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0x400
push eax
lea eax, [esp + 0x2c]
push eax
lea eax, [esp + 0x2c]
push eax
push 0
push str.Description
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x402670
mov ecx, dword [esp + 0x1c]
mov edx, edi
call fcn.0040a560
lea ecx, [esp + 0x28]
push ecx
push 1
push str.Description
push eax
call fcn.0040a2c0
add esp, 0x10
push dword [esp + 0x10]
call ebx
mov ecx, esi
call fcn.00409310
mov esi, eax
test esi, esi
jne 0x402600
mov ecx, dword [esp + 0x20]
call fcn.00409420
push dword [esp + 0x14]
call ebx
mov ecx, dword [esp + 0x42c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x403ae0
Capabilities:
Check if file exists
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x400
lea eax, [ebp - 0x404]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x804]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
push str.System32CrypServ.exe
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x403be0
push edi
push 0
push 0x80
push 3
push 0
push 3
push 0x80000000
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x403bdf
push esi
push 0x10
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
add esp, 4
mov esi, eax
lea eax, [ebp - 0x810]
push eax
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
lea eax, [ebp - 0x818]
push eax
lea eax, [ebp - 0x810]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
push esi
lea eax, [ebp - 0x818]
push eax
call dword [sym.imp.KERNEL32.dll_FileTimeToSystemTime]
movzx eax, word [esi + 6]
push eax
movzx eax, word [esi + 2]
push eax
movzx eax, word [esi]
push eax
lea eax, [ebp - 0x404]
push str._02d__02d__02d
push eax
call fcn.004010e0
add esp, 0x14
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 4
pop esi
pop edi
lea ecx, [ebp - 0x404]
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403bf0
sub ecx, edx
je 0x403c1d
cmp byte [0x420d21], 0
lea eax, [ebp - 0x404]
je 0x403c2d
push str.2008_05_07
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
je 0x403c40
xor al, al
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push str.2010_03_18
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x403c1d
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x4045b0
Capabilities:
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x94c
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x808]
mov edi, ecx
push 0x400
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__getcwd]
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chdir]
add esp, 0xc
lea eax, [ebp - 0x948]
push eax
push 0x418ef0
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x40475d
test byte [ebp - 0x948], 0x10
lea eax, [ebp - 0x91c]
je 0x4046d3
mov ecx, 0x4181ac
nop dword [eax]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404640
test dl, dl
je 0x40463c
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404640
add eax, 2
add ecx, 2
test dl, dl
jne 0x404620
xor eax, eax
jmp 0x404645
sbb eax, eax
or eax, 1
test eax, eax
je 0x404747
mov ecx, 0x4181b0
lea eax, [ebp - 0x91c]
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x404678
test dl, dl
je 0x404674
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x404678
add eax, 2
add ecx, 2
test dl, dl
jne 0x404658
xor eax, eax
jmp 0x40467d
sbb eax, eax
or eax, 1
test eax, eax
je 0x404747
lea edx, [ebp - 0x408]
mov ecx, edi
sub edx, edi
nop
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [edx + ecx - 1], al
test al, al
jne 0x404690
lea eax, [ebp - 0x91c]
push eax
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryA]
test eax, eax
je 0x404747
lea ecx, [ebp - 0x408]
call fcn.004045b0
jmp 0x404747
push str.CIUMon.exe
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll__stricmp]
add esp, 8
test eax, eax
jne 0x404747
call fcn.00409680
mov esi, eax
test esi, esi
je 0x404747
push edi
push 1
push str.Directory
push esi
call fcn.0040a2c0
push 0
push 2
push 0x418eec
push esi
call fcn.0040a2c0
push 0
push 2
push str.Setup
push esi
call fcn.0040a2c0
mov eax, dword [0x41f8f4]
add esp, 0x30
test eax, eax
jne 0x404733
call fcn.00409680
mov dword [0x41f8f4], eax
push esi
push 0x40
push edi
push eax
call fcn.0040a2c0
add esp, 0x10
mov ecx, esi
call fcn.00409420
lea eax, [ebp - 0x948]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x404601
push ebx
call dword [sym.imp.KERNEL32.dll_FindClose]
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__chdir]
mov ecx, dword [ebp - 4]
add esp, 4
xor ecx, ebp
pop edi
pop esi
pop ebx
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x4053f0
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x408
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, 0x420920
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405410
sub ecx, edx
je 0x4054a8
push 0x420920
lea eax, [ebp - 0x404]
push str.__s___s
push eax
call fcn.004010e0
add esp, 0xc
lea eax, [ebp - 0x408]
push eax
push 0x2001f
push 0
push str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4054a8
lea ecx, [ebp - 0x404]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x405463
sub ecx, edx
lea eax, [ecx + 1]
push eax
lea eax, [ebp - 0x404]
push eax
push 1
push 0
push str.CrypKey
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 0x408]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor al, al
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret

Function at 0x405550
Capabilities:
Shutdown system

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x404
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x11004
push str.Reboot
push ecx
push dword [0x41f8f0]
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 6
jne 0x405626
call fcn.004054c0
test al, al
je 0x40559e
push 0
push 2
call dword [sym.imp.USER32.dll_ExitWindowsEx]
test eax, eax
jne 0x405626
movups xmm0, xmmword [str.Problems_encountered_on_initiating_automatic_reboot._n]
mov eax, dword [0x4195cc]
push esi
movups xmmword [ebp - 0x404], xmm0
push edi
movups xmm0, xmmword [0x4195ac]
mov dword [ebp - 0x3d4], eax
lea edi, [ebp - 0x404]
mov ax, word [0x4195d0]
dec edi
movups xmmword [ebp - 0x3f4], xmm0
mov word [ebp - 0x3d0], ax
movups xmm0, xmmword [0x4195bc]
movups xmmword [ebp - 0x3e4], xmm0
nop dword [eax]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x4055f0
mov ecx, 8
lea eax, [ebp - 0x404]
mov esi, str.User_will_have_to_manually_reboot.
rep movsd dword es:[edi], dword [esi]
push 0x11030
push str.Auto_Reboot_Failure
push eax
push dword [0x41f8f0]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.USER32.dll_MessageBoxA]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x406070
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x80c
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
call fcn.00406120
mov ecx, esi
call fcn.00406300
lea edx, [ebp - 0x408]
mov eax, esi
sub edx, esi
nop dword [eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edx + eax - 1], cl
test cl, cl
jne 0x4060a0
push str.CrypKeyCOM7.dll
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406105
lea eax, [ebp - 0x408]
push eax
push 0x41f4f0
lea eax, [ebp - 0x808]
push str._s__s___s_
push eax
call fcn.004010e0
push 1
lea eax, [ebp - 0x80c]
push eax
push esi
lea edx, [ebp - 0x808]
call fcn.004013b0
add esp, 0x1c
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x406120
Capabilities:
Check if file exists
Delete file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc0c
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
lea esi, [ebp - 0x408]
xor edi, edi
mov edx, str.CrypKeyCOM7.dll
sub esi, ebx
mov ecx, ebx
nop dword [eax]
mov al, byte [ecx]
lea ecx, [ecx + 1]
mov byte [esi + ecx - 1], al
test al, al
jne 0x406150
test edi, edi
mov eax, str.CrypKeyCOM.dll
cmovne eax, edx
push eax
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x408]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4061bb
lea eax, [ebp - 0x408]
push eax
push 0x41f4f0
lea eax, [ebp - 0xc08]
push str._s__u__s___s_
push eax
call fcn.004010e0
push 1
lea eax, [ebp - 0xc0c]
push eax
push ebx
lea edx, [ebp - 0xc08]
call fcn.004013b0
add esp, 0x1c
inc edi
mov edx, str.CrypKeyCOM7.dll
cmp edi, 2
jl 0x406147
lea edi, [ebp - 0x808]
xor esi, esi
sub edi, ebx
mov byte [ebp - 0x408], 0
cmp esi, 4
ja case.default.0x4061e0
jmp dword [esi*4 + 0x4062ec]
mov eax, dword [0x419998]
movq xmm0, qword [str.crp9516f.dll]
mov dword [ebp - 0x400], eax
mov al, byte [0x41999c]
mov byte [ebp - 0x3fc], al
jmp 0x40627e
mov eax, dword [0x4199a8]
movq xmm0, qword [str.cryp95f.dll]
mov dword [ebp - 0x400], eax
jmp 0x40627e
mov eax, dword [0x4199b4]
movq xmm0, qword [str.crp32001.ngn]
mov dword [ebp - 0x400], eax
mov al, byte [0x4199b8]
mov byte [ebp - 0x3fc], al
jmp 0x40627e
mov ax, word [0x4199c4]
movq xmm0, qword [str.hdsn1.dll]
mov word [ebp - 0x400], ax
jmp 0x40627e
mov eax, dword [0x419978]
movq xmm0, qword [str.CrypKeyCOM.dll]
mov dword [ebp - 0x400], eax
mov ax, word [0x41997c]
mov word [ebp - 0x3fc], ax
mov al, byte [0x41997e]
mov byte [ebp - 0x3fa], al
movq qword [ebp - 0x408], xmm0
mov eax, ebx
nop dword [eax + eax]
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edi + eax - 1], cl
test cl, cl
jne 0x406290
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x4062cf
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
inc esi
cmp esi, 5
jl 0x4061d0
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x406300
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x100c
call fcn.00414550
mov eax, dword [0x41e008]
xor eax, esp
mov dword [esp + 0x1008], eax
cmp byte [0x420d21], 0
mov edx, str.CK_7102_W2K
push ebx
push esi
mov eax, str.CK_Current
mov dword [esp + 8], ecx
cmove edx, eax
lea esi, [esp + 0xc0c]
push edi
sub esi, edx
mov al, byte [edx]
lea edx, [edx + 1]
mov byte [esi + edx - 1], al
test al, al
jne 0x406342
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
lea edi, [esp + 0x410]
xor esi, esi
sub edi, ecx
mov byte [esp + 0x10], 0
cmp esi, 4
ja case.default.0x40636a
jmp dword [esi*4 + 0x406468]
mov eax, dword [str.CKS.exe]
mov dword [esp + 0x10], eax
mov eax, dword [0x4199e4]
mov dword [esp + 0x14], eax
jmp case.default.0x40636a
mov eax, dword [0x4199f0]
movq xmm0, qword [str.crp32002.ngn]
mov dword [esp + 0x18], eax
mov al, byte [0x4199f4]
mov byte [esp + 0x1c], al
jmp 0x4063d3
movups xmm0, xmmword [str.CrypKeyCOM7.dll]
movups xmmword [esp + 0x10], xmm0
jmp case.default.0x40636a
mov eax, dword [0x419a00]
movq xmm0, qword [str.SetupEx.exe]
mov dword [esp + 0x18], eax
jmp 0x4063d3
mov al, byte [0x419a0c]
movq xmm0, qword [str.GMCL.dat]
mov byte [esp + 0x18], al
movq qword [esp + 0x10], xmm0
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0xc14]
push eax
lea eax, [esp + 0x818]
push str._s_s
push eax
call fcn.004010e0
mov eax, dword [esp + 0x1c]
add esp, 0x10
nop
mov cl, byte [eax]
lea eax, [eax + 1]
mov byte [edi + eax - 1], cl
test cl, cl
jne 0x406400
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x414]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [esp + 0x810]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x406446
push 0
lea eax, [esp + 0x414]
push eax
lea eax, [esp + 0x818]
push eax
call ebx
inc esi
cmp esi, 5
jl 0x406360
mov ecx, dword [esp + 0x1014]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00412814
mov esp, ebp
pop ebp
ret

Function at 0x406480
Capabilities:
Check if file exists
Copy file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
cmp byte [0x420d21], 0
mov eax, str.CK_7102_W2K
push esi
mov esi, ecx
mov ecx, str.CK_Current
cmove eax, ecx
push eax
lea eax, [ebp - 0x804]
push str._scrp32002.ngn
push eax
call fcn.004010e0
lea ecx, [ebp - 0x404]
add esp, 0xc
sub ecx, esi
mov al, byte [esi]
lea esi, [esi + 1]
mov byte [ecx + esi - 1], al
test al, al
jne 0x4064c7
push str.crp32002.ngn
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
pop esi
test eax, eax
je 0x40650e
push 0
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_CopyFileA]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x406ea0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
test esi, esi
je 0x406f19
mov edx, esi
lea ecx, [edx + 1]
mov al, byte [edx]
inc edx
test al, al
jne 0x406eb0
sub edx, ecx
je 0x406f19
push 0
lea eax, [ebp - 4]
push eax
push 0
push 0x2001f
push 0
push str.REG_SZ
push 0
push str.SoftwareGMCL_Upgrade
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406f19
mov ecx, esi
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406ef0
sub ecx, edx
lea eax, [ecx + 1]
push eax
push esi
push 1
push 0
push 0x418384
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov esp, ebp
pop ebp
ret

Function at 0x406f20
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc20
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
lea eax, [ebp - 0xc0c]
push eax
push 0x20019
push 0
push str.SoftwareGMCL_Upgrade
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x40704e
lea eax, [ebp - 0xc10]
mov dword [ebp - 0xc10], 0x400
push eax
lea eax, [ebp - 0x408]
push eax
lea eax, [ebp - 0xc18]
push eax
push 0
push 0x418384
push dword [ebp - 0xc0c]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
movzx ecx, byte [ebp - 0x408]
xor edx, edx
push dword [ebp - 0xc0c]
test eax, eax
cmovne ecx, edx
mov byte [ebp - 0x408], cl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x408]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406fb4
sub ecx, edx
je 0x40704e
mov ecx, 0x41fd00
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x406fd0
sub ecx, edx
je 0x40704e
xor eax, eax
nop dword [eax]
mov cl, byte [eax + 0x41fd00]
lea eax, [eax + 1]
mov byte [ebp + eax - 0x809], cl
test cl, cl
jne 0x406fe0
push str.VirtualPortSetup.exe
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea eax, [ebp - 0x808]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x40704e
lea eax, [ebp - 0x808]
push eax
lea eax, [ebp - 0xc08]
push str._s__upgrade
push eax
call fcn.004010e0
add esp, 0xc
lea eax, [ebp - 0xc1c]
lea edx, [ebp - 0xc08]
push 0
push eax
push 0x41fd00
call fcn.004013b0
add esp, 0xc
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x408200
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
push esi
mov esi, ecx
test edx, edx
je 0x40822a
nop dword [eax]
movzx ecx, byte [esi]
lea esi, [esi + 1]
xor eax, ecx
movzx ecx, al
shr eax, 8
xor eax, dword [ecx*4 + 0x41a290]
sub edx, 1
jne 0x408210
pop esi
pop ebp
ret

Function at 0x408230
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x808
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push edi
mov esi, ecx
push 0x41a194
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
mov edi, eax
add esp, 8
test edi, edi
jne 0x40828e
push esi
lea eax, [ebp - 0x804]
push str.Could_not_open___s__for_CRC_calculation._n
push eax
call fcn.004010e0
add esp, 0xc
lea ecx, [ebp - 0x804]
call fcn.00408370
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret
push ebx
push edi
push 0x400
lea eax, [ebp - 0x404]
xor esi, esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ebx, eax
add esp, 0x10
cmp ebx, 0x400
jae 0x4082c7
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
mov eax, 1
cmovne esi, eax
push 0xffffffffffffffff
mov edx, ebx
lea ecx, [ebp - 0x404]
call fcn.00408200
add esp, 4
mov ebx, eax
mov dword [ebp - 0x808], ebx
test esi, esi
jne 0x408348
nop word [eax + eax]
push edi
push 0x400
lea eax, [ebp - 0x404]
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ebx, eax
add esp, 0x10
cmp ebx, 0x400
jae 0x408326
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
mov eax, 1
cmovne esi, eax
push dword [ebp - 0x808]
mov edx, ebx
lea ecx, [ebp - 0x404]
call fcn.00408200
add esp, 4
mov dword [ebp - 0x808], eax
mov ebx, eax
test esi, esi
je 0x4082f0
push edi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
mov ecx, dword [ebp - 4]
add esp, 4
not ebx
xor ecx, ebp
mov eax, ebx
pop ebx
pop edi
pop esi
call fcn.00412814
mov esp, ebp
pop ebp
ret
Function at 0x4089e0
Capabilities:
Set console window title

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x804
mov eax, dword [0x41e008]
xor eax, ebp
mov dword [ebp - 4], eax
push 0x400
lea eax, [ebp - 0x804]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [0x41f8f8], eax
lea eax, [ebp - 0x804]
push 0x400
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleA]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
lea eax, [ebp - 0x404]
push str._d_d
push eax
call fcn.004010e0
add esp, 0x10
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
push 0x28
call dword [sym.imp.KERNEL32.dll_Sleep]
lea eax, [ebp - 0x404]
push eax
push 0
call dword [sym.imp.USER32.dll_FindWindowA]
mov dword [0x41f8f0], eax
lea eax, [ebp - 0x804]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
mov eax, dword [0x41f8f0]
test eax, eax
je 0x408a92
push 2
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00412814
mov esp, ebp
pop ebp
ret

Function at 0x408aa0
Capabilities:
Create thread

Disassembly:
push esi
mov esi, ecx
call fcn.00408ad0
push 0
push 0
push esi
push 0x404790
push 0
push 0
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__beginthreadex]
add esp, 0x18
mov dword [0x41f8fc], eax
pop esi
ret