joyce8/EMBER2024-capa huggingface dataset:
Function at 0x514c50
Capabilities:
Enumerate pe sections

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xa4
push ebx
mov ebx, eax
mov al, byte [0x689402]
test al, al
push esi
push edi
mov edi, ecx
je 0x514e48
cmp word [0x7c0dc0], 1
jne 0x514e48
mov al, byte [0x6d8750]
inc word [0x69c6a4]
mov ecx, dword [0x6d875c]
neg al
sbb eax, eax
and eax, ecx
mov dword [esp + 0x1c], eax
je 0x514e48
mov eax, dword [ebp + 0x10]
cmp word [eax], 0
je 0x514e48
push eax
call fcn.00625dca
mov edx, dword [0x7c2ce0]
mov si, word [0x7c2ce2]
add esp, 4
test edi, edi
jne 0x514d0e
mov ecx, dword [0x7c2ce8]
mov eax, dword [0x7c2cec]
mov dword [esp + 0x14], ecx
mov edi, dword [esp + 0x14]
shr edi, 0x10
mov cx, si
neg cx
add di, cx
mov dword [esp + 0x18], eax
mov word [esp + 0x16], di
mov edi, dword [esp + 0x18]
mov eax, edx
shr edi, 0x10
neg eax
add word [esp + 0x14], ax
add di, cx
add word [esp + 0x18], ax
mov word [esp + 0x1a], di
jmp 0x514d1b
mov ecx, dword [edi]
mov eax, dword [edi + 4]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
test ebx, ebx
jne 0x514d5a
mov ecx, dword [0x7c2ce4]
mov dword [esp + 0xc], edx
mov ebx, dword [esp + 0xc]
neg si
mov edi, ecx
shr ebx, 0x10
shr edi, 0x10
neg edx
add word [esp + 0xc], dx
add bx, si
add di, si
mov dword [esp + 0x10], ecx
add word [esp + 0x10], dx
mov word [esp + 0xe], bx
mov word [esp + 0x12], di
jmp 0x514db1
mov ax, word [ebx + 4]
cmp ax, 0x1e0
movsx esi, ax
jl 0x514d6c
mov esi, 0x1e0
mov ax, word [ebx + 6]
cmp ax, 0x280
movsx edx, ax
jl 0x514d7e
mov edx, 0x280
mov ax, word [ebx]
test ax, ax
jge 0x514d8a
xor ecx, ecx
jmp 0x514d8d
movsx ecx, ax
mov ax, word [ebx + 2]
test ax, ax
jge 0x514d9a
xor eax, eax
jmp 0x514d9d
movsx eax, ax
mov word [esp + 0xe], ax
mov word [esp + 0xc], cx
mov word [esp + 0x12], dx
mov word [esp + 0x10], si
xor eax, eax
mov ecx, 0x23
lea edi, [esp + 0x20]
rep stosd dword es:[edi], eax
mov eax, dword [esp + 0x1c]
movsx edx, word [eax + 4]
mov dword [esp + 0x1c], edx
movsx ecx, word [eax + 6]
fild dword [esp + 0x1c]
mov dword [esp + 0x1c], ecx
xor ecx, ecx
fdivr dword [0x672afc]
lea edi, [esp + 0x20]
mov dword [esp + 0x4c], 0x3f800000
mov dword [esp + 0x48], 0x3f800000
mov dword [esp + 0x20], ecx
mov byte [esp + 0xaa], cl
mov word [esp + 0xa8], cx
mov dword [esp + 0x2c], eax
fstp dword [esp + 0x60]
fild dword [esp + 0x1c]
fdivr dword [0x672afc]
fstp dword [esp + 0x64]
call fcn.00531cf0
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
push edx
mov edx, dword [ebp + 8]
push eax
lea ecx, [esp + 0x14]
push ecx
push edx
lea eax, [esp + 0x24]
push eax
push 0x514e80
call fcn.00556bb0
add esp, 0x18
call fcn.00532000
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x519b60
Capabilities:
Get file size
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
push ebp
mov ebp, dword [esp + 0xc]
push esi
push 0
push 0x8000000
push 3
push 0
push 0
push closesocket
mov dword [eax], 0
push ecx
mov dword [ebp], 0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x519b9c
pop esi
xor al, al
pop ebp
ret
push edi
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
jne 0x519bba
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor al, al
pop ebp
ret
push ebx
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebx, eax
test ebx, ebx
je 0x519be5
push 0
lea edx, [esp + 0x1c]
push edx
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x519bf3
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop edi
pop esi
xor al, al
pop ebp
ret
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, edi
call fcn.00519af0
test al, al
jne 0x519c13
push ebx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
pop ebx
pop edi
pop esi
xor al, al
pop ebp
ret
mov eax, dword [esp + 0x14]
mov dword [eax], ebx
pop ebx
mov dword [ebp], edi
pop edi
pop esi
mov al, 1
pop ebp
ret
Function at 0x522690
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
sub esp, 0xc
mov eax, dword [0x721dbc]
push esi
xor esi, esi
test eax, eax
mov dword [esp + 4], 0
mov dword [esp + 0xc], 4
jle 0x5226d9
nop
mov eax, dword [0x721db8]
mov eax, dword [eax + esi*4]
cmp byte [eax], 0x2d
jne 0x5226cf
push eax
push str._nogamma
call fcn.00628fcb
add esp, 8
test eax, eax
je 0x5226f2
mov eax, dword [0x721dbc]
inc esi
cmp esi, eax
jl 0x5226b0
mov eax, dword [0x71961c]
test eax, eax
jne 0x5226f2
mov eax, dword [0x722a88]
test eax, eax
mov byte [0x71d110], 0
je 0x5226f9
mov byte [0x71d110], 1
mov ecx, dword [0x7c0c6c]
lea edx, [esp + 8]
push edx
push 0x20019
push 0
shr ecx, 0x11
push str.SoftwareMicrosoftMicrosoft_GamesHalo
and cl, 1
push closesocket
mov byte [0x6e1640], cl
mov dword [esp + 0x18], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
mov edx, dword [esp + 8]
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 8]
push ecx
push 0
push 0
push str.gamma
push edx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
mov eax, dword [esp + 8]
mov esi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push eax
call esi
mov eax, dword [esp + 4]
test eax, eax
je 0x522797
xor eax, eax
jmp 0x522770
mov ecx, eax
shl ecx, 8
mov word [eax*2 + 0x6e0a40], cx
mov word [eax*2 + 0x6e0c40], cx
mov word [eax*2 + 0x6e0e40], cx
inc eax
cmp eax, 0x100
jl 0x522770
jmp 0x5227c2
mov ecx, dword [0x7460e8]
push edi
push ecx
call dword [sym.imp.USER32.dll_GetDC]
mov edi, eax
push 0x6e0a40
push edi
call dword [sym.imp.GDI32.dll_GetDeviceGammaRamp]
mov edx, dword [0x7460e8]
push edi
push edx
call dword [sym.imp.USER32.dll_ReleaseDC]
pop edi
mov eax, 0x6e0a40
call fcn.00522a00
push 0
lea eax, [esp + 0xc]
push eax
push 0
push 0x20006
push 0
push 0
push 0
push str.SoftwareMicrosoftMicrosoft_GamesHalo
push closesocket
mov dword [esp + 0x28], 1
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov edx, dword [esp + 8]
push 4
lea ecx, [esp + 8]
push ecx
push 4
push 0
push str.gamma
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 8]
push eax
call esi
mov dword [0x71d114], 1
pop esi
add esp, 0xc
ret
Function at 0x522830
Capabilities:
Set registry value

Disassembly:
sub esp, 8
mov al, byte [0x71d110]
test al, al
mov dword [esp], 0
jne 0x5228fe
mov eax, dword [0x71d114]
test eax, eax
je 0x5228fe
cmp byte [0x6e1640], 1
jne 0x522882
mov al, byte [0x71d094]
test al, al
je 0x522882
mov eax, dword [0x71d09c]
test eax, eax
je 0x522882
mov ecx, dword [eax]
push 0x6e0a40
push 0
push 0
push eax
call dword [ecx + 0x54]
add esp, 8
ret
mov edx, dword [0x7460e8]
push esi
push edx
call dword [sym.imp.USER32.dll_GetDC]
mov esi, eax
push 0x6e0a40
push esi
call dword [sym.imp.GDI32.dll_SetDeviceGammaRamp]
mov eax, dword [0x7460e8]
push esi
push eax
call dword [sym.imp.USER32.dll_ReleaseDC]
push 0
lea ecx, [esp + 0xc]
push ecx
push 0
push 0x20006
push 0
push 0
push 0
push str.SoftwareMicrosoftMicrosoft_GamesHalo
push closesocket
mov dword [esp + 0x28], 0
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov eax, dword [esp + 8]
push 4
lea edx, [esp + 8]
push edx
push 4
push 0
push str.gamma
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov ecx, dword [esp + 8]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
add esp, 8
ret
Function at 0x5388f0
Capabilities:
Copy file

Disassembly:
sub esp, 0x240
push ebx
push ebp
mov ebp, dword [esp + 0x24c]
push edi
push esi
lea eax, [esp + 0x10]
push str._s_s.sav
push eax
xor bl, bl
call fcn.006238e3
add esp, 0x10
lea ecx, [esp + 0x108]
push ecx
lea edx, [esp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
cmp eax, 0xffffffff
je 0x5389bb
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
push ebp
push esi
lea eax, [esp + 0x110]
push str._s_s.bin
push eax
call fcn.006238e3
push edi
push esi
lea ecx, [esp + 0x20]
push str._s_s.bin
push ecx
call fcn.006238e3
mov ebx, dword [sym.imp.KERNEL32.dll_CopyFileA]
add esp, 0x20
push 0
lea edx, [esp + 0x10c]
push edx
lea eax, [esp + 0x10]
push eax
call ebx
push edi
push esi
lea ecx, [esp + 0x10]
push str._s_s.sav
push ecx
call fcn.006238e3
push ebp
push esi
lea edx, [esp + 0x120]
push str._s_s.sav
push edx
call fcn.006238e3
add esp, 0x20
push 0
lea eax, [esp + 0x10c]
push eax
lea ecx, [esp + 0x10]
push ecx
call ebx
pop ebp
mov al, 1
pop ebx
add esp, 0x240
ret
pop ebp
mov al, bl
pop ebx
add esp, 0x240
ret
Function at 0x539440
Capabilities:
Read file on windows

Disassembly:
push ecx
mov al, byte [0x6e2f28]
push ebx
xor bl, bl
test al, al
je 0x53946e
mov al, byte [0x6e2f28]
test al, al
je 0x53946e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
lea ecx, [ecx]
push 0
call esi
mov al, byte [0x6e2f28]
test al, al
jne 0x539460
pop esi
mov eax, dword [0x6e2d20]
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5394bb
mov edx, dword [0x6e2d18]
mov eax, dword [0x6e2d14]
push 0
lea ecx, [esp + 8]
push ecx
mov ecx, dword [0x6e2d20]
push edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5394bb
mov edx, dword [esp + 4]
cmp edx, dword [0x6e2d18]
jne 0x5394bb
mov al, 1
pop ebx
pop ecx
ret
push 1
push 0x8c
push 0x8b
call fcn.0057eea0
add esp, 0xc
mov al, bl
pop ebx
pop ecx
ret

Function at 0x5394e0
Capabilities:
Create directory
Write file on windows

Disassembly:
sub esp, 0x404
push ebx
push esi
push 0
push 0x6e2e24
xor bl, bl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
mov eax, dword [esp + 0x410]
push eax
push 0x6e2e24
lea ecx, [esp + 0x14]
push 0x66d8c8
push ecx
call fcn.006238e3
add esp, 0x10
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x53955d
mov ecx, dword [esp + 0x414]
push 0
lea eax, [esp + 0xc]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x53955d
cmp dword [esp + 8], edi
jne 0x53955d
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, bl
pop ebx
add esp, 0x404
ret

Function at 0x539570
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x404
push ebx
push esi
push eax
push 0x6e2e24
lea ecx, [esp + 0x14]
push 0x66d8c8
push ecx
xor bl, bl
call fcn.006238e3
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 0
push closesocket
lea edx, [esp + 0x24]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x5395d9
mov ecx, dword [esp + 0x410]
push 0
lea eax, [esp + 0xc]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5395d9
cmp dword [esp + 8], edi
jne 0x5395d9
mov bl, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov al, bl
pop ebx
add esp, 0x404
ret

Function at 0x5395f0
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x404
push esi
push eax
push 0x6e2e24
lea ecx, [esp + 0x10]
push 0x66d8c8
push ecx
call fcn.006238e3
add esp, 0x10
push 0
push 0x80
push 3
push 0
push 0
push closesocket
lea edx, [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x539654
mov ecx, dword [esp + 0x40c]
push 0
lea eax, [esp + 8]
push eax
push edi
push ecx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x539654
cmp dword [esp + 4], edi
je 0x539668
push 1
push 0x8c
push 0x8b
call fcn.0057eea0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
add esp, 0x404
ret
Function at 0x539680
Capabilities:
Delete file
Read file on windows

Disassembly:
mov eax, 0x20114
call fcn.00628480
push ebp
mov ebp, dword [esp + 0x2011c]
push esi
push edi
push 0
mov esi, ecx
mov edi, edx
call fcn.005399f0
mov ecx, dword [esp + 0x2012c]
xor dl, dl
add esp, 4
test ecx, ecx
mov dword [esp + 0x10], eax
mov byte [esp + 0xf], dl
je 0x5396b9
mov byte [ecx], dl
cmp eax, 0xffffffff
je 0x53980c
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5397d8
mov ecx, dword [esp + 0x10]
push 0
lea eax, [esp + 0x1c]
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5397d8
cmp dword [esp + 0x18], edi
jne 0x5397d8
mov edx, dword [ebp]
push edi
lea eax, [esp + 0x18]
push ebx
push eax
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], 0xffffffff
mov dword [ebp], 0
call fcn.004d0310
sub esi, edi
add esp, 0xc
test esi, esi
jle 0x539785
lea esp, [esp]
cmp esi, 0x20000
mov edi, esi
jb 0x53973f
mov edi, 0x20000
mov eax, dword [esp + 0x10]
push 0
lea ecx, [esp + 0x1c]
push ecx
push edi
lea edx, [esp + 0x12c]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x53977a
cmp dword [esp + 0x18], edi
jne 0x53977a
push edi
lea ecx, [esp + 0x124]
push ecx
lea edx, [esp + 0x1c]
push edx
call fcn.004d0310
add esp, 0xc
call fcn.00549d10
sub esi, edi
test esi, esi
jg 0x539730
mov ecx, dword [esp + 0x1c]
cmp dword [esp + 0x14], ecx
jne 0x5397ad
mov ecx, dword [esp + 0x10]
push ecx
mov byte [esp + 0x13], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebp
add esp, 0x20114
ret
mov eax, dword [esp + 0x20128]
test eax, eax
je 0x5397f3
test ecx, ecx
je 0x5397f3
mov ecx, dword [esp + 0x10]
push ecx
mov byte [eax], 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebp
add esp, 0x20114
ret
mov eax, dword [0x714cfc]
lea esi, [esp + 0x20]
call fcn.0053d180
test al, al
je 0x5397f3
mov eax, esi
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, dword [esp + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [esp + 0xf]
pop edi
pop esi
pop ebp
add esp, 0x20114
ret
pop edi
pop esi
mov al, dl
pop ebp
add esp, 0x20114
ret
Function at 0x539820
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x904
push ebx
push esi
push edi
push 0
mov edi, eax
call fcn.005399f0
mov ebx, eax
add esp, 4
cmp ebx, 0xffffffff
je 0x539958
mov esi, dword [ebp + 8]
push 0x440000
lea eax, [esp + 0x10]
push esi
push eax
mov dword [edi], 0
mov dword [esp + 0x18], 0xffffffff
call fcn.004d0310
mov ecx, dword [esp + 0x18]
mov eax, dword [ebp + 0xc]
mov dword [edi], ecx
mov ecx, eax
mov edx, ecx
shr ecx, 2
lea edi, [esp + 0x11c]
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov esi, dword [ebp + 8]
mov ecx, eax
shr ecx, 2
add esp, 0xc
xor eax, eax
mov edi, esi
rep stosd dword es:[edi], eax
push 0
mov ecx, edx
push 0
and ecx, 3
push 0
rep stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push ebx
call edi
cmp eax, 0xffffffff
je 0x539905
mov ecx, dword [ebp + 0x10]
push 0
lea eax, [esp + 0x10]
push eax
push ecx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
call esi
test eax, eax
je 0x539905
mov edx, dword [ebp + 0x10]
cmp dword [esp + 0xc], edx
jne 0x539905
push 0
push 0
push 0
push ebx
call edi
cmp eax, 0xffffffff
je 0x539905
mov edi, dword [ebp + 0xc]
push 0
lea eax, [esp + 0x10]
push eax
push edi
lea ecx, [esp + 0x11c]
push ecx
push ebx
call esi
test eax, eax
je 0x539908
cmp dword [esp + 0xc], edi
je 0x539937
jmp 0x539908
mov edi, dword [ebp + 0xc]
push 1
push 0x8c
push 0x8b
call fcn.0057eea0
mov eax, dword [0x714cfc]
add esp, 0xc
lea esi, [esp + 0x10]
call fcn.0053d180
test al, al
je 0x539937
mov edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
mov ecx, edi
mov edi, dword [ebp + 8]
mov eax, ecx
shr ecx, 2
lea esi, [esp + 0x110]
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
push ebx
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x539960
Capabilities:
Delete file
Read file on windows

Disassembly:
sub esp, 0x104
push esi
push edi
push 0
mov esi, eax
call fcn.005399f0
mov edi, eax
add esp, 4
cmp edi, 0xffffffff
je 0x5399e4
push 0
push 0
push 0
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5399ae
mov ecx, dword [esp + 0x110]
push 0
lea eax, [esp + 0xc]
push eax
push esi
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5399ae
cmp dword [esp + 8], esi
je 0x5399dd
push 1
push 0x8c
push 0x8b
call fcn.0057eea0
mov eax, dword [0x714cfc]
add esp, 0xc
lea esi, [esp + 0xc]
call fcn.0053d180
test al, al
je 0x5399dd
mov edx, esi
push edx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
add esp, 0x104
ret
Function at 0x5399f0
Capabilities:
Delete file
Get file size
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x4204
call fcn.00628480
mov eax, dword [ebp + 8]
test eax, eax
push ebx
push esi
push edi
jne 0x539b30
mov eax, dword [0x714cfc]
lea esi, [esp + 0x10]
call fcn.0053d180
test al, al
je 0x539b26
mov eax, dword [0x714cfc]
call fcn.0053d180
lea edi, [esp + 0x10]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x539a33
mov eax, dword [str.savegame.bin]
mov ecx, dword [0x670af0]
mov edx, dword [0x670af4]
push 0
push 0
push 4
mov dword [edi], eax
mov al, byte [0x670af8]
push 0
mov dword [edi + 4], ecx
push 0
push 0xc0000000
lea ecx, [esp + 0x28]
mov dword [edi + 8], edx
push ecx
mov byte [edi + 0xc], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x539b26
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0x480000
je 0x539b45
xor eax, eax
push eax
lea edx, [esp + 0x10]
push edx
mov ecx, 0x1000
lea edi, [esp + 0x218]
rep stosd dword es:[edi], eax
push 0x4000
lea eax, [esp + 0x21c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x539aed
cmp dword [esp + 0xc], 0x4000
jne 0x539aed
push 0
push 0
push 0x480000
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x539aed
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
test eax, eax
jne 0x539b45
push 1
push 0x8c
push 0x8b
call fcn.0057eea0
mov eax, dword [0x714cfc]
add esp, 0xc
lea esi, [esp + 0x110]
call fcn.0053d180
test al, al
je 0x539b1f
mov ecx, esi
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea edx, [esp + 0x10]
sub edx, eax
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x539b36
jmp 0x539a2e
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x53cf80
Capabilities:
Copy file

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x50c
push ebx
push esi
push edi
sar eax, 0x10
lea ecx, [esp + 0x210]
and eax, 0xfff
push ecx
push eax
mov bl, 1
mov dword [esp + 0x14], eax
call fcn.0053e1e0
add esp, 8
test al, al
je 0x53d174
mov esi, dword [ebp + 8]
test esi, esi
je 0x53d174
cmp word [esi], 0
je 0x53d174
lea edx, [esp + 0x310]
push esi
push edx
call fcn.00627f65
add esp, 8
test eax, eax
je 0x53d174
xor eax, eax
mov byte [esp + 0x110], 0
mov ecx, 0x3f
lea edi, [esp + 0x111]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x100
lea eax, [esp + 0x114]
push eax
push 1
mov eax, esi
mov ecx, 0x721471
call fcn.00551b20
test eax, eax
jne 0x53d174
movsx eax, word [esp + 0x410]
sub eax, 0
je 0x53d07c
dec eax
je 0x53d039
xor bl, bl
jmp 0x53d168
push str.blam.lst
lea ecx, [esp + 0x114]
push ecx
push str._s_s
lea edx, [esp + 0x1c]
push 0xff
push edx
call fcn.00623c7d
add esp, 0x14
push 1
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x218]
push ecx
mov byte [esp + 0x11b], 0
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x53d0f5
push str.blam.sav
lea edx, [esp + 0x114]
push edx
push str._s_s
lea eax, [esp + 0x1c]
push 0xff
push eax
call fcn.00623c7d
push 0xff
lea ecx, [esp + 0x228]
push ecx
lea edx, [esp + 0x434]
push edx
mov byte [esp + 0x12f], 0
call fcn.00623ce0
lea eax, [esp + 0x438]
push str.blam.sav
push eax
call fcn.00625680
add esp, 0x28
test eax, eax
je 0x53d0fc
lea ecx, [esp + 0x110]
push ecx
lea esi, [esp + 0x41c]
mov byte [eax], 0
call fcn.0053cc70
mov esi, dword [ebp + 8]
add esp, 4
mov bl, al
cmp bl, 1
jne 0x53d164
lea eax, [esp + 0x310]
mov ecx, 0x721471
call fcn.00551db0
push 0xff
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x218]
push eax
call fcn.00623ce0
push 0x7f
lea ecx, [esp + 0x320]
push esi
push ecx
mov byte [esp + 0x327], 0
call fcn.00627c87
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x228]
push edx
push eax
mov word [esp + 0x42e], 0
call fcn.0053e2f0
add esp, 0x20
mov al, bl
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test bl, bl
jne 0x53d174
mov eax, esi
mov ecx, 0x721471
call fcn.00551db0
pop edi
pop esi
mov al, bl
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x53d220
Capabilities:
Get disk size

Disassembly:
sub esp, 0x35c
push ebx
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0xc]
push edx
push 0x721471
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_GetDiskFreeSpaceExA]
test eax, eax
je 0x53d268
mov eax, dword [esp + 8]
test eax, eax
ja 0x53d268
jb 0x53d25b
cmp dword [esp + 4], 0x2800000
jae 0x53d268
mov eax, 1
pop ebx
add esp, 0x35c
ret
push esi
push edi
push 0x721471
lea eax, [esp + 0x28]
call fcn.00551fd0
mov esi, eax
cmp esi, 0xffffffff
mov edi, 1
je 0x53d2c9
cmp edi, 0x3e7
jae 0x53d29c
lea eax, [esp + 0x24]
mov ecx, esi
inc edi
call fcn.00552150
cmp al, 1
je 0x53d284
test esi, esi
je 0x53d2b2
mov eax, esi
call fcn.00551ae0
test al, al
je 0x53d2b2
push esi
call dword [sym.imp.KERNEL32.dll_FindClose]
cmp edi, 0x3e7
jb 0x53d2c9
pop edi
pop esi
mov eax, 2
pop ebx
add esp, 0x35c
ret
pop edi
pop esi
mov ax, bx
pop ebx
add esp, 0x35c
ret
Function at 0x541330
Capabilities:
Encode data using xor
Get file size
Read file on windows

Disassembly:
sub esp, 0x2c
push ebp
mov ebp, dword [esp + 0x34]
push esi
push 0
push 0
push 3
push 0
push 1
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x54135e
pop esi
xor al, al
pop ebp
add esp, 0x2c
ret
push ebx
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x54137f
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebx
pop esi
xor al, al
pop ebp
add esp, 0x2c
ret
push edi
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x5413aa
push 0
lea ecx, [esp + 0x14]
push ecx
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x5413bb
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebx
pop esi
xor al, al
pop ebp
add esp, 0x2c
ret
cmp dword [esp + 0x10], ebx
jne 0x5413a3
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [esp + 0x14]
push edx
push ebx
push edi
call fcn.0061aa60
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea eax, [esp + 0x14]
mov ecx, 4
mov edx, eax
sub ecx, edx
jmp 0x5413f0
xor dword [eax], 0x524f4752
add eax, 4
lea edx, [ecx + eax]
cmp edx, 0x21
jb 0x5413f0
xor ecx, ecx
movzx eax, byte [esp + ecx + 0x14]
cdq
mov esi, 0x1a
idiv esi
add dl, 0x41
mov byte [esp + ecx + 0x14], dl
inc ecx
cmp ecx, 0x20
jb 0x541403
mov ecx, 6
mov edi, ebp
lea esi, [esp + 0x14]
xor eax, eax
mov byte [esp + 0x38], 0
repe cmpsd dword [esi], dword es:[edi]
jne 0x5413b1
lea edi, [ebp + 0x1c]
mov ecx, 9
lea esi, [esp + 0x2c]
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
pop edi
pop ebx
pop esi
sete al
pop ebp
add esp, 0x2c
ret
Function at 0x541e40
Capabilities:
Open clipboard
Read clipboard data

Disassembly:
push 1
call dword [sym.imp.USER32.dll_IsClipboardFormatAvailable]
test eax, eax
je 0x541e58
mov eax, dword [0x7460e4]
push eax
call dword [sym.imp.USER32.dll_OpenClipboard]
push ebx
push esi
push 1
call dword [sym.imp.USER32.dll_GetClipboardData]
mov esi, eax
test esi, esi
je 0x541e9a
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
test eax, eax
je 0x541ea0
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push ecx
push eax
push edx
mov bl, 1
call fcn.00623ce0
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
mov al, bl
pop ebx
ret
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor bl, bl
call dword [sym.imp.USER32.dll_CloseClipboard]
pop esi
mov al, bl
pop ebx
ret