joyce8/EMBER2024-capa huggingface dataset:
Function at 0x1007ff9
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x19c
mov ecx, dword [ebp + 0xc]
mov eax, dword [0x100eb54]
and dword [ebp - 0x18c], 0
and dword [ebp - 0x190], 0
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
push edi
mov dword [ebp - 0x188], ecx
lea ecx, [ebp - 0x18c]
push ecx
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push eax
call esi
mov edi, eax
test edi, edi
jne 0x1008199
lea eax, [ebp - 0x190]
push eax
push ebx
push dword [ebp - 0x188]
call esi
test eax, eax
je 0x1008079
lea eax, [ebp - 0x190]
push eax
push ebx
push dword [ebp - 0x188]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
mov edi, eax
test edi, edi
jne 0x1008199
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
lea ecx, [ebp - 0x194]
push ecx
lea ecx, [ebp - 0x84]
push ecx
lea ecx, [ebp - 0x19c]
push ecx
xor eax, eax
push eax
lea ecx, [ebp - 0x198]
push ecx
lea ecx, [ebp - 0x184]
push ecx
mov dword [ebp - 0x188], eax
mov esi, 0x80
push eax
jmp 0x100810c
push dword [ebp - 0x194]
lea eax, [ebp - 0x84]
push eax
push dword [ebp - 0x19c]
lea eax, [ebp - 0x184]
push 0
push eax
push dword [ebp - 0x190]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
inc dword [ebp - 0x188]
lea eax, [ebp - 0x194]
push eax
lea eax, [ebp - 0x84]
push eax
lea eax, [ebp - 0x19c]
push eax
push 0
lea eax, [ebp - 0x198]
push eax
lea eax, [ebp - 0x184]
push eax
push dword [ebp - 0x188]
push dword [ebp - 0x18c]
mov dword [ebp - 0x194], esi
mov dword [ebp - 0x198], esi
call ebx
mov edi, eax
test edi, edi
je 0x10080b3
cmp edi, 0x103
jne 0x1008199
and dword [ebp - 0x188], 0
mov ebx, dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
push esi
lea eax, [ebp - 0x104]
push eax
push 0
jmp 0x1008181
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x190]
push dword [ebp - 0x18c]
call fcn.01007ff9
mov edi, eax
cmp edi, 0x103
je 0x100816d
test edi, edi
jne 0x1008199
inc dword [ebp - 0x188]
push esi
lea eax, [ebp - 0x104]
push eax
push dword [ebp - 0x188]
push dword [ebp - 0x18c]
call ebx
mov edi, eax
test edi, edi
je 0x1008147
cmp edi, 0x103
jne 0x1008199
xor edi, edi
cmp dword [ebp - 0x18c], 0
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x10081b0
push dword [ebp - 0x18c]
call esi
cmp dword [ebp - 0x190], 0
je 0x10081c1
push dword [ebp - 0x190]
call esi
mov ecx, dword [ebp - 4]
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0100bd6d
leave
ret 0xc
Function at 0x100a0aa
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x480
mov eax, dword [0x100eb54]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x474]
push eax
push 0x1002840
push 0x80000001
mov dword [ebp - 0x478], esi
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
test eax, eax
jne 0x100a1f0
push edi
lea eax, [ebp - 0x47c]
push eax
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x480]
push eax
push 0
mov edi, 0x1002820
push edi
push dword [ebp - 0x474]
mov dword [ebp - 0x47c], 0x200
mov dword [ebp - 0x480], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100a1e3
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
cmp esi, 0x10
pop ecx
mov dword [ebp - 0x478], eax
jb 0x100a1e3
cmp esi, 0x48
ja 0x100a1e3
mov esi, dword [sym.imp.USER32.dll_SystemParametersInfoW]
push 0
lea eax, [ebp - 0x470]
push eax
push 0x6c
push 0x2d
mov dword [ebp - 0x470], 0x6c
call esi
mov ecx, dword [ebp + 8]
lea eax, [ecx + 0x2b]
push ecx
mov dword [ebp - 0x46c], eax
mov dword [ebp - 0x468], eax
lea eax, [ebp - 0x404]
push 0x100242c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x404]
push eax
push 1
push 0
push edi
push dword [ebp - 0x474]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 2
lea eax, [ebp - 0x470]
push eax
push 0x6c
push 0x2e
call esi
push 0
push 0x2e
push 0x1a
push 0xffff
call dword [sym.imp.USER32.dll_SendMessageW]
push dword [ebp - 0x474]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x478]
pop esi
call fcn.0100bd6d
leave
ret 4

Function at 0x100a208
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x5c
mov eax, dword [0x100eb54]
push edi
mov dword [ebp - 4], eax
lea eax, [ebp - 0x58]
push eax
push 0xf003f
xor edi, edi
push edi
push 0x1002898
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100a2bf
push esi
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x54]
push eax
push edi
push edi
mov esi, 0x1002888
push esi
push dword [ebp - 0x58]
mov dword [ebp - 0x5c], 0x28
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100a2b5
lea eax, [ebp - 0x54]
push eax
call dword [sym.imp.msvcrt.dll__wtol]
cmp dword [ebp + 8], edi
pop ecx
je 0x100a27b
test al, 1
jne 0x100a2b5
or eax, 1
jmp 0x100a282
test al, 1
je 0x100a2b5
and eax, 0xfffffffe
push eax
lea eax, [ebp - 0x2c]
push 0x100242c
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
lea eax, [ebp - 0x2c]
add esp, 0xc
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
lea eax, [ebp - 0x2c]
push eax
push 1
push edi
push esi
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
mov ecx, dword [ebp - 4]
pop edi
call fcn.0100bd6d
leave
ret 4
Function at 0x100a4a9
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
mov eax, dword [ebp + 8]
sub eax, 0
je 0x100a4c6
dec eax
je 0x100a4c6
dec eax
jne 0x100a53b
mov dword [ebp + 8], 0x1002958
jmp 0x100a4cd
mov dword [ebp + 8], 0x1002954
push ebx
push esi
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
push edi
lea eax, [ebp - 4]
push eax
mov edi, 0xf003f
push edi
push 0
push 0x1002908
push 0x80000001
call esi
test eax, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x100a533
lea eax, [ebp + 0xc]
push eax
push edi
push 0
push dword [ebp + 0xc]
push dword [ebp - 4]
call esi
test eax, eax
jne 0x100a533
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 8]
push 1
push 0
push 0x10028ec
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push dword [ebp + 0xc]
call ebx
push dword [ebp - 4]
call ebx
pop edi
pop esi
pop ebx
leave
ret 8

Function at 0x100a8a5
Capabilities:
Query or enumerate registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push dword [ebp + 8]
push dword [ebp + 0x18]
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
lea eax, [ebp + 0xc]
push eax
push 1
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x100a8f0
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x18]
lea eax, [ebp + 8]
push eax
push 0
push dword [ebp + 0x14]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp + 0xc]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebp
ret 0x18

Function at 0x100a8f9
Capabilities:
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
lea eax, [ebp + 0xc]
push eax
xor esi, esi
lea eax, [ebp + 8]
push eax
push esi
push 2
push esi
push esi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x100a95d
cmp dword [ebp + 0x14], esi
je 0x100a937
push dword [ebp + 0x14]
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax + eax + 2]
push eax
push dword [ebp + 0x14]
jmp 0x100a93e
push 2
push 0x1001c78
push 1
push esi
push dword [ebp + 0x10]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, esi
jne 0x100a954
xor esi, esi
inc esi
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, esi
pop esi
pop ebp
ret 0x10
Function at 0x4012f0
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x414ac6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x18]
push esi
mov esi, ecx
push edi
mov ecx, dword [esp + 0x1c]
push 5
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x14], esi
call fcn.004067e0
lea edi, [esi + 0x94]
mov dword [esp + 0x14], 0
mov ecx, edi
call fcn.00408520
push 0x9c
push 0x11c
push 0xffffff64
push 0xfffffee4
mov ecx, esi
mov byte [esp + 0x24], 1
mov dword [esi], 0x415300
mov dword [esi + 0x78], 0
mov dword [esi + 0x7c], 0
call fcn.00406450
mov edx, dword [esi + 0x74]
push 0x72
add edx, 0x30
push 0xd2
push edx
mov ecx, edi
call fcn.004089f0
mov eax, dword [esp + 0x24]
mov ecx, esi
push eax
call fcn.00401470
mov ecx, dword [esp + 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc

Function at 0x4040d1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x417610
cmp edx, dword [eax]
je 0x4040f3
add eax, 8
inc ecx
cmp eax, 0x4176a0
jl 0x4040e4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x417610]
jne 0x404221
mov eax, dword [0x419a1c]
cmp eax, 1
je 0x4041fb
test eax, eax
jne 0x404124
cmp dword [0x417564], 1
je 0x4041fb
cmp edx, 0xfc
je 0x404221
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x40415b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00405640
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405730
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x40419e
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405730
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x415834
push edi
call fcn.00405b70
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00405640
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00405650
lea eax, [ebp - 0xa0]
push 0x415814
push eax
call fcn.00405650
push dword [esi + 0x417614]
lea eax, [ebp - 0xa0]
push eax
call fcn.00405650
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.00405ae5
add esp, 0x2c
pop edi
jmp 0x404221
lea eax, [ebp + 8]
lea esi, [esi + 0x417614]
push 0
push eax
push dword [esi]
call fcn.00405730
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 0x408c10
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ecx
push ebx
push ebp
mov ebp, ecx
push esi
push edi
push str.MSGTEXT
mov eax, dword [ebp + 4]
lea edi, [ebp + 0x30]
push 0x65
push eax
mov byte [edi], 0
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x408cbb
mov eax, dword [ebp + 4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebx, eax
mov eax, dword [ebp + 4]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
mov dword [esp + 0x10], esi
je 0x408cbb
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov cl, byte [eax + ebx - 1]
test cl, cl
je 0x408c9e
mov ecx, ebx
mov esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
cmp ebx, 0xff
rep movsb byte es:[edi], byte [esi]
jl 0x408c88
mov ebx, 0xff
mov esi, dword [esp + 0x10]
mov byte [ebx + ebp + 0x30], 0
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
push 0x100
push eax
push edi
call fcn.00405b70
add esp, 0xc
mov byte [ebp + 0x12f], 0
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret

Function at 0x408f20
Capabilities:
Find taskbar

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x10
mov edx, dword [esp + 0x20]
push ebx
push ebp
push esi
mov esi, ecx
mov ecx, dword [esp + 0x28]
xor ebp, ebp
mov dword [esi + 4], eax
mov eax, dword [esp + 0x24]
push edi
mov dword [esi + 8], ecx
mov dword [esi + 0xc], edx
mov dword [esi + 0x18], eax
mov dword [esi + 0x20], ebp
mov dword [esi + 0x24], ebp
mov dword [esi + 0x28], ebp
mov dword [esi + 0x2c], ebp
mov dword [esi], 0x415984
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movsx ecx, ax
push ecx
call fcn.004123dc
add esp, 4
push ebp
push str.Shell_TrayWnd
call dword [sym.imp.USER32.dll_FindWindowA]
mov ebx, eax
push ebp
cmp ebx, ebp
je 0x408fe0
call dword [sym.imp.USER32.dll_GetDC]
mov ebp, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
push 8
push edi
call ebp
push 0xa
push edi
mov dword [esi + 0x10], eax
call ebp
push edi
push 0
mov dword [esi + 0x14], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
lea edx, [esp + 0x10]
push edx
push ebx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ecx, dword [esi + 0x10]
sub eax, edx
cmp eax, ecx
jl 0x409006
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
mov eax, dword [esi + 0x14]
sub ecx, edx
add eax, ecx
pop edi
mov dword [esi + 0x14], eax
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
call dword [sym.imp.USER32.dll_GetDC]
mov ebx, dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edi, eax
push 8
push edi
call ebx
push 0xa
push edi
mov dword [esi + 0x10], eax
call ebx
push edi
push ebp
mov dword [esi + 0x14], eax
call dword [sym.imp.USER32.dll_ReleaseDC]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10
ret 0x10
Function at 0x409260
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x30c
push esi
mov esi, dword [esp + 0x318]
cmp byte [esi], 0
je 0x40929d
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x2d
je 0x409297
sub ecx, 4
je 0x4092d8
dec ecx
je 0x4092aa
test al, al
je 0x409298
cmp al, 0x20
je 0x409298
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x409289
jmp 0x409298
inc esi
cmp byte [esi], 0
jne 0x409273
mov eax, 1
pop esi
add esp, 0x30c
ret
mov al, byte [esi + 2]
add esi, 2
test al, al
je 0x4092ce
push esi
call fcn.0041294c
add esp, 4
test eax, eax
je 0x4092ce
push esi
call fcn.0041294c
add esp, 4
test eax, eax
jne 0x4092c1
xor eax, eax
pop esi
add esp, 0x30c
ret
mov al, byte [esi + 2]
add esi, 2
test al, al
je 0x40938f
push ebx
push edi
push 0x417a38
push esi
call fcn.00412756
mov edi, eax
add esp, 8
test edi, edi
jne 0x409310
push 0x417a38
push esi
call fcn.00412756
mov edi, eax
add esp, 8
test edi, edi
je 0x4092fc
mov ecx, dword [esp + 0x31c]
lea eax, [esp + 0xc]
push 0x103
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea edx, [esp + 0xc]
push 0x417a34
push edx
call fcn.00412756
mov ebx, eax
push ebx
call fcn.0041271c
add esp, 0xc
cmp eax, 0xffffffff
je 0x40935c
push edi
push eax
call fcn.004126f8
push ebx
call fcn.0041271c
add esp, 0xc
cmp eax, 0xffffffff
jne 0x409347
push edi
call fcn.004126a2
lea eax, [esp + 0x10]
lea ecx, [esp + 0x114]
push eax
push esi
push str._s__2__s
push ecx
call fcn.00412650
add esp, 0x14
lea edx, [esp + 0x110]
push 0
push edx
call dword [sym.imp.KERNEL32.dll_WinExec]
pop edi
pop ebx
xor eax, eax
pop esi
add esp, 0x30c
ret

Function at 0x409900
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push 1
call fcn.00409680
mov edi, dword [esp + 0x10]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x10]
push 0x417a3c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x409935
push esi
call fcn.00409c50
add esp, 4
xor eax, eax
pop edi
pop esi
ret
push eax
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x409951
push esi
call fcn.00409c50
add esp, 4
xor eax, eax
pop edi
pop esi
ret
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
push esi
mov dword [esi + 8], eax
mov dword [esi + 4], eax
mov dword [esi + 0xc], edi
call fcn.004096b0
add esp, 4
test eax, eax
jne 0x40997c
push esi
call fcn.00409c50
add esp, 4
xor eax, eax
pop edi
pop esi
ret
mov eax, esi
pop edi
pop esi
ret
Function at 0x409d40
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 8]
push ebx
mov ebx, dword [esp + 8]
push ebp
push esi
push edi
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
jne 0x409d64
pop edi
pop esi
pop ebp
pop ebx
ret
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
jne 0x409d77
pop edi
pop esi
pop ebp
pop ebx
ret
push edi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebp, eax
push esi
push ebx
mov dword [esp + 0x24], ebp
call dword [sym.imp.KERNEL32.dll_SizeofResource]
push eax
push ebp
call fcn.00409ef0
add esp, 8
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
test esi, esi
jne 0x409daa
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [eax + 0x14]
test ecx, ecx
jne 0x409dd0
mov cx, word [eax + 0xe]
imul ecx, dword [eax + 4]
add ecx, 0x1f
shr ecx, 3
and ecx, 0x1ffffffc
imul ecx, dword [eax + 8]
mov edx, dword [eax + 0x20]
mov ebp, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push esi
lea edi, [ecx + edx*4]
mov ecx, dword [eax]
add edi, ecx
call ebp
push 0
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
mov ebx, eax
test ebx, ebx
jne 0x409e01
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
ret
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edx, dword [0x419bf4]
mov esi, dword [esp + 0x1c]
mov ecx, dword [eax + 0x14]
add esi, edx
mov edx, dword [eax + 0x20]
push ebx
lea edi, [eax + edx*4]
mov edx, dword [eax]
mov eax, ecx
add 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]
call ebp
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
ret

Function at 0x40a2d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
mov eax, dword [esp + 4]
push esi
push edi
mov edi, dword [esp + 0x10]
and eax, 0xffff
push 0x418000
mov byte [edi], 0
mov ecx, dword [0x419bf8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x40a2fc
pop edi
pop esi
ret
mov edx, dword [0x419bf8]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x40a313
pop edi
pop esi
ret
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, dword [esp + 0x18]
push ebx
push eax
push edi
call fcn.00405b70
add esp, 0xc
mov byte [edi + ebx - 1], 0
push esi
call dword [sym.imp.KERNEL32.dll_FreeResource]
pop ebx
pop edi
mov eax, 1
pop esi
ret
Function at 0x40b800
Capabilities:
Extract resource via kernel32 functions
Get common file path

Disassembly:
sub esp, 0x10c
push ebx
push ebp
push esi
mov esi, ecx
mov cl, byte [esi + 0x14]
push edi
lea edi, [esi + 0x14]
xor ebx, ebx
test cl, cl
mov ecx, esi
setne bl
call fcn.0040b7a0
test ebx, ebx
je 0x40b82a
inc dword [esi + 0x11c]
mov eax, dword [esp + 0x120]
test eax, eax
jne 0x40b83a
mov eax, str.IDM_MUSIC
push str.MIDI
push eax
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov ebx, eax
test ebx, ebx
je 0x40b8da
mov ecx, dword [esi]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
test ebp, ebp
je 0x40b8da
push ebp
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edx, dword [esi]
push ebx
push edx
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [esp + 0x14], eax
lea eax, [esp + 0x18]
push eax
push 0x103
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push edi
push 0
lea ecx, [esp + 0x20]
push 0x419bf0
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x417a38
push edi
call fcn.00412756
mov edx, dword [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x18]
push ebx
push edx
push 1
push eax
call fcn.00412957
push ebx
call fcn.004126a2
add esp, 0x1c
push ebp
call dword [sym.imp.KERNEL32.dll_FreeResource]
mov ecx, dword [esi + 8]
push edi
push ecx
mov ecx, esi
call fcn.0040b8f0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 4
Function at 0x40c3d0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40c3e3
push eax
call fcn.00402be2
add esp, 4
push ebp
mov ebp, dword [esp + 0xc]
push esi
push edi
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00402bed
mov edx, eax
mov edi, ebp
or ecx, 0xffffffff
xor eax, eax
add esp, 4
mov dword [ebx + 0xc], edx
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
push 0
mov eax, ecx
mov esi, edi
mov edi, edx
push 0x80
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 3
push 0
and ecx, 3
push 1
push 0x80000000
rep movsb byte es:[edi], byte [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileA]
pop edi
pop esi
cmp eax, 0xffffffff
mov dword [ebx], eax
pop ebp
jne 0x40c451
mov dword [ebx], 0
xor eax, eax
pop ebx
ret 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebx]
push 0
push 0
push 0
push 2
push 0
push ecx
mov dword [ebx + 0x18], eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
mov dword [ebx + 4], eax
je 0x40c44b
push 0
push 0
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
mov dword [ebx + 8], eax
je 0x40c44b
mov ecx, ebx
call fcn.0040c990
pop ebx
ret 8

Function at 0x40c4f0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xe4
lea eax, [esp + 4]
push eax
call fcn.0040c5c0
mov eax, dword [esp + 0xe8]
lea ecx, [esp]
push 0
push ecx
lea edx, [esp + 0xc]
push 0xe0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [esp]
xor eax, eax
cmp ecx, 0xe0
sete al
add esp, 0xe4
ret 4

Function at 0x40c640
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebx, ecx
push 2
call fcn.0040c8a0
mov dword [esp + 0xc], eax
mov eax, dword [ebx + 8]
mov ecx, dword [eax + 0x3c]
lea ebp, [ecx + eax + 0xf8]
mov ecx, ebx
call fcn.0040c890
test eax, eax
jle 0x40c6f1
push esi
push edi
mov dword [esp + 0x10], eax
mov eax, dword [ebx + 0x14]
mov ecx, 0xa
mov esi, ebp
lea edi, [esp + 0x1c]
test eax, eax
rep movsd dword es:[edi], dword [esi]
je 0x40c6bb
mov ecx, dword [esp + 0x14]
cmp ebp, ecx
jne 0x40c6a9
mov edx, dword [ebx + 0x10]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x24]
add esi, edx
add ecx, eax
mov dword [esp + 0x2c], esi
mov dword [esp + 0x24], ecx
jmp 0x40c6bb
mov eax, dword [esp + 0x30]
mov edx, dword [ecx + 0x14]
cmp eax, edx
jbe 0x40c6bb
add eax, dword [ebx + 0x10]
mov dword [esp + 0x30], eax
mov edx, dword [esp + 0x48]
lea eax, [esp + 0x18]
push 0
push eax
lea ecx, [esp + 0x24]
push 0x28
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esp + 0x10]
add ebp, 0x28
dec eax
mov dword [esp + 0x10], eax
jne 0x40c674
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x34
ret 4
pop ebp
mov eax, 1
pop ebx
add esp, 0x34
ret 4