joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46e970
Capabilities:
Access peb ldr_data
Get number of processors

Disassembly:
push 0xffffffffffffffff
push 0x4aaab3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebp
push esi
mov esi, ecx
push edi
mov dword [esp + 0xc], esi
call fcn.0049c59e
lea edi, [esi + 0x64]
mov dword [esp + 0x18], 0
mov dword [edi + 4], 0
mov dword [edi], vtable.CBrush.0
mov eax, dword [esp + 0x2c]
mov ebp, dword [esp + 0x24]
mov ecx, dword [esp + 0x30]
mov dword [esi + 0x3c], eax
mov eax, ebp
mov dword [esi], method.CEdit.virtual_0
mov dword [esi + 0x40], ecx
mov dword [esi + 0x44], 0
mov ecx, dword [eax]
lea edx, [esi + 0x48]
mov byte [esp + 0x18], 1
mov dword [edx], ecx
mov ecx, dword [eax + 4]
mov dword [edx + 4], ecx
mov ecx, dword [eax + 8]
mov dword [edx + 8], ecx
mov eax, dword [eax + 0xc]
mov ecx, dword [esp + 0x40]
mov dword [edx + 0xc], eax
mov eax, dword [esp + 0x44]
push eax
mov dword [esi + 0x5c], ecx
mov dword [esi + 0x60], eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
push eax
mov ecx, edi
call fcn.004a1d11
mov edx, dword [esp + 0x28]
mov eax, dword [esp + 0x20]
push edx
push eax
push ebp
push 0x50800044
mov ecx, esi
call fcn.004a3269
test eax, eax
je 0x46ea8c
mov ecx, dword [esp + 0x3c]
call fcn.004a1d3e
mov ecx, dword [esi + 0x1c]
mov ebp, dword [sym.imp.USER32.dll_SendMessageA]
push 0
push eax
push 0x30
push ecx
mov dword [esi + 0x58], eax
call ebp
mov edi, dword [esp + 0x34]
test edi, edi
je 0x46ea50
push edi
mov ecx, esi
call fcn.0049f303
mov ecx, esi
call fcn.0046ebf0
cmp dword [esp + 0x38], 1
jne 0x46ea85
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [esi + 0x1c]
push 0xffffffffffffffff
not ecx
dec ecx
push ecx
push 0xb1
push edx
call ebp
mov eax, dword [esi + 0x1c]
push 0
push 0
push 0xb7
push eax
call ebp
mov ecx, esi
call fcn.0049f46d
mov ecx, dword [esp + 0x10]
mov eax, esi
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
add esp, 0x10
ret 0x28
Function at 0x4714a0
Capabilities:
Check for software breakpoints

Disassembly:
push esi
mov esi, dword [esp + 8]
cmp dword [esi + 0x10], 0xca
jne 0x4714d3
push esi
call fcn.004745b0
mov eax, dword [esi + 0x40]
add esp, 4
test eax, eax
je 0x4714cc
mov dword [esi + 0x10], 0xcf
mov eax, 1
pop esi
ret
mov dword [esi + 0x10], 0xcb
mov eax, dword [esi + 0x10]
cmp eax, 0xcb
jne 0x471559
mov eax, dword [esi + 0x1b0]
mov ecx, dword [eax + 0x10]
test ecx, ecx
je 0x471542
mov eax, dword [esi + 8]
test eax, eax
je 0x4714f7
push esi
call dword [eax]
add esp, 4
mov ecx, dword [esi + 0x1b0]
push esi
call dword [ecx]
add esp, 4
test eax, eax
je 0x47153e
cmp eax, 2
je 0x471542
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4714ea
cmp eax, 3
je 0x47151d
cmp eax, 1
jne 0x4714ea
mov eax, dword [ecx + 4]
inc eax
mov dword [ecx + 4], eax
mov eax, dword [esi + 8]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
cmp edx, ecx
jl 0x4714ea
mov edx, dword [esi + 0x13c]
add edx, ecx
mov dword [eax + 8], edx
jmp 0x4714ea
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x90]
push esi
mov dword [esi + 0x98], eax
call fcn.00471580
add esp, 4
pop esi
ret
cmp eax, 0xcc
je 0x471568
mov ecx, dword [esi]
push esi
call dword [ecx]
add esp, 4
push esi
call fcn.00471580
add esp, 4
pop esi
ret
Function at 0x47f800
Capabilities:
Capture screenshot

Disassembly:
sub esp, 0x10
lea eax, [esp]
push esi
mov esi, dword [esp + 0x18]
push eax
mov ecx, dword [esi]
push ecx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [esi]
push edx
call dword [sym.imp.USER32.dll_GetWindowDC]
push eax
mov dword [esi + 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 1
push eax
mov dword [esi + 8], eax
call dword [sym.imp.GDI32.dll_SetBkMode]
mov eax, dword [esi + 0x10]
test eax, eax
je 0x47f84a
push eax
mov eax, dword [esi + 8]
mov dword [esi + 0x18], 0
push eax
jmp 0x47f879
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 8]
mov edx, dword [esp + 0xc]
sub ecx, eax
mov eax, dword [esi + 4]
push ecx
mov ecx, dword [esp + 8]
mov dword [esi + 0x18], 1
sub edx, ecx
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ecx, dword [esi + 8]
push eax
mov dword [esi + 0x10], eax
push ecx
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0xc]
cmp eax, 1
jne 0x47f8bb
mov edx, dword [esi + 4]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push 0xcc0020
push 0
push 0
push edx
mov edx, dword [esp + 0x18]
sub eax, edx
mov edx, dword [esp + 0x14]
sub ecx, edx
mov edx, dword [esi + 8]
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [esi + 8]
pop esi
add esp, 0x10
ret 4
Function at 0x49d394
Capabilities:
Get graphical window text

Disassembly:
push esi
mov esi, ecx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x49d3cc
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextLengthA]
lea ecx, [eax + 1]
push ecx
mov ecx, dword [esp + 0xc]
push eax
call fcn.0049b421
push eax
push dword [esi + 0x1c]
call dword [sym.imp.USER32.dll_GetWindowTextA]
mov ecx, dword [esp + 8]
push 0xffffffffffffffff
call fcn.0049b3f9
jmp 0x49d3d8
mov eax, dword [ecx]
push dword [esp + 8]
call dword [eax + 0x88]
pop esi
ret 4

Function at 0x49ea89
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebx
push esi
push edi
xor edi, edi
cmp dword [esp + 0x10], edi
mov ebx, ecx
je 0x49eacb
call fcn.004a4775
mov esi, dword [eax + 0xc]
push 0xf0
push dword [esp + 0x14]
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
cmp eax, edi
je 0x49eacb
push eax
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
cmp eax, edi
jne 0x49eac2
xor eax, eax
jmp 0x49ead3
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov edi, eax
push edi
mov ecx, ebx
call fcn.0049ead9
pop edi
pop esi
pop ebx
ret 4

Function at 0x4a4ca5
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
mov esi, ecx
lea ebx, [esi + 0x1c]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [esp + 0x10], 0
jne 0x4a4cd3
push dword [esi]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x4a4cf1
push dword [esp + 0xc]
mov ecx, esi
push eax
call fcn.004a4c0b
jmp 0x4a4cf1
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4a4cf1
push edi
push dword [esp + 0x10]
mov edi, dword [eax + 4]
mov ecx, esi
push eax
call fcn.004a4c0b
test edi, edi
mov eax, edi
jne 0x4a4cdb
pop edi
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop esi
pop ebx
ret 8
Function at 0x406887
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push esi
push edi
mov eax, 0x1a1
cmp eax, 0x24
ja 0x406895
call 0x8566821
mov al, byte [0x8b640041]
cmp eax, 0x30
call dword [sym.imp.KERNEL32.dll_FreeConsole]
mov edi, dword fs:[0x30]
mov edi, dword [edi + 0xc]
mov esi, dword [edi + 0xc]
mov eax, dword [esi]
mov eax, dword [eax]
mov eax, dword [eax + 0x18]
mov dword [0x44ee30], eax
sub eax, eax
je 0x4068ba
jmp 0xa8d65173
call 0x401154
call 0x40664a
pop edi
xor eax, eax
pop esi
ret

Function at 0x407505
Capabilities:
Parse pe header

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

Function at 0x40d5db
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2c8
push 0x41c2c0
push str.FlsAlloc
push 0x1e
call fcn.0040d49c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d60f
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
jmp 0x40d615
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x40d659
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x41c2d8
push 0x41c2d0
push str.FlsGetValue
push 0x20
call fcn.0040d49c
mov esi, eax
add esp, 0x10
test esi, esi
je 0x40d690
push dword [ebp + 8]
mov ecx, esi
call dword [0x41a120]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x40180d
Capabilities:
Terminate process

Disassembly:
test word [0x426b68], 0x1000
je 0x4010eb
int3
push 1
call fcn.0040e3bc
int3
cmp dword [0x427dc8], 0
mov eax, dword [0x426d7c]
mov ecx, dword [0x427d80]
push esi
push edi
mov esi, eax
mov edi, ecx
je 0x401842
call fcn.004010a9
lea eax, [esp + 0x10]
push eax
push dword [esp + 0x10]
push edi
push esi
call dword [0x427dc8]
add esp, 0x10
jmp 0x401863
lea edx, [esp + 0x10]
push edx
push dword [esp + 0x10]
push ecx
push eax
push str.ABORT:
push 0
push 1
call fcn.004015df
add esp, 0x1c
call fcn.004010a9
jmp 0x4010df

Function at 0x401868
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
mov ecx, dword [esp + 4]
or eax, 0xffffffff
test ecx, ecx
je 0x4018a0
mov edx, dword [esp + 8]
add edx, ecx
cmp ecx, edx
jae 0x40189d
push esi
push edi
movzx edi, byte [ecx]
mov esi, eax
and esi, 0xff
xor esi, edi
shr eax, 8
xor eax, dword [esi*4 + 0x425018]
inc ecx
cmp ecx, edx
jb 0x40187f
pop edi
pop esi
not eax
ret
push 0x660
push str.E:_sourcedemo2emucoreemu_core.c
call fcn.00401130
pop ecx
pop ecx
push str.Pointer_is_NULL_n
call fcn.0040180d
int3
Function at 0x4020d9
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
and dword [ebp - 0xc], 0
and dword [ebp - 8], 0
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
push esi
call fcn.004010c2
test eax, eax
mov ebx, dword [ebp + 0x10]
pop ecx
je 0x402262
lea eax, [esi + ebx]
push eax
call fcn.004010c2
test eax, eax
pop ecx
je 0x402262
xor edi, edi
mov eax, esi
mov ecx, edi
sar eax, cl
xor eax, 0xffffffcc
cmp byte [edi + esi], al
je 0x402124
inc dword [ebp - 0xc]
inc edi
cmp edi, 4
jl 0x402113
lea eax, [ebx + 0xb]
and eax, 0xfffffffc
lea eax, [eax + esi - 4]
mov dword [ebp - 0x10], eax
xor edi, edi
mov edx, esi
mov ecx, edi
sar edx, cl
xor edx, 0xffffffcc
cmp byte [edi + eax], dl
je 0x40214a
inc dword [ebp - 8]
inc edi
cmp edi, 4
jl 0x402139
cmp dword [ebp - 0xc], 0
jne 0x402164
cmp dword [ebp - 8], 0
jne 0x402164
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
push 4
push dword [ebp - 8]
lea eax, [esi + 4]
push dword [ebp - 0xc]
mov dword [ebp - 0x14], eax
push eax
push ebx
mov ebx, str.Memory_corrupt___d___Addr:0x_p_Before:_d_After:_d_Max:_d__n
push ebx
call fcn.0040179c
push str.Expected:
call fcn.0040179c
add esp, 0x1c
and dword [ebp - 4], 0
mov edi, str.__.2X
mov ecx, dword [ebp - 4]
mov eax, esi
sar eax, cl
xor eax, 0xffffffcc
and eax, 0xff
push eax
push edi
call fcn.0040179c
inc dword [ebp - 4]
cmp dword [ebp - 4], 4
pop ecx
pop ecx
jl 0x402195
push 0x41f474
call fcn.0040179c
cmp dword [ebp - 0xc], 0
pop ecx
je 0x4021fa
push str.Prior_corruption:
call fcn.0040179c
and dword [ebp - 4], 0
pop ecx
mov eax, dword [ebp - 4]
movzx eax, byte [eax + esi]
push eax
push edi
call fcn.0040179c
inc dword [ebp - 4]
cmp dword [ebp - 4], 8
pop ecx
pop ecx
jl 0x4021d6
push 0x41f474
call fcn.0040179c
pop ecx
cmp dword [ebp - 8], 0
je 0x40222e
push str.After_corruption:
call fcn.0040179c
pop ecx
xor esi, esi
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax + esi]
push eax
push edi
call fcn.0040179c
inc esi
cmp esi, 8
pop ecx
pop ecx
jl 0x40220d
push 0x41f474
call fcn.0040179c
pop ecx
cmp dword [ebp + 8], 1
jne 0x40225b
call fcn.00401fa4
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0040111a
add esp, 8
push 4
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x14]
push dword [ebp + 0x10]
push ebx
call fcn.0040180d
xor eax, eax
jmp 0x40215f
call fcn.00401fa4
push dword [ebp + 0x18]
push dword [ebp + 0x14]
call fcn.0040111a
add esp, 8
lea eax, [esi + ebx]
push eax
push esi
push ebx
push str.Invalid_memory_address___d___From:0x_p_To:0x_p__n
call fcn.0040180d
int3
Function at 0x402913
Capabilities:
Set console window title

Disassembly:
push esi
call fcn.00401087
cmp dword [esp + 8], 0
mov eax, dword [esp + 0xc]
mov dword [0x426b68], eax
mov esi, 0x426b70
je 0x402945
push 0x104
push dword [esp + 0xc]
push esi
call fcn.00403610
mov eax, dword [0x426b68]
add esp, 0xc
test ax, 0x100
je 0x40296a
test al, 8
jne 0x40296a
push 0x391
push str.E:_sourcedemo2emucoreemu_core.c
call fcn.00401130
pop ecx
pop ecx
push str.Threaded_logging_requires_append_to_be_on_n
call fcn.0040180d
mov ecx, dword [0x426b6c]
test ecx, ecx
je 0x402980
push ecx
call fcn.0040e4dc
mov eax, dword [0x426b68]
pop ecx
and dword [0x426b6c], 0
test eax, eax
jne 0x402992
call fcn.004010a9
jmp 0x4029eb
test al, 1
je 0x4029b9
cmp dword [0x427d8c], 0
jne 0x4029b9
call dword [sym.imp.KERNEL32.dll_AllocConsole]
push 0xfffffffffffffff5
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push esi
mov dword [0x427d8c], eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
call fcn.004010a9
test byte [0x426b68], 4
je 0x4029eb
mov eax, dword [section..data]
cmp byte [eax], 0x3f
push eax
push str.0.50
jne 0x4029de
push str.EmuCore_v_s_n
jmp 0x4029e3
push str.EmuCore_v_s__rev:__s__n
call fcn.004017c6
add esp, 0xc
xor eax, eax
inc eax
pop esi
ret
Function at 0x4029f0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
lea ebp, [esp - 0x88]
sub esp, 0x108
mov eax, dword [0x425848]
xor eax, ebp
mov dword [ebp + 0x84], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 0x90]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
xor ebx, ebx
cmp dword [0x427d90], ebx
mov dword [0x426c74], eax
je 0x402a44
push 0x3cf
push str.E:_sourcedemo2emucoreemu_core.c
call fcn.00401130
pop ecx
pop ecx
push str.Emucore_already_initialized_n
call fcn.0040180d
call fcn.0040104b
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
test eax, eax
jne 0x402a6b
push 0x3d3
push str.E:_sourcedemo2emucoreemu_core.c
call fcn.00401130
pop ecx
pop ecx
push str.Unable_to_retrieve_commandline__n
jmp 0x402a3f
push 0x426b60
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
mov esi, 0x104
push esi
lea eax, [ebp - 0x80]
push eax
push ebx
mov byte [ebp - 0x80], bl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea eax, [ebp - 0x80]
push 0x41fbec
push eax
call fcn.004039a0
cmp eax, 1
pop ecx
pop ecx
jne 0x402ac8
lea eax, [ebp - 0x80]
push str._UNC_
push eax
call fcn.004039a0
pop ecx
pop ecx
cmp eax, 1
push esi
lea eax, [ebp - 0x78]
je 0x402abb
lea eax, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00403610
add esp, 0xc
cmp byte [edi + 1], 0x3a
je 0x402b25
mov al, byte [edi]
cmp al, 0x2f
je 0x402b25
cmp al, 0x5c
je 0x402b25
lea eax, [ebp - 0x80]
push eax
call fcn.00403582
cmp eax, ebx
pop ecx
jl 0x402b04
mov cl, byte [ebp + eax - 0x80]
cmp cl, 0x5c
je 0x402af9
cmp cl, 0x2f
je 0x402af9
dec eax
jns 0x402ae6
jmp 0x402afd
mov byte [ebp + eax - 0x7f], bl
cmp eax, ebx
jne 0x402b04
mov byte [ebp - 0x80], bl
push edi
call fcn.00403582
cmp eax, 1
pop ecx
lea eax, [ebp - 0x80]
jg 0x402b22
push str.debug.log
push eax
call fcn.00404707
pop ecx
pop ecx
jmp 0x402b33
push edi
jmp 0x402b18
push esi
lea eax, [ebp - 0x80]
push edi
push eax
call fcn.00403610
add esp, 0xc
push dword [ebp + 0x94]
lea eax, [ebp - 0x80]
push eax
call fcn.00402913
pop ecx
pop ecx
mov ecx, dword [ebp + 0x84]
pop edi
xor eax, eax
pop esi
xor ecx, ebp
inc eax
pop ebx
call fcn.0040f870
add ebp, 0x88
leave
ret
Function at 0x403680
Capabilities:
Hash data with crc32

Disassembly:
mov edx, dword [esp + 4]
mov cl, byte [edx]
or eax, 0xffffffff
cmp dword [esp + 8], 1
push esi
je 0x4036e9
test cl, cl
je 0x4036c2
push ebx
mov bl, cl
sub bl, 0x61
inc edx
cmp bl, 0x19
ja 0x4036a4
add cl, 0xe0
mov esi, eax
movzx ecx, cl
and esi, 0xff
xor esi, ecx
mov cl, byte [edx]
shr eax, 8
xor eax, dword [esi*4 + 0x425018]
test cl, cl
jne 0x403696
pop ebx
mov ecx, dword [esp + 0x10]
not eax
mov dword [ecx], eax
xor eax, eax
inc eax
pop esi
ret
mov esi, eax
movzx ecx, cl
and esi, 0xff
xor esi, ecx
shr eax, 8
xor eax, dword [esi*4 + 0x425018]
inc edx
mov cl, byte [edx]
test cl, cl
jne 0x4036cf
jmp 0x4036c2
Function at 0x4087ca
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x38
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
xor edi, edi
inc edi
xor ebx, ebx
cmp dword [ebp + 0xc], edi
jne 0x408801
push esi
call fcn.00403582
pop ecx
jmp 0x4087f6
mov cl, byte [eax + esi]
cmp cl, 0x5c
je 0x4087fb
cmp cl, 0x2f
je 0x4087fb
dec eax
jns 0x4087e9
jmp 0x408801
add eax, esi
mov byte [eax], bl
mov ebx, eax
cmp dword [ebp + 0x10], edi
jne 0x408813
push esi
push str.Check_dir___s__n
call fcn.004017c6
pop ecx
pop ecx
cmp byte [esi], 0
jne 0x408826
test ebx, ebx
je 0x40881f
mov byte [ebx], 0x5c
mov eax, edi
jmp 0x4088b0
cmp byte [esi + 1], 0x3a
jne 0x408832
cmp byte [esi + 2], 0
je 0x40881f
lea eax, [ebp - 0x38]
push eax
push esi
call fcn.00408748
test eax, eax
pop ecx
pop ecx
jne 0x4088a6
push esi
call fcn.00403582
pop ecx
mov edi, eax
jmp 0x408858
mov al, byte [edi + esi]
cmp al, 0x5c
je 0x40885d
cmp al, 0x2f
je 0x40885d
dec edi
jns 0x40884d
jmp 0x408861
mov byte [edi + esi], 0
test edi, edi
jle 0x408886
push dword [ebp + 0x10]
push 0
push esi
call fcn.004087ca
add esp, 0xc
test eax, eax
mov byte [edi + esi], 0x5c
jne 0x408886
test ebx, ebx
je 0x408882
mov byte [ebx], 0x5c
xor eax, eax
jmp 0x4088b0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
je 0x4088b5
cmp dword [ebp + 0x10], 1
jne 0x4088a6
push esi
push str.Create_Dir___s_n
call fcn.004017c6
pop ecx
pop ecx
test ebx, ebx
je 0x4088ad
mov byte [ebx], 0x5c
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
je 0x4088a6
push esi
push eax
push eax
push str.Unable_to_create___d:_.8X__Dir___s_n
call fcn.004017c6
add esp, 0x10
jmp 0x408882

Function at 0x408b74
Capabilities:
Clear file content

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov ebx, 0x2ba
mov esi, str.E:_sourcedemo2emucore_file.c
jne 0x408ba1
push ebx
push esi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
cmp dword [edi], esi
je 0x408bbd
push ebx
push esi
call fcn.00401130
push esi
push dword [edi]
push edi
push str.Struct_mismatch_pointer__0x_p:_s____s__n
call fcn.0040180d
add esp, 0x18
lea eax, [ebp - 8]
push eax
push edi
call fcn.00408ad4
test eax, eax
pop ecx
pop ecx
jne 0x408bd1
xor eax, eax
jmp 0x408c13
push dword [edi + 0x2ac]
call fcn.0041133b
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x408c10
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
call esi
push eax
push dword [ebp - 4]
add edi, 0x164
push dword [ebp - 8]
push edi
push str.Unable_to_truncate_file___s____I64d____d:_.8X__n
call fcn.004017c6
add esp, 0x18
jmp 0x408bcd
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x408c18
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
test edi, edi
mov ebx, 0x2e0
mov esi, str.E:_sourcedemo2emucore_file.c
jne 0x408c43
push ebx
push esi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
cmp dword [edi], esi
je 0x408c5f
push ebx
push esi
call fcn.00401130
push esi
push dword [edi]
push edi
push str.Struct_mismatch_pointer__0x_p:_s____s__n
call fcn.0040180d
add esp, 0x18
cmp dword [ebp + 0xc], 0
jne 0x408c7d
push 0x2e1
push esi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
mov ebx, dword [ebp + 0x14]
test ebx, ebx
jne 0x408c9c
push 0x2e2
push esi
call fcn.00401130
push str.Pointer_is_NULL_n
call fcn.0040180d
add esp, 0xc
and dword [ebx], 0
mov eax, dword [edi + 0x2ac]
test eax, eax
push dword [ebp + 0x10]
jne 0x408cc2
add edi, 0x164
push edi
push str.File_not_opened_for_read___s___d__n
call fcn.004017c6
add esp, 0xc
jmp 0x408cff
push dword [ebp + 0xc]
push eax
call fcn.00411bce
add esp, 0xc
cmp eax, 0xffffffff
mov dword [ebx], eax
je 0x408cde
test eax, eax
je 0x408cfc
xor eax, eax
inc eax
jmp 0x408d01
call fcn.0040ed67
push dword [eax]
add edi, 0x164
push dword [ebp + 0x10]
push edi
push str.Failed_on_File_Read___s___d___d__n
call fcn.004017c6
add esp, 0x10
and dword [ebx], 0
xor eax, eax
pop edi
pop esi
pop ebx
pop ebp
ret

Function at 0x4093dd
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push esi
push dword [ebp + 0x1c]
mov esi, dword [ebp + 8]
push dword [ebp + 0x18]
push dword [ebp + 0xc]
push 0
push dword [ebp + 0x14]
push dword [esi + 8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
je 0x40941c
cmp dword [esi + 4], 1
jne 0x409418
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push str.Unable_to_set_registry__s__s_n
call fcn.004017c6
add esp, 0xc
xor eax, eax
jmp 0x40941f
xor eax, eax
inc eax
pop esi
pop ebp
ret

Function at 0x409422
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x1c]
push esi
mov esi, dword [ebp + 0x20]
and dword [esi], 0
push edi
mov edi, dword [ebp + 8]
mov dword [ebp + 0x1c], eax
lea eax, [ebp + 0x1c]
push eax
push dword [ebp + 0x18]
lea eax, [ebp + 0x20]
push eax
push 0
push dword [ebp + 0x14]
push dword [edi + 8]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
je 0x409470
cmp dword [edi + 4], 1
jne 0x40946c
push dword [ebp + 0x10]
push dword [ebp + 0x14]
push str.Unable_to_get_registry__s__s_n
call fcn.004017c6
add esp, 0xc
xor eax, eax
jmp 0x4094b5
mov ecx, dword [ebp + 0xc]
cmp dword [ebp + 0x20], ecx
mov eax, dword [ebp + 0x1c]
mov dword [esi], eax
je 0x409499
cmp dword [edi + 4], 1
jne 0x40946c
push ecx
push dword [ebp + 0x20]
push dword [ebp + 0x14]
push str.Bad_type_for__s__0x_.8X___0x_.8X__n
call fcn.004017c6
add esp, 0x10
jmp 0x40946c
cmp ecx, 1
je 0x4094a8
cmp ecx, 2
je 0x4094a8
cmp ecx, 7
jne 0x4094b2
test eax, eax
jne 0x4094b2
mov eax, dword [ebp + 0x18]
mov byte [eax], 0
xor eax, eax
inc eax
pop edi
pop esi
pop ebp
ret
Function at 0x409a11
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push 1
push dword [esp + 8]
call fcn.004088d4
pop ecx
xor eax, eax
pop ecx
inc eax
ret

Function at 0x409a30
Capabilities:
Get common file path

Disassembly:
push dword [esp + 4]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push 1
push dword [esp + 8]
call fcn.004088d4
pop ecx
xor eax, eax
pop ecx
inc eax
ret