joyce8/EMBER2024-capa huggingface dataset:
Function at 0x6f0ce0
Capabilities:
Packed with generic packer

Disassembly:
pushal
mov esi, section.UPX1
lea edi, [esi - 0x1c1000]
push edi
jmp 0x6f0cfa
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
add ebx, ebx
jne 0x6f0d01
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x6f0cf0
mov eax, 1
add ebx, ebx
jne 0x6f0d13
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
add ebx, ebx
jae 0x6f0d24
jne 0x6f0d43
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x6f0d43
dec eax
add ebx, ebx
jne 0x6f0d30
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc eax, eax
jmp 0x6f0d08
add ebx, ebx
jne 0x6f0d3f
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
jmp 0x6f0d95
xor ecx, ecx
sub eax, 3
jb 0x6f0d5b
shl eax, 8
mov al, byte [esi]
inc esi
xor eax, 0xffffffff
je 0x6f0dca
sar eax, 1
mov ebp, eax
jmp 0x6f0d66
add ebx, ebx
jne 0x6f0d66
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x6f0d34
inc ecx
add ebx, ebx
jne 0x6f0d74
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jb 0x6f0d34
add ebx, ebx
jne 0x6f0d81
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
adc ecx, ecx
add ebx, ebx
jae 0x6f0d76
jne 0x6f0d92
mov ebx, dword [esi]
sub esi, 0xfffffffc
adc ebx, ebx
jae 0x6f0d76
add ecx, 2
cmp ebp, 0xfffffb00
adc ecx, 2
lea edx, [edi + ebp]
cmp ebp, 0xfffffffc
jbe 0x6f0db4
mov al, byte [edx]
inc edx
mov byte [edi], al
inc edi
dec ecx
jne 0x6f0da6
jmp 0x6f0cf6
mov eax, dword [edx]
add edx, 4
mov dword [edi], eax
add edi, 4
sub ecx, 4
ja 0x6f0db4
add edi, ecx
jmp 0x6f0cf6
pop esi
mov edi, esi
mov ecx, 0x8f59
mov al, byte [edi]
inc edi
sub al, 0xe8
cmp al, 1
ja 0x6f0dd2
cmp byte [edi], 0x16
jne 0x6f0dd2
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 al, bl
loop 0x6f0dd7
lea edi, [esi + 0x2e4000]
mov eax, dword [edi]
or eax, eax
je 0x6f0e4f
mov ebx, dword [edi + 4]
lea eax, [eax + esi + 0x3bef04]
add ebx, esi
push eax
add edi, 8
call dword [esi + 0x3bf124]
xchg ebp, eax
mov al, byte [edi]
inc edi
or al, al
je 0x6f0e04
mov ecx, edi
jns 0x6f0e33
movzx eax, word [edi]
inc edi
push eax
inc edi
mov ecx, 0xaef24857
push edi
dec eax
repne scasb al, byte es:[edi]
push ebp
call dword [esi + 0x3bf12c]
or eax, eax
je 0x6f0e49
mov dword [ebx], eax
add ebx, 4
jmp 0x6f0e21
call dword [esi + 0x3bf128]
add edi, 4
lea ebx, [esi - 4]
xor eax, eax
mov al, byte [edi]
inc edi
or eax, eax
je 0x6f0e80
cmp al, 0xef
ja 0x6f0e73
add ebx, eax
mov eax, dword [ebx]
xchg ah, al
rol eax, 0x10
xchg ah, al
add eax, esi
mov dword [ebx], eax
jmp 0x6f0e55
and al, 0xf
shl eax, 0x10
mov ax, word [edi]
add edi, 2
jmp 0x6f0e62
mov ebp, dword [esi + 0x3bf130]
lea edi, [esi - 0x1000]
mov ebx, 0x1000
push eax
push esp
push 4
push ebx
push edi
call ebp
lea eax, [edi + 0x267]
and byte [eax], 0x7f
and byte [eax + 0x28], 0x7f
pop eax
push eax
push esp
push eax
push ebx
push edi
call ebp
pop eax
popal
lea eax, [esp - 0x80]
push 0
cmp esp, eax
jne 0x6f0eb4
sub esp, 0xffffff80
jmp 0x4e2757
Function at 0x401b10
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x28
push ebp
push esi
mov esi, ecx
push edi
xor eax, eax
push eax
lea ebp, [esi + 0xc]
push ebp
mov ecx, 0xb6
mov edi, esi
rep stosd dword es:[edi], eax
push eax
mov dword [esi + 0x294], 0x3f4ccccd
mov byte [esi + 0x298], 0xfa
mov byte [esi + 0x299], 0xfa
mov byte [esi + 0x29a], 0xa3
mov byte [esi], al
mov byte [esi + 1], 1
call sub.DSOUND.dll_DirectSoundCreate
test eax, eax
je 0x401b66
or dword [esi + 4], 2
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x28
ret 4
mov edx, dword [esp + 0x38]
mov eax, dword [ebp]
push 2
push edx
mov byte [esi + 0x18], 2
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
test eax, eax
jge 0x401b8b
push str.DirectSound_SetCooperativeLevel_failed._r_n
call fcn.00476e20
add esp, 4
mov ecx, dword [ebp]
lea eax, [esi + 0x1c]
push eax
mov dword [eax], 0x60
mov edx, dword [ecx]
push ecx
call dword [edx + 0x10]
test eax, eax
jge 0x401baf
push str.DirectSound_GetCaps_failed._r_n
call fcn.00476e20
add esp, 4
mov ebp, dword [ebp]
push ebx
xor eax, eax
push 0
mov ecx, 9
lea edi, [esp + 0x18]
rep stosd dword es:[edi], eax
lea ebx, [esi + 0x10]
push ebx
lea ecx, [esp + 0x1c]
push ecx
mov dword [esp + 0x20], 0x24
mov dword [esp + 0x24], 0x91
mov eax, dword [ebp]
push ebp
call dword [eax + 0xc]
test eax, eax
jge 0x401bf3
push str.DirectSound_CreateSoundBuffer__Primary__failed._r_n
call fcn.00476e20
add esp, 4
mov eax, dword [ebx]
mov edx, dword [eax]
lea edi, [esi + 0x14]
push edi
push 0x74b798
push eax
call dword [edx]
test eax, eax
jge 0x401c14
push str.DirectSound_QueryInterface__DirectSound3D__failed._r_n
call fcn.00476e20
add esp, 4
mov eax, dword [edi]
mov ecx, dword [eax]
push 0
push 0x3d4ccccd
push eax
call dword [ecx + 0x2c]
mov eax, dword [esi + 0x58]
test eax, eax
je 0x401c35
mov eax, dword [esi + 0x64]
test eax, eax
je 0x401c35
or dword [esi + 4], 1
mov eax, dword [esi + 0x50]
test eax, eax
je 0x401c40
or dword [esi + 4], 4
mov ebx, dword [ebx]
mov edx, dword [ebx]
lea eax, [esp + 0x10]
push eax
push ebx
call dword [edx + 0x18]
test eax, eax
pop ebx
jl 0x401c79
mov ecx, dword [esp + 0xc]
mov eax, 0x68db8bad
imul ecx
mov eax, edx
sar eax, 0xc
mov ecx, eax
shr ecx, 0x1f
add eax, ecx
mov dl, 6
imul dl
mov cl, 0xfa
sub cl, al
mov byte [esi + 0x290], cl
jmp 0x401c80
mov byte [esi + 0x290], 0xfa
push str..Morrowind.ini
push 0
push str.Disable_Audio
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x401cad
pop edi
mov byte [esi + 0x2a8], 1
mov eax, esi
pop esi
pop ebp
add esp, 0x28
ret 4
pop edi
mov byte [esi + 0x2a8], 0
mov eax, esi
pop esi
pop ebp
add esp, 0x28
ret 4
Function at 0x4061d0
Capabilities:
Read .ini file
Swap mouse buttons

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x14
push ebx
mov ebx, dword [esp + 0x20]
push ebp
push esi
push edi
mov esi, ecx
xor ebp, ebp
push ebp
lea edi, [esi + 4]
push edi
push 0x74b858
push 0x800
push eax
mov dword [esi + 0x18f0], ebp
mov dword [esi], ebx
call sub.DINPUT8.dll_DirectInput8Create
push str..Morrowind.ini
push ebp
push str.Use_Joystick
push str.General
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x406230
test bl, 1
je 0x406230
mov eax, dword [edi]
mov ecx, dword [eax]
push 1
push esi
push 0x407010
push ebp
push eax
call dword [ecx + 0x10]
test bl, 4
mov dword [esi + 0x28], ebp
je 0x4062e3
mov eax, dword [edi]
mov edx, dword [eax]
push ebp
lea ecx, [esp + 0x30]
push ecx
push 0x74b7a8
push eax
call dword [edx + 0xc]
test eax, eax
jne 0x4062e3
mov edx, dword [esp + 0x2c]
push str..Morrowind.ini
push ebp
push str.Background_Keyboard
push str.General
mov dword [esi + 0x28], edx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
test eax, eax
je 0x40628c
mov eax, dword [esi + 0x28]
mov ebp, dword [eax]
push 0x19
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov ecx, dword [esi + 0x28]
push eax
push ecx
jmp 0x40629e
mov edx, dword [esi + 0x28]
mov ebp, dword [edx]
push 0x15
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
mov eax, dword [esi + 0x28]
push eax
call dword [ebp + 0x34]
mov eax, dword [esi + 0x28]
mov ecx, dword [eax]
push 0x74b8b0
push eax
call dword [ecx + 0x2c]
xor eax, eax
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x20], eax
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x28]
push 1
mov dword [esp + 0x18], 0x14
mov dword [esp + 0x1c], 0x10
mov dword [esp + 0x28], 0x20
mov edx, dword [eax]
push eax
call dword [edx + 0x18]
xor ebp, ebp
mov dword [esi + 0x2c], ebp
push ebp
mov ebp, dword [sym.imp.USER32.dll_SwapMouseButton]
call ebp
push eax
mov dword [esi + 0x1b1c], eax
call ebp
call dword [sym.imp.USER32.dll_GetDoubleClickTime]
mov dword [esi + 0x1b20], eax
xor edx, edx
test bl, 2
lea eax, [esi + 0x1b28]
mov dword [eax], edx
mov dword [eax + 4], edx
mov dword [eax + 8], edx
je 0x40636b
mov edi, dword [edi]
mov ecx, dword [edi]
push edx
lea edx, [esp + 0x30]
push edx
push 0x74b7b8
push edi
call dword [ecx + 0xc]
test eax, eax
jne 0x40636b
test bl, 8
mov eax, dword [esp + 0x2c]
mov dword [esi + 0x2c], eax
mov edi, dword [eax]
je 0x40634d
push 9
call dword [sym.imp.USER32.dll_GetActiveWindow]
push eax
mov eax, dword [esi + 0x2c]
push eax
jmp 0x40635a
push 5
call dword [sym.imp.USER32.dll_GetActiveWindow]
mov ecx, dword [esi + 0x2c]
push eax
push ecx
call dword [edi + 0x34]
mov eax, dword [esi + 0x2c]
mov edx, dword [eax]
push 0x74b898
push eax
call dword [edx + 0x2c]
xor eax, eax
mov ecx, 0x140
lea edi, [esi + 0x30]
rep stosd dword es:[edi], eax
mov ecx, 0x80
lea edi, [esi + 0x18f4]
rep stosd dword es:[edi], eax
mov ecx, 0xa
lea edi, [esi + 0x1af4]
rep stosd dword es:[edi], eax
push 3
mov ecx, esi
mov byte [esi + 0x1b38], al
mov byte [esi + 0x1b39], al
call fcn.004073b0
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x14
ret 8
Function at 0x406430
Capabilities:
Set registry value

Disassembly:
mov eax, dword [0x7c6cdc]
mov eax, dword [eax + 4]
sub esp, 0x10
push esi
mov esi, ecx
lea ecx, [esp + 0x10]
push ecx
lea edx, [esp + 8]
push edx
push 0
push 0xf003f
push 0
push 0
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x406508
mov ecx, dword [esp + 4]
push ebx
push ebp
push edi
push 4
lea eax, [esp + 0x18]
push eax
push 4
push 0
push str.Controls_Version
push ecx
mov dword [esp + 0x2c], 0x64
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov edi, 0x775768
add esi, 0x1b44
mov ecx, dword [esi - 4]
mov edx, dword [esi - 8]
mov ebp, dword [esi]
mov ebx, dword [esi + 4]
xor eax, eax
test ecx, ecx
jl 0x4064ae
lea eax, [ecx + 1]
shl eax, 8
test edx, edx
jl 0x4064b9
lea eax, [eax + edx + 1]
shl eax, 8
test ebx, ebx
jl 0x4064c4
lea eax, [eax + ebx + 1]
shl eax, 8
test ebp, ebp
jl 0x4064cf
lea eax, [eax + ebp + 1]
mov ecx, dword [esp + 0x10]
push 4
lea edx, [esp + 0x1c]
push edx
push 4
mov dword [esp + 0x24], eax
mov eax, dword [edi]
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
add edi, 4
add esi, 0x10
cmp edi, str.QuickLoad
jl 0x40649a
mov edx, dword [esp + 0x10]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x10
ret

Function at 0x406510
Capabilities:
Query or enumerate registry value

Disassembly:
sub esp, 0x14
mov eax, dword [0x7c6cdc]
mov eax, dword [eax + 4]
push ebx
mov dword [esp + 0x14], ecx
lea ecx, [esp + 4]
push ecx
push 0xf003f
push 0
push eax
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4065d4
mov ecx, dword [esp + 4]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x10]
push eax
push 0
push 0
push str.Controls_Version
push ecx
mov dword [esp + 0x20], 4
call ebx
cmp dword [esp + 0xc], 0x64
je 0x40657f
mov edx, dword [esp + 4]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop ebx
add esp, 0x14
ret
push esi
push edi
xor edi, edi
mov esi, 0x775768
mov edx, dword [esi]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0x1c]
push ecx
push 0
push 0
push edx
push eax
mov dword [esp + 0x28], 4
call ebx
test eax, eax
jne 0x4065bb
mov ecx, dword [esp + 0x18]
push ecx
mov ecx, dword [esp + 0x20]
push edi
call fcn.00407650
add esi, 4
inc edi
cmp esi, str.QuickLoad
jl 0x406588
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
pop esi
pop ebx
add esp, 0x14
ret
Function at 0x408350
Capabilities:
Read .ini file

Disassembly:
push ecx
push ebx
push ebp
push esi
mov dword [esp + 0xc], ecx
push edi
mov ecx, 0x7cb478
call fcn.004d51b0
mov ecx, 0x7cb478
mov ebp, eax
call fcn.004d51e0
mov ebx, dword [sym.imp.MSVCRT.dll_sprintf]
mov edi, eax
xor esi, esi
push esi
push str.Cursor__d
push edi
call ebx
add esp, 0xc
push str..Morrowind.ini
push 0x200
push edi
push 0x7c6180
push edi
push str.Cursors
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
push edi
push str.Meshes
push str._s_s.nif
push ebp
call ebx
mov ecx, dword [esp + 0x20]
add esp, 0x10
push ebp
push esi
call fcn.004083d0
inc esi
cmp esi, 5
jl 0x408379
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret
Function at 0x40e4b0
Capabilities:
Enumerate files on windows

Disassembly:
push 0xffffffffffffffff
push 0x72833a
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
push ebx
push ebp
push esi
push edi
mov esi, ecx
call fcn.00467850
push 0x1d5c
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x10], eax
xor ebp, ebp
cmp eax, ebp
mov dword [esp + 0x15c], ebp
je 0x40e506
mov ecx, dword [esi + 0xd0]
push 7
push ecx
mov ecx, eax
call fcn.004061d0
jmp 0x40e508
xor eax, eax
or ebx, 0xffffffff
push 0x2a4
mov dword [esp + 0x160], ebx
mov dword [esi + 0x4c], eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebp
mov dword [esp + 0x15c], 1
je 0x40e53e
mov ecx, eax
call fcn.00593ac0
jmp 0x40e540
xor eax, eax
mov ecx, esi
mov dword [esp + 0x15c], ebx
mov dword [esi + 0x2e4], eax
call fcn.0040f190
mov edx, dword [esp + 0x168]
push edx
mov ecx, esi
call fcn.0040f2a0
mov ecx, dword [esi + 0x50]
call fcn.00408350
mov ecx, dword [esi + 0x50]
push ebp
push ebx
call fcn.00408620
mov edi, dword [esi + 0x34]
cmp edi, ebp
je 0x40e58c
mov ecx, edi
call fcn.00401ce0
push edi
call fcn.00727530
add esp, 4
push 0x2d8
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, ebp
mov dword [esp + 0x15c], 2
je 0x40e5bc
mov ecx, dword [esi + 0xc8]
push ecx
mov ecx, eax
call fcn.00401b10
jmp 0x40e5be
xor eax, eax
mov ecx, eax
mov dword [esp + 0x15c], ebx
mov dword [esi + 0x34], eax
call fcn.00401da0
test eax, eax
je 0x40e607
mov ecx, dword [esi + 0x34]
push 0x3cc49ba6
call fcn.00402f40
mov ecx, dword [esi + 0x34]
push 0x3f800000
call fcn.00402f60
mov ecx, dword [esi + 0x34]
push 0x3f800000
call fcn.00402f80
mov ecx, dword [esi + 0x34]
push 0x3d4ccccd
call fcn.00402f40
lea edx, [esp + 0x14]
push edx
mov dword [esi + 0x348], ebp
mov dword [esi + 0x34c], ebp
mov ebp, dword [sym.imp.KERNEL32.dll_FindFirstFileA]
push str.Data_Files_Music_Battle_.mp3
call ebp
mov edi, eax
cmp edi, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_FindNextFileA]
je 0x40e663
mov edx, dword [esi + 0x348]
lea eax, [esp + 0x14]
push eax
inc edx
push edi
mov dword [esi + 0x348], edx
call ebx
test eax, eax
je 0x40e65c
inc dword [esi + 0x348]
lea ecx, [esp + 0x14]
push ecx
push edi
call ebx
test eax, eax
jne 0x40e64a
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
lea edx, [esp + 0x14]
push edx
push str.Data_Files_Music_Explore_.mp3
call ebp
mov edi, eax
cmp edi, 0xffffffff
je 0x40e6a8
inc dword [esi + 0x34c]
lea eax, [esp + 0x14]
push eax
push edi
call ebx
test eax, eax
je 0x40e6a1
mov eax, dword [esi + 0x34c]
lea ecx, [esp + 0x14]
push ecx
inc eax
push edi
mov dword [esi + 0x34c], eax
call ebx
test eax, eax
jne 0x40e688
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
mov ecx, dword [esp + 0x154]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x150
ret 8
Function at 0x40e790
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x728386
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push esi
push 0xb558
mov esi, ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 4], eax
test eax, eax
mov dword [esp + 0x10], 0
je 0x40e7ed
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
push edx
mov edx, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0x24]
push edx
push ecx
push str.Data_Files_
mov ecx, eax
call fcn.00483620
jmp 0x40e7ef
xor eax, eax
push str..Morrowind.ini
push 0
mov dword [0x7c67e0], eax
mov ecx, dword [esi + 0x58]
push str.DrawBound
push str.General
mov dword [esp + 0x20], 0xffffffff
mov dword [ecx + 0x1d4], eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
mov ecx, dword [0x7c67e0]
test eax, eax
setne dl
push edx
call fcn.0048dcb0
push 0x74
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [esp + 0x28], eax
test eax, eax
mov dword [esp + 0x10], 1
je 0x40e850
mov ecx, eax
call fcn.0054b390
jmp 0x40e852
xor eax, eax
mov dword [esi + 0x68], eax
mov eax, dword [0x7c67e0]
mov ecx, dword [eax]
mov esi, dword [ecx + 0x40]
mov ecx, esi
mov dword [esp + 0x10], 0xffffffff
call fcn.0047e710
test eax, eax
je 0x40e885
mov ecx, dword [eax + 8]
call fcn.004812a0
mov ecx, esi
call fcn.0047e720
test eax, eax
jne 0x40e872
mov ecx, dword [esp + 8]
pop esi
mov dword fs:[0], ecx
add esp, 0x10
ret 0x14

Function at 0x40f190
Capabilities:
Get common file path
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x72840b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, 0x7cb478
call fcn.004d51b0
mov ecx, 0x7cb478
mov ebp, eax
call fcn.004d51e0
xor ebx, ebx
add edi, 0x40
mov esi, eax
mov dword [esp + 0x10], edi
push ebx
push str.Font__d
push esi
call dword [sym.imp.MSVCRT.dll_sprintf]
add esp, 0xc
push str..Morrowind.ini
push 0x200
push esi
push 0x7c6180
push esi
push str.Fonts
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
or ecx, 0xffffffff
xor eax, eax
mov edi, esi
repne scasb al, byte es:[edi]
not ecx
dec ecx
jne 0x40f229
push ebp
push 0x200
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
push ebp
push str..Morrowind.ini
push ebx
push str.Font__d_not_found_in__s._nCurrent_path:__s.
call fcn.00476e20
add esp, 0x10
push esi
push str.Data_FilesFonts
push str._s_s.fnt
push ebp
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0x38
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
mov dword [esp + 0x20], 0
je 0x40f261
push 1
push ebp
mov ecx, eax
call fcn.0040afc0
jmp 0x40f263
xor eax, eax
mov ecx, dword [esp + 0x10]
mov dword [ecx], eax
inc ebx
add ecx, 4
cmp ebx, 3
mov dword [esp + 0x20], 0xffffffff
mov dword [esp + 0x10], ecx
jl 0x40f1cf
mov ecx, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x40f2a0
Capabilities:
Read .ini file

Disassembly:
sub esp, 0x28
fild dword [esp + 0x2c]
push esi
push str..Morrowind.ini
push 1
fmul dword [0x746498]
fld qword [0x746610]
push str.Clip_One_To_One_Float
fsin
push str.General
mov esi, ecx
fxch st(1)
fxch st(1)
fdivp st(1)
fstp dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntA]
fld qword [0x746610]
test eax, eax
jmp 0x40f2fa
fcos
fmul dword [esp + 4]
mov ecx, dword [esi + 0x50]
fstp dword [esi + 0xa4]
mov eax, dword [esi + 0xa4]
push eax
call fcn.00408760
mov eax, dword [esi + 0x30]
mov ecx, dword [esi + 0x7c]
mov edx, dword [esp + 0x30]
mov dword [esp + 0x14], eax
mov eax, dword [esi + 0x128]
test eax, eax
mov dword [esp + 0x24], ecx
mov dword [esp + 0x20], edx
je 0x40f349
mov edx, dword [esi + 0x124]
lea ecx, [esi + 0x124]
lea eax, [esp + 0x14]
push eax
call dword [edx + 0x10]
mov eax, dword [esi + 0x154]
test eax, eax
je 0x40f367
mov edx, dword [esi + 0x150]
lea ecx, [esi + 0x150]
lea eax, [esp + 0x14]
push eax
call dword [edx + 0x10]
mov eax, dword [esi + 0x180]
test eax, eax
je 0x40f385
mov edx, dword [esi + 0x17c]
lea ecx, [esi + 0x17c]
lea eax, [esp + 0x14]
push eax
call dword [edx + 0x10]
mov eax, dword [esi + 0xfc]
test eax, eax
je 0x40f3a3
mov edx, dword [esi + 0xf8]
lea ecx, [esi + 0xf8]
lea eax, [esp + 0x14]
push eax
call dword [edx + 0x10]
mov eax, dword [esi + 0x1ac]
test eax, eax
je 0x40f3c2
push 0x200
lea ecx, [esp + 0x18]
push ecx
lea ecx, [esi + 0x1a8]
call fcn.0042eb30
mov eax, dword [esi + 0x230]
test eax, eax
je 0x40f3e1
push 0x100
lea edx, [esp + 0x18]
push edx
lea ecx, [esi + 0x22c]
call fcn.0042eb30
mov eax, dword [esi + 0x2b4]
test eax, eax
je 0x40f3ff
mov eax, dword [esi + 0x2b0]
lea ecx, [esi + 0x2b0]
lea edx, [esp + 0x14]
push edx
call dword [eax + 0x10]
mov ecx, dword [esi + 0x2e4]
test ecx, ecx
je 0x40f4ba
call fcn.00596c50
fld dword [esi + 0xa4]
mov ecx, dword [esi + 0x2e4]
lea eax, [esp + 0x30]
fstp dword [esp + 0xc]
push eax
call fcn.00412820
mov eax, dword [eax]
mov ecx, dword [esp + 0xc]
add eax, 0x30
mov dword [eax], 0xbf000000
mov dword [eax + 4], ecx
mov dword [eax + 8], 0xbf000000
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40f466
mov edx, dword [eax + 4]
mov ecx, eax
add eax, 4
dec edx
test edx, edx
mov dword [eax], edx
jne 0x40f466
test ecx, ecx
je 0x40f466
mov edx, dword [ecx]
push 1
call dword [edx]
fld dword [esi + 0xa4]
mov ecx, dword [esi + 0x2e4]
lea eax, [esp + 0x30]
fstp dword [esp + 0xc]
push eax
call fcn.00439790
mov eax, dword [eax]
mov ecx, dword [esp + 0xc]
add eax, 0x30
mov dword [eax], 0xbf000000
mov dword [eax + 4], ecx
mov dword [eax + 8], 0xbf000000
mov eax, dword [esp + 0x30]
test eax, eax
je 0x40f4ba
mov edx, dword [eax + 4]
mov ecx, eax
add eax, 4
dec edx
test edx, edx
mov dword [eax], edx
jne 0x40f4ba
test ecx, ecx
je 0x40f4ba
mov edx, dword [ecx]
push 1
call dword [edx]
mov eax, dword [esi + 0xf4]
test eax, eax
je 0x40f4cb
mov ecx, esi
call fcn.00411400
mov ecx, dword [esi + 0x184]
test ecx, ecx
pop esi
je 0x40f4e1
push 1
push 0
push 0
call fcn.006eb000
add esp, 0x28
ret 4
Function at 0x410ea0
Capabilities:
Enumerate files on windows

Disassembly:
sub esp, 0x140
push ebx
push ebp
push esi
push edi
mov edi, ecx
mov ecx, 0x7cb478
call fcn.004d51b0
mov ecx, 0x7cb478
mov ebx, eax
call fcn.004d51e0
mov esi, eax
mov eax, dword [esp + 0x154]
sub eax, 0
je 0x410ede
mov edi, dword [edi + 0x348]
dec eax
push str.Data_Files_Music_Battle_
jmp 0x410ee9
mov edi, dword [edi + 0x34c]
push str.Data_Files_Music_Explore_
mov ebp, dword [sym.imp.MSVCRT.dll_sprintf]
push ebx
call ebp
add esp, 8
push ebx
push str._s.mp3
push esi
call ebp
add esp, 0xc
test edi, edi
je 0x410f8a
push 0
call fcn.0047b3b0
cdq
idiv edi
add esp, 4
lea eax, [esp + 0x10]
push eax
push esi
mov edi, edx
inc edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x410f8a
dec edi
je 0x410f44
mov ebp, dword [sym.imp.KERNEL32.dll_FindNextFileA]
lea ecx, [esp + 0x10]
push ecx
push esi
call ebp
test eax, eax
je 0x410f83
dec edi
jne 0x410f35
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
or ecx, 0xffffffff
xor eax, eax
lea edi, [esp + 0x3c]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov edx, ecx
or ecx, 0xffffffff
mov esi, edi
mov edi, ebx
repne scasb al, byte es:[edi]
dec edi
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x140
ret 4
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x140
ret 4
Function at 0x414f60
Capabilities:
Delete file

Disassembly:
push esi
mov esi, ecx
push 0x400
push 1
mov byte [esi], 0
mov dword [esi + 8], 0x400
call dword [sym.imp.MSVCRT.dll_calloc]
add esp, 8
push str.Journal.htm
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov eax, esi
pop esi
ret

Function at 0x415040
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0xc]
push esi
mov ebx, ecx
push edi
mov ecx, ebp
call fcn.004b6750
cmp eax, 0x52554f4a
jne 0x41512d
mov ecx, ebp
call fcn.004b67c0
test eax, eax
je 0x41512d
cmp eax, 0x454d414e
jne 0x415113
mov eax, dword [ebp + 0x240]
cmp eax, dword [ebx + 8]
je 0x4150ab
inc eax
push eax
mov dword [ebx + 8], eax
mov eax, dword [ebx + 4]
push eax
call dword [sym.imp.MSVCRT.dll_realloc]
mov ecx, dword [ebx + 8]
mov edx, ecx
mov edi, eax
shr ecx, 2
xor eax, eax
mov dword [ebx + 4], edi
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 4]
test eax, eax
je 0x4150be
mov ecx, dword [ebx + 8]
push ecx
push eax
mov ecx, ebp
call fcn.004b6880
push str.Journal.htm
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0x80
push 4
push 0
push 0
push 0xc0000000
push str.Journal.htm
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x415113
mov edx, dword [ebx + 4]
push 0
lea eax, [esp + 0x18]
push eax
or ecx, 0xffffffff
xor eax, eax
mov edi, edx
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, ebp
call fcn.004b67f0
test al, al
je 0x41512d
mov ecx, ebp
call fcn.004b67c0
test eax, eax
jne 0x41506b
pop edi
pop esi
pop ebp
pop ebx
ret 4