joyce8/EMBER2024-capa huggingface dataset:
Function at 0x401ea2
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x410284]
jne 0x401eac
repz ret
jmp fcn.00403e53

Function at 0x409e8c
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1c
pushal
call 0x409e9b
pop dword [ebp - 0xc]
mov eax, 0xc745b9c5
add eax, 0x38fae4d6
sub dword [ebp - 0xc], eax
mov dword [ebp - 0x1c], 0xf76c5e9
sub dword [ebp - 0x1c], 0xc124809e
mov dword [ebp - 0x18], 0x6d40100
add dword [ebp - 0x18], 0x2b5f4b45
mov dword [ebp - 0x14], 0x4453fea4
sub dword [ebp - 0x14], 0xf807ba76
mov dword [ebp - 0x10], 0x3fa69e0f
add dword [ebp - 0x10], 0xc05961f1
lea eax, [ebp - 0x1c]
push eax
mov eax, 0x37a1517c
add eax, 0xc89f7ed8
add eax, dword [ebp - 0xc]
call dword [eax]
mov dword [ebp - 0x1c], 0x25c87e81
sub dword [ebp - 0x1c], 0xb156152b
mov dword [ebp - 0x18], 0xedaa27c3
add dword [ebp - 0x18], 0x53c239b2
mov dword [ebp - 0x14], 0xff71d178
add dword [ebp - 0x14], 0x63fd9af4
mov dword [ebp - 0x10], 0x656059a4
add dword [ebp - 0x10], 0x9a9fa65c
lea ebx, [ebp - 0x1c]
push ebx
push eax
mov eax, sym.imp.kernel32.dll_GetProcAddress
add eax, dword [ebp - 0xc]
call dword [eax]
push 0x40
push 0x1000
push 0x3a416
push 0
call eax
mov ecx, 0x4a7a
xor ebx, ebx
add ebx, eax
mov esi, 0xd8d74202
add esi, 0x276a6dfe
add esi, dword [ebp - 0xc]
mov edi, 0x10903af9
add edi, 0x6072e5c5
xor dword [ebp - 8], ecx
mov edx, dword [esi]
add dword [ebp - 8], 0xa97411c7
add edx, edi
xor dword [ebp - 4], 0xdd72a46b
mov dword [ebx], edx
sub dword [ebp - 8], edx
add ebx, 0x477432a5
sub ebx, 0x477432a1
add esi, 4
loop 0x409fb4
add eax, 0x11cbb
mov ebx, eax
add eax, 0x9bbafd4
sub eax, 0x9bbafcf
mov ecx, 0xb3d216b8
sub ecx, 0xb39216b8
add ecx, dword [ebp - 0xc]
call ebx
leave
ret
Function at 0x407840
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section..idata
lea edi, [esi - 0x6000]
push edi
or ebp, 0xffffffff
jmp 0x407862
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x407869
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x407858
mov eax, 1
add ebx, ebx
jne 0x40787b
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
ja 0x407870
jne 0x40788c
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x407870
xor ecx, ecx
sub eax, 3
jb 0x4078a0
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x407912
mov ebp, eax
add ebx, ebx
jne 0x4078ab
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jne 0x4078b8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jne 0x4078dc
inc ecx
add ebx, ebx
jne 0x4078c8
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
ja 0x4078bd
jne 0x4078d9
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x4078bd
add ecx, 2
cmp ebp, 0xfffff300
adc ecx, 1
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jle 0x4078fc
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x4078ed
jmp 0x40785e
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x4078fc
add edi, ecx
jmp 0x40785e
pop esi
sub edi, dword [edi - 4]
push edi
mov edi, esi
mov ecx, 0x61
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x40791e
cmp byte [edi], 0
jne 0x40791e
mov eax, dword [edi]
mov bl, byte [edi + 4]
shr ax, 8
rol eax, 0x10
xchg ah, al
sub eax, edi
sub bl, 0xe8
add eax, esi
mov dword [edi], eax
add edi, 5
mov eax, ebx
loop 0x407923
pop edi
mov eax, dword [edi]
or eax, eax
je 0x40798b
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x7568]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x75e0]
xchg edx, eax
mov al, byte [edi]
inc edi
or al, al
je 0x40794b
push edx
mov ecx, edi
push edi
dec eax
repne scasb al, byte es:[edi]
push edx
call dword [esi + 0x75e4]
pop edx
or eax, eax
je 0x407989
mov dword [ebx], eax
add ebx, 4
jmp 0x407968
popal
ret
lea ebx, [esi - 4]
add edi, 4
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x4079bc
cmp al, 0xef
ja 0x4079af
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x407991
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x40799e
popal
jmp section..text
Function at 0x402340
Capabilities:
Get disk information

Disassembly:
sub esp, 0xc
push esi
mov esi, ecx
lea ecx, [esp + 8]
movsx eax, byte [esi + 0xac]
push eax
push str._c:_
push ecx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
mov ecx, esi
call fcn.00402500
test eax, eax
je 0x402384
push 0xff
mov ecx, esi
call fcn.00401290
mov eax, 1
pop esi
add esp, 0xc
ret 4
mov ecx, esi
call fcn.004024e0
test eax, eax
je 0x4023fd
push 0xff
mov ecx, esi
call fcn.00401290
mov eax, dword [esi + 4]
lea edx, [esp + 4]
push 0
push edx
mov ecx, dword [eax + 4]
push 0
push 0
push 0
push 0
push 0x90020
push ecx
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ecx, esi
call fcn.00401a70
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x4023e3
lea edx, [esp + 8]
push 0x406068
push edx
call fcn.004038d0
add esp, 8
mov al, byte [esi + 0xac]
mov ecx, esi
push eax
call fcn.00401360
mov eax, 1
pop esi
add esp, 0xc
ret 4
mov eax, dword [esi + 8]
push 0xff
cmp eax, 1
mov ecx, esi
jne 0x40241a
call fcn.00401290
mov ecx, esi
call fcn.00402310
jmp 0x40242a
call fcn.00401290
push 0x5dc
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [esi + 4]
lea ecx, [esp + 4]
push 0
push ecx
mov eax, dword [edx + 4]
push 0
push 0
push 0
push 0
push 0x90020
push eax
call dword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov ecx, esi
call fcn.00401a70
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov cl, byte [esi + 0xac]
push ecx
mov ecx, esi
call fcn.00401360
mov eax, 1
pop esi
add esp, 0xc
ret 4
Function at 0x4034a0
Capabilities:
Get disk information

Disassembly:
push 0xffffffffffffffff
push 0x40408b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x20
push ebp
push esi
push edi
mov ebp, ecx
push 0xb0
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0xc], eax
test eax, eax
mov dword [esp + 0x34], 0
je 0x4034e3
mov ecx, eax
call fcn.00402050
jmp 0x4034e5
xor eax, eax
mov dword [ebp + 0x64], eax
mov cl, byte [0x406234]
test cl, cl
mov dword [esp + 0x34], 0xffffffff
je 0x40353b
push ecx
mov ecx, eax
call fcn.00401360
test eax, eax
je 0x403533
mov ecx, dword [ebp + 0x64]
push 0
call fcn.00402090
test eax, eax
je 0x403533
mov al, byte [0x406234]
pop edi
mov byte [ebp + 0x60], al
pop esi
mov eax, 1
pop ebp
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov ecx, dword [ebp + 0x64]
call fcn.00401a70
mov ecx, 6
mov esi, str.ABCDEFGHIJKLMNOPQRSTUVWXYZ
lea edi, [esp + 0x10]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_GetLogicalDrives]
mov edi, eax
mov esi, 2
mov edx, 1
mov ecx, esi
shl edx, cl
test edi, edx
je 0x40358f
mov al, byte [esp + esi + 0x10]
mov ecx, dword [ebp + 0x64]
push eax
call fcn.00401360
test eax, eax
je 0x403587
mov ecx, dword [ebp + 0x64]
push 0
call fcn.00402090
test eax, eax
jne 0x4035bd
mov ecx, dword [ebp + 0x64]
call fcn.00401a70
inc esi
cmp esi, 0x1a
jl 0x40355b
mov ecx, dword [ebp + 0x64]
test ecx, ecx
je 0x4035a2
mov edx, dword [ecx]
push 1
call dword [edx]
pop edi
mov dword [ebp + 0x64], 0
pop esi
xor eax, eax
pop ebp
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
add esp, 0x2c
ret
mov cl, byte [esp + esi + 0x10]
pop edi
mov byte [ebp + 0x60], cl
mov ecx, dword [esp + 0x28]
pop esi
mov eax, 1
pop ebp
mov dword fs:[0], ecx
add esp, 0x2c
ret
Function at 0x401420
Capabilities:
Access peb ldr_data
Get ntdll base address

Disassembly:
push 0xffffffffffffffff
push 0x4144a6
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 4
push eax
push ecx
mov ecx, esi
mov dword [esp + 0x14], esi
call fcn.00406190
lea edi, [esi + 0x94]
mov dword [esp + 0x14], 0
mov ecx, edi
call fcn.00407ed0
push 0x9c
push 0x11c
push 0xffffff64
push 0xfffffee4
mov ecx, esi
mov byte [esp + 0x24], 1
mov dword [esi], 0x415358
mov dword [esi + 0x78], 0
mov dword [esi + 0x7c], 0
call fcn.00405e00
mov edx, dword [esi + 0x74]
push 0xd3
add edx, 0x30
push 0x129
push edx
mov ecx, edi
call fcn.004083a0
mov eax, dword [esp + 0x24]
mov ecx, esi
push eax
call fcn.004015b0
mov ecx, dword [esp + 0xc]
mov eax, esi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 0xc

Function at 0x403aa1
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x417300
cmp edx, dword [eax]
je 0x403ac3
add eax, 8
inc ecx
cmp eax, 0x417390
jl 0x403ab4
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x417300]
jne 0x403bf1
mov eax, dword [0x419710]
cmp eax, 1
je 0x403bcb
test eax, eax
jne 0x403af4
cmp dword [0x417250], 1
je 0x403bcb
cmp edx, 0xfc
je 0x403bf1
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x403b2b
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.00405010
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.00405100
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x403b6e
lea eax, [ebp - 0x1a4]
push eax
call fcn.00405100
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x4157dc
push edi
call fcn.00405540
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.00405010
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.00405020
lea eax, [ebp - 0xa0]
push 0x4157bc
push eax
call fcn.00405020
push dword [esi + 0x417304]
lea eax, [ebp - 0xa0]
push eax
call fcn.00405020
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.004054b5
add esp, 0x2c
pop edi
jmp 0x403bf1
lea eax, [ebp + 8]
lea esi, [esi + 0x417304]
push 0
push eax
push dword [esi]
call fcn.00405100
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 0x4085c0
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 0x40866b
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 0x40866b
push esi
call dword [sym.imp.KERNEL32.dll_LockResource]
mov cl, byte [eax + ebx - 1]
test cl, cl
je 0x40864e
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 0x408638
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.00405540
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 0x4088f0
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], 0x41592c
call dword [sym.imp.KERNEL32.dll_GetTickCount]
movsx ecx, ax
push ecx
call fcn.00411dac
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 0x4089b0
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 0x4089d6
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 0x408c30
Capabilities:
Create process on windows

Disassembly:
sub esp, 0x30c
push esi
mov esi, dword [esp + 0x318]
cmp byte [esi], 0
je 0x408c6d
mov al, byte [esi]
movsx ecx, al
sub ecx, 0x2d
je 0x408c67
sub ecx, 4
je 0x408ca8
dec ecx
je 0x408c7a
test al, al
je 0x408c68
cmp al, 0x20
je 0x408c68
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x408c59
jmp 0x408c68
inc esi
cmp byte [esi], 0
jne 0x408c43
mov eax, 1
pop esi
add esp, 0x30c
ret
mov al, byte [esi + 2]
add esi, 2
test al, al
je 0x408c9e
push esi
call fcn.0041231c
add esp, 4
test eax, eax
je 0x408c9e
push esi
call fcn.0041231c
add esp, 4
test eax, eax
jne 0x408c91
xor eax, eax
pop esi
add esp, 0x30c
ret
mov al, byte [esi + 2]
add esi, 2
test al, al
je 0x408d5f
push ebx
push edi
push 0x417728
push esi
call fcn.00412126
mov edi, eax
add esp, 8
test edi, edi
jne 0x408ce0
push 0x417728
push esi
call fcn.00412126
mov edi, eax
add esp, 8
test edi, edi
je 0x408ccc
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 0x417724
push edx
call fcn.00412126
mov ebx, eax
push ebx
call fcn.004120ec
add esp, 0xc
cmp eax, 0xffffffff
je 0x408d2c
push edi
push eax
call fcn.004120c8
push ebx
call fcn.004120ec
add esp, 0xc
cmp eax, 0xffffffff
jne 0x408d17
push edi
call fcn.00412072
lea eax, [esp + 0x10]
lea ecx, [esp + 0x114]
push eax
push esi
push str._s__2__s
push ecx
call fcn.00412020
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 0x4092d0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push esi
push edi
push 1
call fcn.00409050
mov edi, dword [esp + 0x10]
add esp, 4
mov esi, eax
mov eax, dword [esp + 0x10]
push 0x41772c
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x409305
push esi
call fcn.00409620
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 0x409321
push esi
call fcn.00409620
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.00409080
add esp, 4
test eax, eax
jne 0x40934c
push esi
call fcn.00409620
add esp, 4
xor eax, eax
pop edi
pop esi
ret
mov eax, esi
pop edi
pop esi
ret
Function at 0x409710
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 0x409734
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 0x409747
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.004098c0
add esp, 8
mov esi, eax
push edi
call dword [sym.imp.KERNEL32.dll_FreeResource]
test esi, esi
jne 0x40977a
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 0x4097a0
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 0x4097d1
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 [0x4198e8]
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 0x409ca0
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 0x417cf0
mov byte [edi], 0
mov ecx, dword [0x4198ec]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
test eax, eax
jne 0x409ccc
pop edi
pop esi
ret
mov edx, dword [0x4198ec]
push eax
push edx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov esi, eax
test esi, esi
jne 0x409ce3
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.00405540
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 0x40b1d0
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.0040b170
test ebx, ebx
je 0x40b1fa
inc dword [esi + 0x11c]
mov eax, dword [esp + 0x120]
test eax, eax
jne 0x40b20a
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 0x40b2aa
mov ecx, dword [esi]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebp, eax
test ebp, ebp
je 0x40b2aa
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 0x4198e4
push ecx
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
push 0x417728
push edi
call fcn.00412126
mov edx, dword [esp + 0x1c]
mov ebx, eax
mov eax, dword [esp + 0x18]
push ebx
push edx
push 1
push eax
call fcn.00412327
push ebx
call fcn.00412072
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.0040b2c0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x10c
ret 4
Function at 0x40bda0
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebx
mov ebx, ecx
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x40bdb3
push eax
call fcn.00402592
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.0040259d
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 0x40be21
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 0x40be1b
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 0x40be1b
mov ecx, ebx
call fcn.0040c360
pop ebx
ret 8

Function at 0x40bec0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xe4
lea eax, [esp + 4]
push eax
call fcn.0040bf90
mov eax, dword [esp + 0xe8]
lea ecx, [esp]
push 0
push ecx
lea edx, [esp + 0xc]
push pe_nt_image_headers32
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 0x40c010
Capabilities:
Write file on windows

Disassembly:
sub esp, 0x34
push ebx
push ebp
mov ebx, ecx
push 2
call fcn.0040c270
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.0040c260
test eax, eax
jle 0x40c0c1
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 0x40c08b
mov ecx, dword [esp + 0x14]
cmp ebp, ecx
jne 0x40c079
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 0x40c08b
mov eax, dword [esp + 0x30]
mov edx, dword [ecx + 0x14]
cmp eax, edx
jbe 0x40c08b
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 0x40c044
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