joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403b80
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push edi
mov dword [ebp - 4], 0
jo 0x403ba4
mov dx, dx
nop
xchg cx, cx
jno 0x403ba4
mov al, 0x98
and ecx, dword [ecx - 0x7834e8a9]
mov ecx, 0x458d5d21
cld
lea eax, [ebp - 4]
push eax
call fcn.00403e80
add esp, 4
test eax, eax
jne 0x403bba
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push edx
push bx
mov dl, 0xc
test dx, 0x40ef
test bh, bh
pop bx
pop edx
mov eax, dword [ebp - 4]
test eax, eax
jne 0x403bd8
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push eax
cmp al, bl
inc ah
test si, ax
test esi, eax
pop eax
mov edx, dword [ebp - 4]
or ecx, 0xffffffff
mov edi, edx
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push 1
push 0x407230
push 0x4071f0
push SysStringLen
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
neg eax
sbb eax, eax
pop edi
inc eax
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x404120
Capabilities:
Check os version

Disassembly:
cld
push 0xa140
push 0x4074a8
lea eax, [ebp - 0x68]
push edx
push eax
call fcn.00403140
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
add esp, 0x10
mov dword [ecx], 0x4074a8
mov dword [edx], 0xa140
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push ebp
mov ebp, esp
sub esp, 0x94
lea eax, [ebp - 0x94]
mov dword [ebp - 0x94], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
jp 0x404164
push eax
mov ax, 0xea42
pop eax
jnp 0x404164
pop eax
mov edx, 0xb7bc9ea5
jb 0x404185
jp 0x4040eb
test cl, 0x87
xor esp, esi
cwde
push edx
cmp dword [ebp - 0x90], 5
jne 0x404176
mov eax, 1
mov esp, ebp
pop ebp
ret
jp 0x404182
push ecx
mov ecx, 0x54689436
pop ecx
jnp 0x404182
add dword [ebx - 0x8f43], 0xffffffff
push es
cmp dword [ebp - 0x90], 6
invalid
jne 0x40419e
mov eax, dword [ebp - 0x8c]
test eax, eax
jne 0x40419e
mov eax, 1
mov esp, ebp
pop ebp
ret
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x4041e0
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
push ebx
push edi
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x10b]
mov byte [ebp - 0x10c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dword [ebp - 4], 0x104
stosb byte es:[edi], al
push di
push eax
push ecx
test dl, cl
and di, 0x377
cmp ecx, 0x5354
pop ecx
pop eax
pop di
lea eax, [ebp - 4]
lea ecx, [ebp - 0x10c]
push eax
lea edx, [ebp - 8]
push ecx
push edx
push 0x4074a0
push 0x407478
push SysStringLen
call dword [sym.imp.SHLWAPI.dll_SHGetValueA]
test eax, eax
je 0x404250
xor eax, eax
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push edx
push edi
sub dx, dx
cmp edx, ecx
cmp dx, ax
test edx, 0x4d5b
sub di, 0x50f1
mov di, 0x11cb
and di, ax
pop edi
pop edx
lea eax, [ebp - 0x10c]
push 0x2e
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
jne 0x40428a
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
and bx, cx
pop ebx
lea ecx, [ebp - 0x10c]
mov byte [eax], 0
push ecx
call dword [sym.imp.MSVCRT.dll_atoi]
add esp, 4
cmp eax, 6
jne 0x4042b2
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
xor edx, edx
cmp eax, 7
sete dl
pop edi
mov eax, edx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4049e0
Capabilities:
Create process on windows
Enumerate gui resources
Get common file path
Get program files directory
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x260
push ebx
push esi
push edi
pushaw
push ecx
test bl, ah
or ch, 0x47
pop ecx
popaw
call fcn.00402e90
push ebx
push ax
xor al, bl
add ah, 0x25
cmp ax, dx
sub ax, dx
or ebx, 0x62f5
cmp ebx, edi
or ax, bx
test bl, 1
pop ax
pop ebx
call fcn.004041e0
test eax, eax
je 0x404bfd
jp 0x404a3f
push edi
mov di, 0xb224
pop edi
jnp 0x404a3f
xchg edx, eax
clc
mov esi, 0x34a96cf4
inc eax
lds ebp, [0x3317b43a]
fstp xword [ecx + 0x40]
xor ebx, ebx
mov ecx, 0x40
add byte [eax], al
xor eax, eax
lea edi, [ebp - 0x25f]
mov byte [ebp - 0x260], bl
push ebx
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x260]
push 0x26
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
test eax, eax
je 0x404bfd
jb 0x404a97
push di
mov di, 0x4fff
pop di
jae 0x404a97
fdiv dword [esi + 0x6f]
cmp esp, dword [eax]
inc eax
push 0xb7f8c08b
ja 0x404a44
inc ecx
invalid
call fcn.004015c0
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x15b]
mov byte [ebp - 0x15c], bl
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push eax
push edx
xor al, 0x3d
sub ah, 0x2b
add eax, 0x7c28
or dh, dl
xor ax, dx
cmp ax, 0x4001
pop edx
pop eax
push 3
lea ecx, [ebp - 0x260]
push 0x4073a4
push ecx
lea edx, [ebp - 0x15c]
push 0x4073c4
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0x14
mov dword [ebp - 0x14], ebx
jmp 0x404af5
xor ebx, ebx
mov ecx, 0x11
xor eax, eax
lea edi, [ebp - 0x58]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x58], 0x44
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x2c], 1
mov dword [ebp - 8], eax
mov word [ebp - 0x28], bx
mov dword [ebp - 4], eax
push ebx
push esi
push dx
inc dl
xor bl, dl
inc si
cmp dx, 0x676a
xor bx, 0x35f8
cmp esi, 0x222c
pop dx
pop esi
pop ebx
lea ecx, [ebp - 0x10]
lea edx, [ebp - 0x58]
push ecx
push edx
push eax
push eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x15c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x404bfd
jbe 0x404b73
xchg ecx, ecx
xchg dl, dl
ja 0x404b73
pop eax
push 0xbb8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov ecx, dword [ebp - 8]
push ecx
push 0x4048d0
call dword [sym.imp.USER32.dll_EnumWindows]
push edx
push edi
sub dx, dx
cmp edx, ecx
cmp dx, ax
test edx, 0x4d5b
sub di, 0x50f1
mov di, 0x11cb
and di, ax
pop edi
pop edx
mov edx, dword [ebp - 0x10]
push 0x3e8
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x404bcd
mov eax, dword [ebp - 0x10]
push 1
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
jbe 0x404bdb
mov di, di
xchg edi, edi
ja 0x404bdb
and eax, 0xe2f4cc58
mov ecx, dword [ebp - 0xc]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ecx
call esi
mov edx, dword [ebp - 0x10]
push edx
call esi
mov eax, dword [ebp - 0x14]
inc eax
cmp eax, 3
mov dword [ebp - 0x14], eax
jl 0x404af3
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4c60bf
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push esi
push edi
mov edi, dword [ebx]
lea esi, [edx + 0x1000]
mov dword [ebp - 4], 0x10
xor ecx, dword [esi]
mov dword [ebp - 8], ecx
call fcn.004c608c
xor eax, edi
mov edi, dword [ebp - 8]
add esi, 4
dec dword [ebp - 4]
mov ecx, eax
jne 0x4c60da
mov eax, dword [edx + 0x1040]
xor eax, ecx
mov ecx, dword [edx + 0x1044]
mov edx, dword [ebp + 8]
xor ecx, edi
pop edi
mov dword [edx], ecx
mov dword [ebx], eax
pop esi
leave
ret

Function at 0x4c610e
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push esi
push edi
mov edi, dword [ebx]
lea esi, [edx + 0x1044]
mov dword [ebp - 4], 0x10
xor ecx, dword [esi]
mov dword [ebp - 8], ecx
call fcn.004c608c
xor eax, edi
mov edi, dword [ebp - 8]
sub esi, 4
dec dword [ebp - 4]
mov ecx, eax
jne 0x4c6129
mov eax, dword [edx + 0x1004]
xor eax, ecx
mov ecx, dword [edx + 0x1000]
mov edx, dword [ebp + 8]
xor ecx, edi
pop edi
mov dword [edx], ecx
mov dword [ebx], eax
pop esi
leave
ret
Function at 0x4e8560
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
lea eax, [ebp - 8]
push eax
push 0
push 0
push 0x4e85c0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 4], 0
je 0x4e85b7
mov edx, dword [0x52c840]
push edx
call dword [sym.imp.USER32.dll_IsWindow]
test eax, eax
jne 0x4e85ab
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x4e8590
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov al, 1
jmp 0x4e85b9
xor al, al
mov esp, ebp
pop ebp
ret
Function at 0x4ea360
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp - 0xc]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x3c]
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x10]
add ecx, 0xf8
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x10]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x78]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0xc]
add edx, dword [ecx + 0x20]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + 0x24]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + 0x1c]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], 0
jmp 0x4ea3cc
mov ecx, dword [ebp - 0x24]
add ecx, 1
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x24]
cmp eax, dword [edx + 0x18]
jae 0x4ea413
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 0xc]
add eax, dword [edx + ecx*4]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.00501d12
add esp, 8
test eax, eax
jne 0x4ea411
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x20]
movzx edx, word [ecx + eax*2]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0xc]
add ecx, dword [eax + edx*4]
mov eax, ecx
jmp 0x4ea415
jmp 0x4ea3c3
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4f1210
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2d8
mov eax, dword [0x527d30]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
call fcn.004ec6b0
add esp, 4
movzx edx, al
test edx, edx
je 0x4f12a1
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_ResumeThread]
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
mov edx, dword [ebp + 8]
mov eax, dword [edx + 4]
push eax
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push 0x2cc
push 0
lea ecx, [ebp - 0x2d8]
push ecx
call fcn.004fb910
add esp, 0xc
mov dword [ebp - 0x2d8], 0x10001
lea edx, [ebp - 0x2d8]
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 4]
push ecx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
je 0x4f129f
mov edx, dword [ebp - 0x220]
cmp edx, dword [ebp + 0xc]
jne 0x4f129f
jmp 0x4f12a1
jmp 0x4f1223
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004fc065
mov esp, ebp
pop ebp
ret
Function at 0x4f46fa
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
push ebp
mov ebp, esp
cmp dword [ebp + 0xc], 0
jne 0x4f470a
xor eax, eax
jmp 0x4f48d3
mov eax, dword [ebp + 8]
xor eax, 0xffffffff
mov dword [ebp + 8], eax
cmp dword [ebp + 0x10], 8
jb 0x4f488b
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0xc]
xor edx, edx
mov dl, byte [ecx]
mov eax, dword [ebp + 8]
xor eax, edx
and eax, 0xff
mov ecx, dword [ebp + 8]
shr ecx, 8
mov edx, dword [eax*4 + 0x5294e4]
xor edx, ecx
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0xc]
add eax, 1
mov dword [ebp + 0xc], eax
mov ecx, dword [ebp + 0x10]
sub ecx, 8
mov dword [ebp + 0x10], ecx
jmp 0x4f4713
cmp dword [ebp + 0x10], 0
je 0x4f48cd
mov edx, dword [ebp + 0xc]
xor eax, eax
mov al, byte [edx]
mov ecx, dword [ebp + 8]
xor ecx, eax
and ecx, 0xff
mov edx, dword [ebp + 8]
shr edx, 8
mov eax, dword [ecx*4 + 0x5294e4]
xor eax, edx
mov dword [ebp + 8], eax
mov ecx, dword [ebp + 0xc]
add ecx, 1
mov dword [ebp + 0xc], ecx
mov edx, dword [ebp + 0x10]
sub edx, 1
mov dword [ebp + 0x10], edx
cmp dword [ebp + 0x10], 0
jne 0x4f4891
mov eax, dword [ebp + 8]
xor eax, 0xffffffff
pop ebp
ret
Function at 0x4fc065
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x527d30]
jne 0x4fc06f
repz ret
jmp fcn.004fecb6

Function at 0x4ff376
Capabilities:
Write file on windows

Disassembly:
push ecx
push ebx
mov ebx, dword [esp + 0xc]
push esi
push edi
xor esi, esi
xor edi, edi
cmp ebx, dword [edi*8 + 0x527e30]
je 0x4ff391
inc edi
cmp edi, 0x17
jb 0x4ff382
cmp edi, 0x17
jae 0x4ff511
push ebp
push 3
call fcn.005036b1
cmp eax, 1
pop ecx
je 0x4ff4dd
push 3
call fcn.005036b1
test eax, eax
pop ecx
jne 0x4ff3c5
cmp dword [0x527e04], 1
je 0x4ff4dd
cmp ebx, 0xfc
je 0x4ff510
push 0x52ad28
mov ebx, 0x314
push ebx
mov ebp, 0x52da08
push ebp
call fcn.00501ad2
add esp, 0xc
test eax, eax
je 0x4ff3fb
push esi
push esi
push esi
push esi
push esi
call fcn.004ff700
add esp, 0x14
push 0x104
mov esi, 0x52da21
push esi
push 0
mov byte [0x52db25], 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4ff43f
push 0x52ad10
push 0x2fb
push esi
call fcn.00501ad2
add esp, 0xc
test eax, eax
je 0x4ff43f
xor eax, eax
push eax
push eax
push eax
push eax
push eax
call fcn.004ff700
add esp, 0x14
push esi
call fcn.004fd9a0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x4ff484
push esi
call fcn.004fd9a0
sub esi, 0x3b
add eax, esi
push 3
mov ecx, 0x52dd1c
push 0x52ad0c
sub ecx, eax
push ecx
push eax
call fcn.005035fe
add esp, 0x14
test eax, eax
je 0x4ff484
xor esi, esi
push esi
push esi
push esi
push esi
push esi
call fcn.004ff700
add esp, 0x14
jmp 0x4ff486
xor esi, esi
push 0x52ad08
push ebx
push ebp
call fcn.0050358d
add esp, 0xc
test eax, eax
je 0x4ff4a6
push esi
push esi
push esi
push esi
push esi
call fcn.004ff700
add esp, 0x14
push dword [edi*8 + 0x527e34]
push ebx
push ebp
call fcn.0050358d
add esp, 0xc
test eax, eax
je 0x4ff4c8
push esi
push esi
push esi
push esi
push esi
call fcn.004ff700
add esp, 0x14
push 0x12010
push 0x52ace0
push ebp
call fcn.005033d0
add esp, 0xc
jmp 0x4ff510
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov ebp, eax
cmp ebp, esi
je 0x4ff510
cmp ebp, 0xffffffff
je 0x4ff510
push 0
lea eax, [esp + 0x14]
push eax
lea esi, [edi*8 + 0x527e34]
push dword [esi]
call fcn.004fd9a0
pop ecx
push eax
push dword [esi]
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop ebp
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x5033d0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push edi
call fcn.004fee94
xor ebx, ebx
cmp dword [0x52e0c0], ebx
mov dword [ebp - 8], eax
mov dword [ebp - 4], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x10], ebx
jne 0x5034a6
push 0x52af10
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x503586
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x52af04
push edi
call esi
cmp eax, ebx
je 0x503586
push eax
call fcn.004fee26
mov dword [esp], 0x52aef4
push edi
mov dword [0x52e0c0], eax
call esi
push eax
call fcn.004fee26
mov dword [esp], 0x52aee0
push edi
mov dword [0x52e0c4], eax
call esi
push eax
call fcn.004fee26
mov dword [0x52e0c8], eax
lea eax, [ebp - 0xc]
push eax
call fcn.004fdc50
test eax, eax
pop ecx
pop ecx
je 0x503474
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004ff700
add esp, 0x14
cmp dword [ebp - 0xc], 2
jne 0x5034a6
push 0x52aec4
push edi
call esi
push eax
call fcn.004fee26
cmp eax, ebx
pop ecx
mov dword [0x52e0d0], eax
je 0x5034a6
push 0x52aeac
push edi
call esi
push eax
call fcn.004fee26
pop ecx
mov dword [0x52e0cc], eax
mov eax, dword [0x52e0cc]
mov ecx, dword [ebp - 8]
cmp eax, ecx
je 0x50352b
cmp dword [0x52e0d0], ecx
je 0x50352b
push eax
call fcn.004fee9d
push dword [0x52e0d0]
mov esi, eax
call fcn.004fee9d
cmp esi, ebx
pop ecx
pop ecx
mov edi, eax
je 0x50352b
cmp edi, ebx
je 0x50352b
call esi
cmp eax, ebx
je 0x5034f8
lea ecx, [ebp - 0x14]
push ecx
push 0xc
lea ecx, [ebp - 0x20]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x5034f8
test byte [ebp - 0x18], 1
jne 0x50352b
lea eax, [ebp - 0x10]
push eax
call fcn.004fdc87
test eax, eax
pop ecx
je 0x503513
push ebx
push ebx
push ebx
push ebx
push ebx
call fcn.004ff700
add esp, 0x14
cmp dword [ebp - 0x10], 4
jb 0x503522
or dword [ebp + 0x10], 0x200000
jmp 0x503566
or dword [ebp + 0x10], 0x40000
jmp 0x503566
mov eax, dword [0x52e0c4]
cmp eax, dword [ebp - 8]
je 0x503566
push eax
call fcn.004fee9d
cmp eax, ebx
pop ecx
je 0x503566
call eax
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x503566
mov eax, dword [0x52e0c8]
cmp eax, dword [ebp - 8]
je 0x503566
push eax
call fcn.004fee9d
cmp eax, ebx
pop ecx
je 0x503566
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x52e0c0]
call fcn.004fee9d
cmp eax, ebx
pop ecx
je 0x503586
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x503588
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret

Function at 0x408961
Capabilities:
Encode data using add xor sub operations
Encode data using xor

Disassembly:
push 0x4085d8
pop ecx
mov eax, 0x8f2842c5
add eax, 0x20a46a70
call fcn.00408988
xor dword [edi], ecx
dec eax
sub eax, eax
inc edi
dec eax
inc edx
cmp edi, esi
jne fcn.00408961
mov eax, eax
ret
Function at 0x401bb0
Capabilities:
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, ecx
cmp dword [edi], 0
je 0x401bdf
mov eax, dword [edi + 4]
test eax, eax
je 0x401bd1
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [edi + 4], 0
push dword [edi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi], 0
push dword [ebp + 8]
push 0
push 0xf001f
call dword [sym.imp.KERNEL32.dll_OpenFileMappingW]
mov dword [edi], eax
test eax, eax
je 0x401c15
push 0
push 0
push 0
push 0xf001f
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [edi + 4], eax
test eax, eax
pop edi
setne al
pop esi
pop ebp
ret 4
pop edi
xor al, al
pop esi
pop ebp
ret 4

Function at 0x402130
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
mov dword [ebp - 4], 0
push eax
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
cmp dword [ebp - 4], 2
mov esi, eax
je 0x402173
push 0
push 0x41ee2c
push str.This_executable_is_part_of_OpenMPT._You_do_not_need_to_run_it_by_yourself.
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
or eax, 0xffffffff
pop esi
mov esp, ebp
pop ebp
ret 0x10
push ebx
push 0x401db0
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
push 2
push 0
call dword [sym.imp.ole32.dll_CoInitializeEx]
mov ebx, eax
mov ecx, esi
shr ebx, 0x1f
call fcn.004021b0
xor bl, 1
pop ebx
je 0x4021a1
call dword [sym.imp.ole32.dll_CoUninitialize]
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0x10
Function at 0x406a1a
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x406a59
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x406a59
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406a59
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x406a59
cmp dword [ecx + 0x74], 0xe
jbe 0x406a59
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x410a16
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push ecx
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
mov esi, eax
test esi, esi
je 0x410ab3
push ebx
push esi
call fcn.004109df
xor ebx, ebx
sub eax, esi
push ebx
push ebx
push ebx
push ebx
sar eax, 1
push eax
push esi
push ebx
push ebx
mov dword [ebp - 8], eax
call fcn.00410975
add esp, 0x24
mov dword [ebp - 4], eax
test eax, eax
jne 0x410a60
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x410ab2
push edi
push eax
call fcn.0040e090
mov edi, eax
pop ecx
push ebx
test edi, edi
jne 0x410a80
call fcn.0040e040
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
xor eax, eax
jmp 0x410ab1
push ebx
push dword [ebp - 4]
push edi
push dword [ebp - 8]
push esi
push ebx
push ebx
call fcn.00410975
add esp, 0x20
test eax, eax
jne 0x410a9f
push edi
call fcn.0040e040
jmp 0x410aa7
push ebx
call fcn.0040e040
mov ebx, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, ebx
pop edi
pop ebx
pop esi
leave
ret
Function at 0x4184b0
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x4184dd
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x4184dd
mov edx, 0x10b
xor eax, eax
cmp word [ecx + 0x18], dx
sete al
pop ebp
ret
xor eax, eax
pop ebp
ret
Function at 0x407c50
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x37], 0
jne 0x407c63
cmp dword [esi + 0x2b], 0
je 0x407c71
mov dword [esi + 8], 0x1002
xor esi, esi
jmp 0x407cfa
mov dword [esi + 8], 0
push 0xa
push dword [ebp + 0x10]
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_FindResourceA]
or eax, eax
jne 0x407c95
mov dword [esi + 8], 0x3001
xor esi, esi
jmp 0x407cfa
push eax
push eax
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_LoadResource]
pop ecx
or eax, eax
jne 0x407cb0
mov dword [esi + 8], 0x3002
xor esi, esi
jmp 0x407cfa
mov dword [esi + 0x13], eax
mov dword [esi + 0x1b], eax
push ecx
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
or eax, eax
jne 0x407ccf
mov dword [esi + 8], 0x3002
xor esi, esi
jmp 0x407cfa
mov dword [esi + 0x17], eax
mov dword [esi + 0x2b], 2
push esi
call fcn.00407f30
or eax, eax
jne 0x407cee
mov dword [esi + 0x2b], 0
xor esi, esi
jmp 0x407cfa
mov dword [esi + 0x37], 1
mov esi, 1
mov eax, esi
pop esi
leave
ret 0xc

Function at 0x409d69
Capabilities:
Terminate process

Disassembly:
cmp ecx, dword [0x462544]
jne 0x409d73
repz ret
jmp fcn.0040e7db