joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40518b
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
mov dword [0x42bfe0], 0x44
push eax
xor eax, eax
push 0x42bfe0
push eax
push eax
push eax
push eax
push eax
push eax
push dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x4051c6
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4

Function at 0x405250
Capabilities:
Delete directory
Delete file
Enumerate files on windows
Enumerate files recursively

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x148
push esi
push edi
mov edi, dword [ebp + 8]
push edi
call fcn.004054ff
test byte [ebp + 0xc], 8
mov dword [ebp - 8], eax
je 0x405284
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
neg eax
sbb eax, eax
inc eax
add dword [0x42ebe8], eax
jmp 0x405418
push ebx
mov ebx, dword [ebp + 0xc]
and ebx, 1
mov dword [ebp - 4], ebx
je 0x4052a2
test eax, eax
je 0x4053c3
test byte [ebp + 0xc], 2
je 0x4053c3
mov esi, 0x42afe0
push edi
push esi
call fcn.0040592b
test ebx, ebx
je 0x4052bf
push str..
push esi
call sub.KERNEL32.dll_lstrcatA
jmp 0x4052c5
push edi
call fcn.00405465
cmp byte [edi], 0
jne 0x4052d3
cmp byte [0x42afe0], 0x5c
jne 0x4052de
push 0x40900c
push edi
call sub.KERNEL32.dll_lstrcatA
push edi
call sub.KERNEL32.dll_lstrlenA
mov ebx, eax
lea eax, [ebp - 0x148]
push eax
push esi
add ebx, edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
mov dword [ebp + 8], eax
je 0x4053b9
lea eax, [ebp - 0x11c]
push 0x3f
push eax
lea esi, [ebp - 0x11c]
call fcn.00405449
cmp byte [eax], 0
je 0x405324
cmp byte [ebp - 0x18], 0
je 0x405324
lea esi, [ebp - 0x18]
cmp byte [esi], 0x2e
jne 0x40533a
mov al, byte [esi + 1]
test al, al
je 0x405398
cmp al, 0x2e
jne 0x40533a
cmp byte [esi + 2], 0
je 0x405398
push esi
push ebx
call fcn.0040592b
test byte [ebp - 0x148], 0x10
je 0x40535f
mov eax, dword [ebp + 0xc]
and eax, 3
cmp al, 3
jne 0x405398
push dword [ebp + 0xc]
push edi
call fcn.00405250
jmp 0x405398
push edi
call fcn.004055e3
push edi
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
test eax, eax
jne 0x405390
test byte [ebp + 0xc], 4
je 0x405388
push edi
push 0xfffffffffffffff1
call fcn.00404cc9
push 0
push edi
call fcn.00405679
jmp 0x405398
inc dword [0x42ebe8]
jmp 0x405398
push edi
push 0xfffffffffffffff2
call fcn.00404cc9
lea eax, [ebp - 0x148]
push eax
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x405302
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp dword [ebp - 4], 0
je 0x4053c3
and byte [ebx - 1], 0
xor esi, esi
pop ebx
cmp dword [ebp - 4], esi
je 0x405418
cmp dword [ebp - 8], esi
jne 0x4053d8
inc dword [0x42ebe8]
jmp 0x405418
push edi
call fcn.00405c22
test eax, eax
je 0x405418
push edi
call fcn.0040541e
push edi
call fcn.004055e3
push edi
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
jne 0x405410
test byte [ebp + 0xc], 4
je 0x4053d0
push edi
push 0xfffffffffffffff1
call fcn.00404cc9
push esi
push edi
call fcn.00405679
jmp 0x405418
push edi
push 0xffffffffffffffe5
call fcn.00404cc9
pop edi
pop esi
leave
ret 8
Function at 0x4054ff
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push esi
push edi
push dword [esp + 0xc]
mov esi, 0x42b3e0
push esi
call fcn.0040592b
push esi
call fcn.004054b2
mov edi, eax
test edi, edi
jne 0x405520
xor eax, eax
jmp 0x405572
push edi
call fcn.00405b89
test byte [0x42eb78], 0x80
je 0x405539
mov al, byte [edi]
test al, al
je 0x40551c
cmp al, 0x5c
je 0x40551c
sub edi, esi
jmp 0x405551
call fcn.00405c22
test eax, eax
je 0x40554b
test byte [eax], 0x10
je 0x40551c
push esi
call fcn.00405465
push esi
call sub.KERNEL32.dll_lstrlenA
cmp eax, edi
push esi
jg 0x40553d
call fcn.0040541e
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop edi
pop esi
ret 4

Function at 0x4055e3
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4055ff
and al, 0xfe
push eax
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
ret 4

Function at 0x405602
Capabilities:
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov ecx, eax
push 0
inc ecx
neg ecx
sbb ecx, ecx
and ecx, eax
push ecx
push dword [esp + 0x14]
push 0
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x405631
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
xor edx, edx
pop ecx
div ecx
push esi
lea eax, [ebp + 8]
push 0
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x405675
test edi, edi
jne 0x40563c
and byte [esi], 0
pop edi
pop esi
pop ebp
ret 8
mov eax, esi
jmp 0x40566f
Function at 0x405679
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
push 1
call fcn.00405c49
test eax, eax
mov esi, dword [esp + 0x18]
je 0x40569d
push 5
push esi
push dword [esp + 0x1c]
call eax
test eax, eax
jne 0x4057d6
mov ebx, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov dword [0x42c168], 0x4c554e
test esi, esi
mov edi, 0x400
mov ebp, 0x42c168
je 0x4056e1
push 1
push 0
push esi
call fcn.00405602
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push ebp
push esi
call ebx
test eax, eax
je 0x4057dc
cmp eax, edi
jg 0x4057dc
mov esi, 0x42bbe0
push edi
push esi
push dword [esp + 0x1c]
call ebx
test eax, eax
je 0x4057dc
cmp eax, edi
jg 0x4057dc
push esi
push ebp
push str._s_s_r_n
push 0x42b7e0
call dword [sym.imp.USER32.dll_wsprintfA]
mov ebx, eax
mov eax, dword [0x42eb70]
add esp, 0x10
push dword [eax + 0x128]
push esi
call fcn.0040594d
push 4
push 0xc0000000
push esi
call fcn.00405602
mov ebp, eax
cmp ebp, 0xffffffff
mov dword [esp + 0x14], ebp
je 0x4057d6
push 0
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea eax, [edi + ebx + 0xa]
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x4057cf
lea eax, [esp + 0x18]
push 0
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4057cf
cmp edi, dword [esp + 0x18]
jne 0x4057cf
push str._Rename__r_n
push esi
call fcn.00405577
test eax, eax
jne 0x4057e3
lea eax, [esi + edi]
push str._Rename__r_n
push eax
call fcn.0040592b
add edi, 0xa
mov eax, edi
push ebx
add eax, esi
push 0x42b7e0
push eax
call fcn.004055c3
xor eax, eax
push eax
push eax
push eax
push ebp
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [esp + 0x18]
push 0
add edi, ebx
push eax
push edi
push esi
push ebp
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc dword [0x42ebf0]
pop edi
pop esi
pop ebp
pop ebx
ret 8
add eax, 0xa
push 0x409328
push eax
call fcn.00405577
test eax, eax
je 0x40579a
inc eax
lea ecx, [esi + edi]
cmp eax, ecx
mov ebp, eax
jae 0x40580a
mov dl, byte [ebp]
mov byte [ebx + ebp], dl
inc ebp
cmp ebp, ecx
jb 0x4057ff
mov ebp, dword [esp + 0x14]
sub eax, esi
jmp 0x40579c
Function at 0x405812
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
lea eax, [ebp + 0x18]
push esi
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
mov esi, dword [ebp + 0x14]
and eax, 0x100
or eax, 0x20019
mov byte [esi], bl
push eax
push ebx
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x405883
lea eax, [ebp + 0xc]
mov dword [ebp + 0xc], 0x400
push eax
lea eax, [ebp + 0x14]
push esi
push eax
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x405872
cmp dword [ebp + 0x14], 1
je 0x405874
cmp dword [ebp + 0x14], 2
je 0x405874
mov byte [esi], bl
push dword [ebp + 0x18]
mov byte [esi + 0x3ff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
pop ebp
ret 0x14
Function at 0x405cb5
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x42c56c], 0
push esi
jne 0x405cec
xor ecx, ecx
push 8
mov eax, ecx
pop esi
mov edx, eax
and dl, 1
neg dl
sbb edx, edx
and edx, 0xedb88320
shr eax, 1
xor eax, edx
dec esi
jne 0x405cc6
mov dword [ecx*4 + 0x42c568], eax
inc ecx
cmp ecx, 0x100
jl 0x405cc1
mov edx, dword [esp + 0x10]
mov eax, dword [esp + 8]
test edx, edx
not eax
jbe 0x405d1d
mov ecx, dword [esp + 0xc]
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
mov esi, dword [esi*4 + 0x42c568]
xor eax, esi
inc ecx
dec edx
jne 0x405cff
pop edi
not eax
pop esi
ret 0xc
Function at 0x401b80
Capabilities:
Get thread local storage value

Disassembly:
push esi
push ebx
sub esp, 0x14
mov dword [esp], 0x407044
call sym._EnterCriticalSection_4
mov ebx, dword [0x40703c]
sub esp, 4
test ebx, ebx
je 0x401bcb
nop
mov eax, dword [ebx]
mov dword [esp], eax
call sym._TlsGetValue_4
sub esp, 4
mov esi, eax
call sym._GetLastError_0
test eax, eax
jne 0x401bc4
test esi, esi
je 0x401bc4
mov eax, dword [ebx + 4]
mov dword [esp], esi
call eax
mov ebx, dword [ebx + 8]
test ebx, ebx
jne 0x401ba0
mov dword [esp], 0x407044
call sym._LeaveCriticalSection_4
sub esp, 4
add esp, 0x14
pop ebx
pop esi
ret

Function at 0x401db0
Capabilities:
Write file on windows

Disassembly:
push esi
push ebx
sub esp, 0x14
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 8], 0x17
mov dword [esp + 4], 1
lea esi, [esp + 0x24]
mov dword [esp], str.Mingw_runtime_failure:_n
lea ebx, [eax + 0x40]
mov dword [esp + 0xc], ebx
call sym._fwrite
mov eax, dword [esp + 0x20]
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._vfprintf
call sym._abort
lea esi, [esi]

Function at 0x401e00
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
push edi
mov edi, ecx
push esi
push ebx
mov ebx, eax
mov esi, edx
sub esp, 0x4c
lea eax, [esp + 0x24]
mov dword [esp + 8], 0x1c
mov dword [esp], ebx
mov dword [esp + 4], eax
call sym._VirtualQuery_12
sub esp, 0xc
test eax, eax
je 0x401ed8
mov eax, dword [esp + 0x38]
cmp eax, 0x40
je 0x401e3e
cmp eax, 4
jne 0x401e60
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
call sym._memcpy
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x30]
lea ebp, [esp + 0x20]
mov dword [esp + 8], 0x40
mov dword [esp + 0xc], ebp
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
mov edx, dword [esp + 0x38]
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [esp + 0x1c], edx
call sym._memcpy
mov edx, dword [esp + 0x1c]
cmp edx, 0x40
je 0x401e4e
cmp edx, 4
je 0x401e4e
mov eax, dword [esp + 0x20]
mov dword [esp + 0xc], ebp
mov dword [esp + 8], eax
mov eax, dword [esp + 0x30]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x24]
mov dword [esp], eax
call sym._VirtualProtect_16
sub esp, 0x10
add esp, 0x4c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], ebx
mov dword [esp + 4], 0x1c
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
call fcn.00401db0
Function at 0x4020d0
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x9c
mov eax, dword [0x4a872c]
push ebx
mov dword [esp + 0x9c], eax
xor ebx, ebx
push esi
xor eax, eax
jmp 0x4020f0
mov cl, byte [eax + str.SoftwareGameOverGamesBraveDwarves2]
mov byte [esp + eax + 0x20], cl
inc eax
cmp cl, bl
jne 0x4020f0
lea eax, [esp + 0x20]
push 0x489590
push eax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x20], 4
mov dword [esp + 0x1c], ebx
call fcn.00460a5b
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
add esp, 8
lea ecx, [esp + 0x10]
push ecx
push eax
push 0x80000002
call esi
test eax, eax
jne 0x4021c7
push edi
push 0x489590
push ebx
mov dword [esp + 0x14], ebx
call fcn.00460a5b
add esp, 8
lea edx, [esp + 0xc]
push edx
push eax
mov eax, dword [esp + 0x1c]
push eax
call esi
test eax, eax
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jne 0x4021bf
push 0x489590
push ebx
mov dword [esp + 0x18], ebx
call fcn.00460a5b
mov edx, dword [esp + 0x14]
add esp, 8
lea ecx, [esp + 0x10]
push ecx
push eax
push edx
call esi
test eax, eax
jne 0x4021b8
lea eax, [esp + 0x20]
push eax
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
push ebx
push 0x48958c
push eax
mov dword [esp + 0x38], 4
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov ecx, dword [esp + 0x10]
push ecx
call edi
mov edx, dword [esp + 0xc]
push edx
call edi
mov eax, dword [esp + 0x14]
push eax
call edi
pop edi
mov eax, dword [esp + 0x14]
mov ecx, dword [0x49e32c]
shr eax, 2
xor eax, ecx
mov ecx, dword [esp + 0xa0]
pop esi
mov dword [0x49e328], eax
pop ebx
call fcn.00460704
add esp, 0x9c
ret

Function at 0x4021f0
Capabilities:
Set registry value

Disassembly:
sub esp, 8
lea eax, [esp + 4]
push eax
push str.SoftwareGameOverGamesBraveDwarves2
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
jne 0x402258
mov edx, dword [0x49e328]
push esi
mov esi, dword [0x49e518]
push edi
mov edi, dword [0x49e51c]
xor edi, esi
mov esi, dword [0x49e32c]
xor esi, edx
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [esp + 0xc]
push 4
lea ecx, [esp + 0xc]
push ecx
push 4
sub esi, edi
push 0
add eax, esi
push 0x48958c
shl eax, 2
push edx
mov dword [esp + 0x20], eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
pop edi
pop esi
add esp, 8
ret
Function at 0x406f20
Capabilities:
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x486bbb
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x59c
mov eax, dword [0x4a872c]
push esi
mov esi, dword [esp + 0x5b4]
push edi
push esi
mov dword [esp + 0x5a4], eax
call fcn.00433280
mov edi, eax
xor eax, eax
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
mov dword [esp + 0x34], eax
lea ecx, [esp + 0x44]
push ecx
mov dword [esp + 0x3c], eax
mov dword [esp + 0x40], eax
push edi
push esi
mov dword [esp + 0x4c], eax
call fcn.00433320
mov esi, eax
add esp, 0x10
test esi, esi
je 0x406fe0
nop
push 1
lea edx, [esp + 0x1a4]
push edx
push esi
call fcn.004332d0
lea eax, [esp + 0x4c]
push str.PATH
push eax
call fcn.00460712
add esp, 0x14
test eax, eax
je 0x406fcd
lea ecx, [esp + 0x40]
push ecx
push edi
push esi
call fcn.00433320
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x406f90
jmp 0x406fe0
xor eax, eax
nop
mov cl, byte [esp + eax + 0x1a0]
mov byte [esp + eax + 0x20], cl
inc eax
test cl, cl
jne 0x406fd0
mov eax, dword [0x12e4848]
xor esi, esi
test eax, eax
jle 0x407013
mov edi, 0x12e4890
lea edx, [esp + 0x20]
push edi
push edx
call fcn.00460712
add esp, 8
test eax, eax
je 0x40712c
mov eax, dword [0x12e4848]
inc esi
add edi, 0x64
cmp esi, eax
jl 0x406ff0
lea eax, [esp + 0x120]
push eax
lea ecx, [esp + 0x24]
push ecx
call fcn.0040f3c0
lea edx, [esp + 0x128]
push edx
lea eax, [esp + 0xac]
push str.Episode__s
push eax
call fcn.00460d7b
mov edx, dword [0x12e4848]
imul edx, edx, 0x64
lea eax, [esp + 0x34]
mov ecx, eax
add esp, 0x14
sub edx, ecx
lea edx, [edx + 0x12e4890]
lea esp, [esp]
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x407060
lea edx, [esp + 0xa0]
push edx
mov ecx, 0x131c878
call fcn.0040f500
push eax
mov eax, dword [0x12e4848]
imul eax, eax, 0x64
add eax, 0x12e4850
push eax
call fcn.00460d5f
mov ecx, dword [0x12e4848]
imul ecx, ecx, 0x64
add ecx, 0x12e4890
push ecx
lea edx, [esp + 0x6c]
push str.Levels_simage.jpg
push edx
call fcn.00460b10
add esp, 0x14
lea ecx, [esp + 8]
call fcn.004256f0
lea eax, [esp + 0x60]
push eax
lea ecx, [esp + 0xc]
mov dword [esp + 0x5b0], 0
call fcn.00426bf0
mov ecx, dword [esp + 0xc]
mov eax, dword [0x12e4848]
mov edx, dword [esp + 8]
push 0x10
push ecx
lea ecx, [eax + eax*2]
push edx
lea ecx, [ecx*8 + 0x12e7188]
call fcn.00425de0
lea eax, [esp + 8]
push eax
mov eax, dword [0x12e4848]
lea ecx, [eax + eax*2]
lea ecx, [ecx*8 + 0x12e7188]
call fcn.00425e70
mov eax, dword [0x12e4848]
inc eax
lea ecx, [esp + 8]
mov dword [0x12e4848], eax
mov dword [esp + 0x5ac], 0xffffffff
call fcn.00426390
mov ecx, dword [esp + 0x5a4]
pop edi
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x59c]
pop esi
call fcn.00460704
add esp, 0x5a8
ret
Function at 0x40dd90
Capabilities:
Check mutex on windows

Disassembly:
sub esp, 0x1c
push esi
push str.BD2.exe_running
push 1
push 0
mov dword [esp + 0x18], 0
call dword [sym.imp.KERNEL32.dll_CreateMutexA]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x40ddca
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop esi
add esp, 0x1c
ret 0x10
call fcn.0040f310
push str.BraveDwarves2.ini
mov byte [0x130f650], 0
call fcn.00402260
mov eax, dword [esp + 0x30]
push str.forcedetaillevellow
push eax
mov dword [0x130f620], 0x320
mov dword [0x130f61c], 0x258
call fcn.004612b0
add esp, 0xc
test eax, eax
je 0x40de1e
mov dword [0xff075c], 1
mov dword [0x49e250], 0
call dword [sym.imp.WINMM.dll_timeGetTime]
mov ecx, dword [0x49e51c]
mov esi, dword [esp + 0x24]
xor eax, ecx
push esi
mov dword [0x49e518], eax
call fcn.0040db10
mov ecx, dword [esp + 0x34]
push ecx
push esi
call fcn.0040d770
add esp, 0xc
push 1
push 0x258
push 0x320
push 0
push 0
call dword [sym.imp.USER32.dll_GetForegroundWindow]
push eax
call dword [sym.imp.USER32.dll_MoveWindow]
push 0
call dword [sym.imp.USER32.dll_SetCursor]
mov edx, dword [0x49e268]
push 0
push edx
call fcn.004298c0
add esp, 8
test eax, eax
jne 0x40de8d
or eax, 0xffffffff
pop esi
add esp, 0x1c
ret 0x10
push str.fontszepplin.ttf
mov ecx, 0x12e7b08
call fcn.0040fdd0
test eax, eax
je 0x40ddc1
push str.fonts_tahoma.ttf
mov ecx, 0x12e7b54
call fcn.0040fdd0
test eax, eax
je 0x40ddc1
push str.sprites_sprites.frm
mov ecx, 0x12e7af0
call fcn.00406500
test eax, eax
je 0x40ddc1
push edi
call fcn.004085e0
push 0
push 0x1546170
call fcn.0041e6c0
mov al, byte [0x130f650]
add esp, 8
test al, al
je 0x40df15
mov eax, dword [0x49e32c]
mov edi, dword [0x49e328]
xor ecx, ecx
xor eax, edi
cmp eax, 0x36ee80
setle cl
push ecx
push 0x1450dc0
call fcn.0041e6c0
add esp, 8
mov eax, dword [0x130f648]
test eax, eax
push ebp
jne 0x40df88
mov esi, dword [sym.imp.USER32.dll_PeekMessageA]
mov edi, dword [sym.imp.USER32.dll_GetMessageA]
mov ebp, dword [sym.imp.USER32.dll_TranslateMessage]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x1c]
push edx
call esi
test eax, eax
je 0x40df69
push 0
push 0
push 0
lea eax, [esp + 0x18]
push eax
call edi
test eax, eax
je 0x40dfae
lea ecx, [esp + 0xc]
push ecx
call ebp
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.USER32.dll_DispatchMessageA]
jmp 0x40df7f
mov eax, dword [0x130f624]
test eax, eax
je 0x40df79
call fcn.0040dcc0
jmp 0x40df7f
call dword [sym.imp.USER32.dll_WaitMessage]
mov eax, dword [0x130f648]
test eax, eax
je 0x40df31
push str.BraveDwarves2.ini
call fcn.004026b0
add esp, 4
call fcn.0042bb40
call fcn.0041dc20
call fcn.004296e0
call fcn.0040eb00
call fcn.00429df0
mov eax, dword [esp + 0x14]
pop ebp
pop edi
pop esi
add esp, 0x1c
ret 0x10
Function at 0x41b7a0
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push edi
mov edi, dword [esp + 0x10]
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x41b7b9
pop edi
pop ebx
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x41b7cd
pop esi
pop edi
xor eax, eax
pop ebx
ret
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [esp + 0x18]
add eax, esi
and ecx, 0xf
jbe 0x41b7ee
cmp esi, eax
jae 0x41b7c7
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x41b7e0
cmp esi, eax
jae 0x41b7c7
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop edi
pop ebx
ret

Function at 0x41c6f0
Capabilities:
Access peb ldr_data

Disassembly:
push 0xffffffffffffffff
push 0x487158
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
mov esi, dword [esp + 0x1c]
mov eax, dword [esi]
mov ecx, dword [eax - 0x10]
mov edx, dword [ecx]
push edi
xor edi, edi
mov dword [esp + 8], edi
call dword [edx + 0x10]
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x24]
mov eax, dword [eax]
mov edx, dword [eax - 0xc]
mov ecx, dword [esi]
mov esi, dword [ecx - 0xc]
push edx
push eax
push esi
push ecx
lea ecx, [esp + 0x30]
push ecx
mov dword [esp + 0x28], edi
call fcn.0041c430
mov esi, dword [esp + 0x34]
add esi, 0xfffffff0
push esi
call fcn.0041bdc0
mov edi, dword [esp + 0x34]
add eax, 0x10
mov dword [edi], eax
add esp, 0x18
mov dword [esp + 0x14], 0xffffffff
lea edx, [esi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x41c782
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call dword [edx + 4]
mov ecx, dword [esp + 0xc]
mov eax, edi
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret
Function at 0x4298c0
Capabilities:
Get common file path

Disassembly:
push 0xffffffffffffffff
push 0x4873e6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x4ac
mov eax, dword [0x4a872c]
push ebx
xor ebx, ebx
mov dword [esp + 0x4ac], eax
mov dword [0x156ac1c], ebx
call fcn.0040f310
push 0x48c9c8
push 0x48c9c4
push str.Game_version:__s._s_n_n
call fcn.0040f390
add esp, 0xc
push 1
call dword [sym.imp.WINMM.dll_timeBeginPeriod]
push 0x80000003
call dword [sym.imp.KERNEL32.dll_SetThreadExecutionState]
push ebx
call fcn.004624db
push eax
call fcn.0046000d
add esp, 8
push 0x156ac20
push 0x100
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov eax, dword [0x1579878]
cmp eax, ebx
je 0x42996c
mov ecx, dword [esp + 0x20]
mov edx, dword [0x157987c]
push ecx
push 0x1579874
push edx
push eax
call fcn.004097b0
mov eax, dword [0x1579878]
push eax
call fcn.0047e545
add esp, 0x14
push 3
push str.DATA_
push str.BD2.dat
mov dword [0x1579878], ebx
mov dword [0x157987c], ebx
mov dword [0x1579880], ebx
call fcn.00437fd0
add esp, 0xc
push 5
push str.DATA_
lea ecx, [esp + 0xc]
mov dword [esp + 0x24], 0xf
mov dword [esp + 0x20], ebx
mov byte [esp + 0x10], bl
call fcn.004018d0
lea ecx, [esp + 4]
push ecx
mov ecx, 0x1579874
mov dword [esp + 0x4bc], ebx
call fcn.00409e20
cmp dword [esp + 0x1c], 0x10
mov dword [esp + 0x4b8], 0xffffffff
jb 0x4299e7
mov edx, dword [esp + 8]
push edx
call fcn.0047e545
add esp, 4
mov eax, dword [esp + 0x4c0]
push ebx
push eax
push 0x258
push 0x320
mov dword [esp + 0x2c], 0xf
mov dword [esp + 0x28], ebx
mov byte [esp + 0x18], bl
call fcn.0042ae50
add esp, 0x10
test eax, eax
je 0x429b50
push 1
call fcn.0042b8b0
add esp, 4
test eax, eax
je 0x429a3b
push str.Textseng_str_eng.txt
mov ecx, 0x131c878
call fcn.0040fae0
test eax, eax
jne 0x429a43
or eax, 0xffffffff
jmp 0x429b50
cmp dword [0x49e260], ebx
je 0x429a65
mov ecx, dword [esp + 0x4c4]
push ecx
call fcn.0040f110
add esp, 4
test eax, eax
je 0x429a65
mov dword [0x49e260], ebx
push ebx
push str.Editor_settings.ini
lea ecx, [esp + 0x2c]
call fcn.0040b9a0
cmp dword [esp + 0x4a8], ebx
mov dword [esp + 0x4b8], 1
je 0x429ab4
push str.Editor_settings
lea ecx, [esp + 0x28]
call fcn.0040bba0
push 0x100
push str.LevelsCastleepisode.ini
push 0x489641
push str.Last_workspace
push ebx
lea ecx, [esp + 0x38]
call fcn.0040c450
mov ecx, dword [0x1579850]
mov eax, dword [0x49e24c]
and ecx, 0xfffffffe
cmp eax, ebx
mov dword [0x1579850], ecx
mov dword [0x1cf9db0], ebx
mov dword [0x1cf9d94], ebx
mov dword [0x1cf9d90], ebx
mov dword [0x1cf6b88], ebx
je 0x429b09
mov eax, dword [0x49e250]
sub eax, ebx
mov ecx, 8
je 0x429aff
dec eax
jne 0x429b04
mov ecx, 0x10
push 1
push ecx
jmp 0x429b0c
mov ecx, 0x20
push 1
push ecx
jmp 0x429b0c
push ebx
push 4
call fcn.00431f20
mov edx, dword [0x1d040e8]
add esp, 8
push edx
call fcn.00427580
add esp, 4
call fcn.00424da0
call fcn.0042cfb0
lea ecx, [esp + 0x24]
mov dword [0x156ac1c], 1
mov dword [esp + 0x4b8], 0xffffffff
call fcn.0040b770
mov eax, 1
mov ecx, dword [esp + 0x4b0]
mov dword fs:[0], ecx
mov ecx, dword [esp + 0x4ac]
pop ebx
call fcn.00460704
add esp, 0x4b8
ret