joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4d2520
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x30
push esi
push edi
push str.ICONLIST
push eax
push 0
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4d261c
push ebx
push esi
push 0
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
je 0x4d261b
push esi
push 0
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
test esi, esi
je 0x4d261b
push ebx
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
je 0x4d261b
mov ecx, dword [ebx]
mov dword [edi + 4], ecx
mov edx, dword [ebx + 4]
add ebx, 8
mov dword [edi + 8], edx
test edx, edx
je 0x4d261b
mov eax, ecx
imul ecx, edx
sub esi, 8
mov dword [ebp - 4], esi
mov esi, ecx
imul esi, eax
neg eax
mov dword [ebp - 0x28], eax
xor eax, eax
push eax
push eax
lea edx, [ebp + 8]
push edx
mov dword [ebp - 0x2c], ecx
push eax
lea ecx, [ebp - 0x30]
push ecx
add esi, esi
push eax
add esi, esi
mov dword [ebp - 0x30], 0x28
mov dword [ebp - 0x24], 0x200001
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov dword [edi + 0xc], eax
test eax, eax
je 0x4d261b
mov eax, dword [ebp - 4]
cmp eax, esi
jne 0x4d2605
mov edx, dword [ebp + 8]
push eax
push ebx
push edx
mov dword [edi + 0x10], ebx
call sub.msvcrt.dll_memcpy
add esp, 0xc
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp + 8]
push esi
push ecx
push eax
push ebx
mov dword [edi + 0x10], 0
call fcn.0043d5d0
add esp, 0x10
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4

Function at 0x4d2630
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
pop ebp
jmp fcn.004d2520

Function at 0x4dbd50
Capabilities:
Link many functions at runtime

Disassembly:
cmp dword [0x6f7c64], 0
je 0x4dbd65
xor eax, eax
cmp dword [0x6f7c68], eax
setne al
ret
push str.uxtheme
mov dword [0x6f7c64], 1
call fcn.0051d8b0
add esp, 4
mov dword [0x6f7c68], eax
test eax, eax
jne 0x4dbd86
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.IsThemeActive
push eax
call esi
mov dword [0x6f7c60], eax
mov eax, dword [0x6f7c68]
push str.IsAppThemed
push eax
call esi
mov ecx, dword [0x6f7c68]
push str.OpenThemeData
push ecx
mov dword [0x6f7c5c], eax
call esi
mov edx, dword [0x6f7c68]
push str.GetThemeBackgroundContentRect
push edx
mov dword [0x6f7c58], eax
call esi
mov dword [0x6f7c54], eax
mov eax, dword [0x6f7c68]
push str.GetThemeMetric
push eax
call esi
mov ecx, dword [0x6f7c68]
push str.DrawThemeBackground
push ecx
mov dword [0x6f7c50], eax
call esi
mov edx, dword [0x6f7c68]
push str.DrawThemeBackgroundEx
push edx
mov dword [0x6f7c4c], eax
call esi
mov dword [0x6f7c48], eax
mov eax, dword [0x6f7c68]
push str.DrawThemeParentBackground
push eax
call esi
mov ecx, dword [0x6f7c68]
push str.DrawThemeEdge
push ecx
mov dword [0x6f7c44], eax
call esi
mov edx, dword [0x6f7c68]
push str.CloseThemeData
push edx
mov dword [0x6f7c40], eax
call esi
mov dword [0x6f7c3c], eax
mov eax, 1
pop esi
ret
Function at 0x4e8be0
Capabilities:
Check for software breakpoints

Disassembly:
cmp dword [esi + 0x14], 0xcc
je 0x4e8c05
mov eax, dword [esi + 0x180]
mov ecx, dword [eax]
push esi
call ecx
add esp, 4
mov dword [esi + 0x78], 0
mov dword [esi + 0x14], 0xcc
mov edx, dword [esi + 0x180]
cmp byte [edx + 8], 0
je 0x4e8c30
mov eax, dword [esi]
mov dword [eax + 0x14], 0x30
mov ecx, dword [esi]
mov edx, dword [ecx]
push esi
call edx
mov eax, dword [esi + 0x180]
add esp, 4
cmp byte [eax + 8], 0
jne 0x4e8c11
xor ecx, ecx
cmp byte [esi + 0x41], cl
mov al, 1
setne cl
add ecx, 0xcd
mov dword [esi + 0x14], ecx
ret

Function at 0x4e8ec0
Capabilities:
Check for software breakpoints

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
cmp dword [esi + 0x14], 0xca
jne 0x4e8ef2
push esi
call fcn.004ed870
add esp, 4
cmp byte [esi + 0x40], 0
je 0x4e8eeb
mov dword [esi + 0x14], 0xcf
mov al, 1
pop esi
pop ebp
ret
mov dword [esi + 0x14], 0xcb
mov eax, dword [esi + 0x14]
cmp eax, 0xcb
jne 0x4e8f6e
mov eax, dword [esi + 0x190]
cmp byte [eax + 0x10], 0
je 0x4e8f5d
mov eax, dword [esi + 8]
test eax, eax
je 0x4e8f17
mov ecx, dword [eax]
push esi
call ecx
add esp, 4
mov edx, dword [esi + 0x190]
mov eax, dword [edx]
push esi
call eax
add esp, 4
test eax, eax
je 0x4e8f58
cmp eax, 2
je 0x4e8f5d
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x4e8f08
cmp eax, 3
je 0x4e8f3f
cmp eax, 1
jne 0x4e8f08
inc dword [ecx + 4]
mov ecx, dword [ecx + 4]
mov eax, dword [esi + 8]
cmp ecx, dword [eax + 8]
jl 0x4e8f08
mov ecx, dword [esi + 0x11c]
add dword [eax + 8], ecx
jmp 0x4e8f08
xor al, al
pop esi
pop ebp
ret
mov edx, dword [esi + 0x7c]
mov dword [esi + 0x84], edx
call fcn.004e8be0
pop esi
pop ebp
ret
cmp eax, 0xcc
je 0x4e8f90
mov eax, dword [esi]
mov dword [eax + 0x14], 0x14
mov ecx, dword [esi]
mov edx, dword [esi + 0x14]
mov dword [ecx + 0x18], edx
mov eax, dword [esi]
mov ecx, dword [eax]
push esi
call ecx
add esp, 4
call fcn.004e8be0
pop esi
pop ebp
ret

Function at 0x4e90f0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, dword [edi + 0x18]
mov eax, dword [esi + 0x1c]
mov ecx, dword [esi + 0x20]
push eax
push 0x1000
push 1
push ecx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x10
test eax, eax
jne 0x4e9157
cmp byte [esi + 0x24], al
je 0x4e912f
mov edx, dword [edi]
mov dword [edx + 0x14], 0x2a
mov eax, dword [edi]
mov ecx, dword [eax]
push edi
call ecx
add esp, 4
mov edx, dword [edi]
mov dword [edx + 0x14], 0x78
mov eax, dword [edi]
mov ecx, dword [eax + 4]
push 0xffffffffffffffff
push edi
call ecx
mov edx, dword [esi + 0x20]
mov byte [edx], 0xff
mov eax, dword [esi + 0x20]
mov byte [eax + 1], 0xd9
add esp, 8
mov eax, 2
mov ecx, dword [esi + 0x20]
mov dword [esi + 4], eax
pop edi
mov dword [esi], ecx
mov byte [esi + 0x24], 0
mov al, 1
pop esi
pop ebp
ret
Function at 0x4f0ad0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push edi
mov dword [edi + 4], ebx
call fcn.004f0cb0
push 0x54
push edi
mov dword [ebp - 4], eax
call fcn.004f0c00
mov esi, eax
add esp, 0xc
cmp esi, ebx
jne 0x4f0b17
push edi
call fcn.004f0cc0
mov eax, dword [edi]
mov dword [eax + 0x14], 0x36
mov ecx, dword [edi]
mov dword [ecx + 0x18], ebx
mov edx, dword [edi]
mov eax, dword [edx]
push edi
call eax
add esp, 8
mov dword [esi], fcn.004efff0
mov dword [esi + 4], fcn.004f0120
mov dword [esi + 8], fcn.004f01c0
mov dword [esi + 0xc], fcn.004f0270
mov dword [esi + 0x10], 0x4f0320
mov dword [esi + 0x14], 0x4f0390
mov dword [esi + 0x18], 0x4f0400
mov dword [esi + 0x1c], 0x4f06e0
mov dword [esi + 0x20], 0x4f0830
mov dword [esi + 0x24], fcn.004f0980
mov dword [esi + 0x28], 0x4f0a90
mov dword [esi + 0x30], 0x3b9aca00
mov ecx, dword [ebp - 4]
mov dword [esi + 0x2c], ecx
mov dword [esi + 0x38], ebx
mov dword [esi + 0x40], ebx
mov dword [esi + 0x34], ebx
mov dword [esi + 0x3c], ebx
mov dword [esi + 0x44], ebx
mov dword [esi + 0x48], ebx
mov dword [esi + 0x4c], 0x54
push str.JPEGMEM
mov dword [edi + 4], esi
call dword [sym.imp.msvcrt.dll_getenv]
add esp, 4
cmp eax, ebx
je 0x4f0bed
lea edx, [ebp + 0xb]
push edx
lea ecx, [ebp - 4]
push ecx
push str._ld_c
push eax
mov byte [ebp + 0xb], 0x78
call dword [sym.imp.msvcrt.dll_sscanf]
add esp, 0x10
test eax, eax
jle 0x4f0bed
mov al, byte [ebp + 0xb]
cmp al, 0x6d
je 0x4f0bc8
cmp al, 0x4d
jne 0x4f0be1
mov eax, dword [ebp - 4]
imul eax, eax, 0x3e8
imul eax, eax, 0x3e8
pop edi
mov dword [esi + 0x2c], eax
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 4]
imul eax, eax, 0x3e8
mov dword [esi + 0x2c], eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4f0da0
Capabilities:
Compute adler32 checksum

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
movzx ecx, di
shr edi, 0x10
test esi, esi
jne 0x4f0dbc
pop edi
lea eax, [esi + 1]
pop esi
pop ebp
ret
push ebx
mov ebx, dword [ebp + 0x10]
test ebx, ebx
je 0x4f0ec7
jmp 0x4f0dd0
mov eax, ebx
cmp ebx, 0x15b0
jb 0x4f0ddf
mov eax, 0x15b0
sub ebx, eax
mov dword [ebp + 0x10], ebx
cmp eax, 0x10
jl 0x4f0e8c
mov edx, eax
shr edx, 4
mov ebx, edx
neg ebx
shl ebx, 4
add eax, ebx
jmp 0x4f0e00
movzx ebx, byte [esi]
add ecx, ebx
movzx ebx, byte [esi + 1]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 2]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 3]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 4]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 5]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 6]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 7]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 8]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 9]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xa]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xb]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xc]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xd]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xe]
add edi, ecx
add ecx, ebx
movzx ebx, byte [esi + 0xf]
add edi, ecx
add ecx, ebx
add edi, ecx
add esi, 0x10
dec edx
jne 0x4f0e00
mov ebx, dword [ebp + 0x10]
test eax, eax
je 0x4f0e9b
movzx edx, byte [esi]
add ecx, edx
inc esi
add edi, ecx
dec eax
jne 0x4f0e90
mov eax, 0x80078071
mul ecx
shr edx, 0xf
imul edx, edx, 0xffff000f
add ecx, edx
mov eax, 0x80078071
mul edi
shr edx, 0xf
imul edx, edx, 0xffff000f
add edi, edx
test ebx, ebx
jne 0x4f0dd0
mov eax, edi
pop ebx
shl eax, 0x10
pop edi
or eax, ecx
pop esi
pop ebp
ret
Function at 0x4f1780
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, dword [esi + 0x24]
push edi
mov eax, dword [esi + 0x64]
mov edi, dword [esi + 0x34]
mov ecx, dword [esi + 0x6c]
sub edi, eax
sub edi, ecx
jne 0x4f17a0
test eax, eax
jne 0x4f17ac
test ecx, ecx
jne 0x4f17ac
mov edi, ebx
jmp 0x4f1819
cmp edi, 0xffffffff
jne 0x4f17ac
mov edi, 0xfffffffe
jmp 0x4f1819
mov ecx, dword [esi + 0x24]
lea edx, [ebx + ecx - 0x106]
cmp eax, edx
jb 0x4f1819
mov eax, dword [esi + 0x30]
push ebx
lea ecx, [eax + ebx]
push ecx
push eax
call sub.msvcrt.dll_memcpy
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x3c]
sub dword [esi + 0x68], ebx
sub dword [esi + 0x64], ebx
add esp, 0xc
sub dword [esi + 0x54], ebx
lea ecx, [eax + edx*2]
lea ecx, [ecx]
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x4f17ef
sub eax, ebx
jmp 0x4f17f1
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x4f17e0
mov ecx, dword [esi + 0x38]
mov edx, ebx
lea ecx, [ecx + ebx*2]
nop
movzx eax, word [ecx - 2]
sub ecx, 2
cmp eax, ebx
jb 0x4f180f
sub eax, ebx
jmp 0x4f1811
xor eax, eax
dec edx
mov word [ecx], ax
jne 0x4f1800
add edi, ebx
mov eax, dword [esi]
cmp dword [eax + 4], 0
je 0x4f1873
mov edx, dword [esi + 0x6c]
add edx, dword [esi + 0x64]
mov ecx, edi
add edx, dword [esi + 0x30]
mov edi, eax
push edx
call fcn.004f1530
add dword [esi + 0x6c], eax
mov edx, dword [esi + 0x6c]
add esp, 4
cmp edx, 3
jb 0x4f185f
mov edi, dword [esi + 0x64]
add edi, dword [esi + 0x30]
mov ecx, dword [esi + 0x50]
movzx eax, byte [edi]
mov dword [esi + 0x40], eax
shl eax, cl
movzx ecx, byte [edi + 1]
xor eax, ecx
and eax, dword [esi + 0x4c]
mov dword [esi + 0x40], eax
cmp edx, 0x106
jae 0x4f1873
mov edx, dword [esi]
cmp dword [edx + 4], 0
jne 0x4f1785
pop edi
pop ebx
ret
Function at 0x4f7760
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ecx + 4]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push eax
push ecx
push 1
push edx
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
pop ebp
ret 8

Function at 0x4fe120
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
mov edi, dword [ebp + 0x10]
xor esi, esi
cmp edi, esi
jne 0x4fe147
mov edx, dword [ebp + 8]
mov ecx, edx
call fcn.004f8c40
pop edi
mov dword [edx + 4], esi
mov dword [edx], 1
mov eax, edx
pop esi
pop ebp
ret
push ebx
lea eax, [ebp + 0x10]
push eax
push edi
mov dword [ebp + 0x10], esi
call fcn.004f76e0
mov ebx, eax
add esp, 8
cmp ebx, esi
je 0x4fe17e
push edi
call dword [sym.imp.msvcrt.dll_fclose]
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, edx
call fcn.004f8c40
mov dword [edx], ebx
pop ebx
pop edi
mov dword [edx + 4], esi
mov eax, edx
pop esi
pop ebp
ret
mov ebx, dword [ebp + 0x10]
mov eax, ebx
cmp ebx, esi
ja 0x4fe18c
mov eax, 1
push eax
call dword [0x6a194c]
add esp, 4
mov esi, eax
push edi
test esi, esi
jne 0x4fe1c0
call dword [sym.imp.msvcrt.dll_fclose]
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, edx
call fcn.004f8c40
pop ebx
pop edi
mov dword [edx + 4], esi
mov dword [edx], 3
mov eax, edx
pop esi
pop ebp
ret
push ebx
push 1
push esi
call dword [sym.imp.msvcrt.dll_fread]
push edi
mov dword [ebp + 0x10], eax
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 0x14
cmp dword [ebp + 0x10], ebx
je 0x4fe204
push esi
call dword [0x6a1950]
mov edx, dword [ebp + 8]
add esp, 4
mov ecx, edx
call fcn.004f8c40
pop ebx
pop edi
mov dword [edx], 2
mov dword [edx + 4], 0
mov eax, edx
pop esi
pop ebp
ret
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x14]
push ecx
mov ecx, dword [ebp + 0xc]
push edx
push ebx
push esi
mov esi, dword [ebp + 8]
push esi
call fcn.004fdf60
pop ebx
pop edi
mov eax, esi
pop esi
pop ebp
ret
Function at 0x4ffa40
Capabilities:
Resume thread
Suspend thread

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x22c8
call fcn.00521200
push esi
push edi
mov dword [ebp - 0x22c4], ecx
mov dword [ebp - 0x110], 0
mov byte [ebp - 0x109], 1
mov dword [ebp - 0x12c], 0
mov eax, dword [ebp - 0x22c4]
cmp dword [eax + 0x10], 0
jne 0x4ffa87
mov ecx, dword [ebp - 0x22c4]
call fcn.004ff6b0
mov ecx, dword [ebp - 0x22c4]
mov edx, dword [ecx + 4]
cmp dword [edx + 4], 0
jne 0x4ffaa8
push 0x45a
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x5001b8
mov eax, dword [ebp + 0x10]
mov dword [0x6f7cd4], eax
mov ecx, dword [ebp + 0x14]
mov dword [0x6f7cd8], ecx
cmp dword [ebp + 0xc], 0
jne 0x4ffb68
mov edx, dword [ebp + 8]
push edx
call fcn.0051dd50
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
cmp esi, eax
jne 0x4ffb16
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_SuspendThread]
push 0x2cc
push 0
lea eax, [ebp - 0x22b8]
push eax
call sub.msvcrt.dll_memset
add esp, 0xc
mov dword [ebp - 0x22b8], 0x10007
lea ecx, [ebp - 0x22b8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_GetThreadContext]
test eax, eax
jne 0x4ffb66
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ResumeThread]
xor eax, eax
jmp 0x5001b8
mov esi, dword [ebp + 0xc]
mov ecx, 0xb3
lea edi, [ebp - 0x22b8]
rep movsd dword es:[edi], dword [esi]

Function at 0x514bb0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x818
push esi
push 0
mov esi, ecx
call dword [sym.imp.msvcrt.dll_time]
add esp, 4
mov dword [esi + 0x10], eax
call dword [sym.imp.WINMM.dll_timeGetTime]
mov edx, dword [esi + 0x10]
push 0x800
lea ecx, [ebp - 0x818]
push ecx
push eax
mov dword [esi + 0x14], eax
movzx eax, word [esi + 0x1c]
push edx
push eax
call fcn.00514b60
lea ecx, [ebp - 0x818]
push 0x5f6654
push ecx
call dword [sym.imp.msvcrt.dll_fopen]
add esp, 0x1c
mov dword [esi + 0xc], eax
test eax, eax
je 0x514c99
mov dx, word [esi + 0x1c]
mov eax, dword [0x6ea898]
push edi
mov word [ebp - 0x18], 0x201
mov word [ebp - 0x16], dx
mov dword [ebp - 0x14], eax
call fcn.0043d050
mov ecx, dword [esi + 0x10]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ecx
call fcn.00441940
mov edi, eax
call fcn.00441930
sub edi, eax
cmp dword [ebp - 0x14], 0
mov dword [ebp - 8], edi
pop edi
jne 0x514c69
mov ecx, dword [0x6e7430]
test ecx, ecx
je 0x514c69
push 0
push 0x5549445f
push 0x53657373
call fcn.0043a600
mov dword [ebp - 0x14], eax
lea edx, [ebp - 0x18]
push 0x14
push edx
call fcn.0044ad30
mov dword [esi + 0x18], eax
mov dword [ebp - 4], eax
mov eax, dword [esi + 0xc]
push eax
push 1
lea ecx, [ebp - 0x18]
push 0x18
push ecx
call dword [sym.imp.msvcrt.dll_fwrite]
mov edx, dword [esi + 0xc]
push edx
call dword [sym.imp.msvcrt.dll_fflush]
add esp, 0x1c
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x514d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x8004
call fcn.00521200
mov eax, dword [ebp + 0xc]
push esi
push edi
push eax
mov edi, ecx
mov ecx, dword [ebp + 8]
push ecx
lea edx, [ebp - 0x8004]
push 0x7fff
push edx
call dword [sym.imp.msvcrt.dll__vsnprintf]
mov esi, eax
add esp, 0x10
test esi, esi
js 0x514d5c
cmp esi, 0x7fff
jne 0x514d65
mov byte [ebp - 5], 0
mov esi, 0x7fff
mov ecx, dword [edi + 0x18]
push esi
lea eax, [ebp - 0x8004]
push eax
push ecx
call fcn.0044ae40
mov edx, dword [edi + 0xc]
push 2
push 0xfffffffffffffffc
push edx
mov dword [edi + 0x18], eax
mov dword [ebp + esi - 0x8004], eax
call dword [sym.imp.msvcrt.dll_fseek]
mov eax, dword [edi + 0xc]
push eax
push 1
add esi, 4
lea ecx, [ebp - 0x8004]
push esi
push ecx
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x28
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x514ec0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x5e6ddb
push eax
mov eax, dword [ebp + 8]
mov dword fs:[0], esp
sub esp, 0x15c
push esi
push 0x5f6694
push eax
call dword [sym.imp.msvcrt.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
jne 0x514f08
xor al, al
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [sym.imp.msvcrt.dll_fseek]
push edi
push 2
push 0
push esi
call ebx
push esi
call dword [sym.imp.msvcrt.dll_ftell]
push 0
push 0
push esi
mov edi, eax
call ebx
lea ecx, [edi - 0x19]
add esp, 0x1c
cmp ecx, 0x1ffe7
ja 0x5150c2
push edi
call fcn.00401148
push esi
push 1
mov ebx, eax
push edi
push ebx
call dword [sym.imp.msvcrt.dll_fread]
add esp, 0x14
test eax, eax
jne 0x514f76
push ebx
call fcn.0040107c
push esi
call dword [sym.imp.msvcrt.dll_fclose]
add esp, 8
pop edi
pop ebx
mov al, 1
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.msvcrt.dll_fclose]
lea edx, [edi - 4]
push edx
push ebx
call fcn.0044ad30
add esp, 0xc
cmp eax, dword [ebx + edi - 4]
je 0x514f9b
push ebx
call fcn.0040107c
jmp 0x5150c9
mov ecx, edi
imul ecx, ecx, 0x6f
mov eax, 0x51eb851f
mul ecx
mov esi, edx
shr esi, 5
add esi, 0xc
push esi
call fcn.00401148
push 0x38
push str.1.1.3
mov dword [ebp - 0x10], eax
xor eax, eax
push eax
push 9
push 0xfffffffffffffff1
push 8
lea edx, [ebp - 0x48]
push 9
push edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x20], eax
call fcn.004f21c0
mov dword [ebp - 0x44], edi
mov edi, dword [ebp - 0x10]
lea eax, [ebp - 0x48]
push 4
push eax
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], esi
call fcn.004f1050
mov esi, dword [ebp - 0x34]
lea ecx, [ebp - 0x48]
push ecx
call fcn.004f12c0
push ebx
call fcn.0040107c
add esp, 0x34
cmp esi, 0x2385d
jbe 0x51501e
push edi
call fcn.0040107c
jmp 0x5150c9
push 0x145
lea ecx, [ebp - 0x168]
call fcn.00446710
push 0x64
lea ecx, [ebp - 0x168]
mov dword [ebp - 4], 0
call sym.GameRanger.exe_public:_void___thiscall_CRecord::Write_ubyte_unsigned_char_
mov edx, dword [ebp + 0xc]
push edx
lea ecx, [ebp - 0x168]
call sym.GameRanger.exe_public:_void___thiscall_CRecord::Write_uword_unsigned_short_int_
mov eax, dword [ebp + 0x10]
push eax
lea ecx, [ebp - 0x168]
call fcn.0044b5e0
mov ecx, dword [ebp + 0x14]
push ecx
lea ecx, [ebp - 0x168]
call fcn.0044b5e0
push esi
lea ecx, [ebp - 0x168]
call fcn.0044b5e0
push esi
push edi
lea ecx, [ebp - 0x168]
call sym.GameRanger.exe_public:_void___thiscall_CRecord::Write_data_void_const___unsigned_int_
push edi
call fcn.0040107c
lea edx, [ebp - 0x168]
push edx
call fcn.0046bef0
add esp, 8
lea ecx, [ebp - 0x168]
mov dword [ebp - 4], 0xffffffff
call fcn.004465d0
pop edi
pop ebx
mov al, 1
pop esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
push esi
call dword [sym.imp.msvcrt.dll_fclose]
mov ecx, dword [ebp - 0xc]
add esp, 4
pop edi
pop ebx
xor al, al
pop esi
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
Function at 0x515140
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x64afd8
push 0x524b28
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
cmp byte [0x6a200a], 0
je 0x5151c5
cmp byte [0x6f7e14], 0
jne 0x5151c5
mov byte [0x6f7e14], 1
mov dword [ebp - 4], 0
push 0x10010
push str.GameRanger_Error
push str.GameRanger_has_encountered_an_unexpected_error_and_must_quit._n_nThis_error_has_been_logged_automatically.
push 0
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x5151b7
mov dword [ebp - 4], 0xffffffff
mov byte [0x6f7e14], 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret

Function at 0x5156b0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
mov eax, dword [esi + 8]
push eax
call fcn.004596a0
mov eax, dword [esi + 0xc]
add esp, 4
test eax, eax
je 0x515707
push edi
push 2
push 0xfffffffffffffffc
push eax
call dword [sym.imp.msvcrt.dll_fseek]
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0xc]
add esp, 0xc
lea edi, [esi + 0x18]
push ecx
mov ecx, dword [ebp + 8]
push edx
call fcn.00519720
mov dword [edi], eax
mov eax, dword [esi + 0xc]
push eax
push 1
push 4
push edi
call dword [sym.imp.msvcrt.dll_fwrite]
add esp, 0x10
mov ecx, esi
call fcn.00514e80
pop edi
mov ecx, dword [esi + 8]
push ecx
call fcn.004596c0
add esp, 4
pop esi
pop ebp
ret 4
Function at 0x515720
Capabilities:
Enumerate files on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x990
lea eax, [ebp - 0x990]
push 0x800
push eax
call fcn.00514b00
lea eax, [ebp - 0x990]
add esp, 8
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x515746
push ebx
push esi
push edi
push str.Log_.dat
lea ecx, [ebp - 0x990]
sub eax, edx
push ecx
mov esi, eax
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
lea edx, [ebp - 0x190]
push edx
lea eax, [ebp - 0x990]
push eax
xor ebx, ebx
call dword [sym.imp.KERNEL32.dll_FindFirstFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x515896
lea ecx, [ebp + esi - 0x990]
mov esi, dword [sym.imp.msvcrt.dll_sscanf]
mov dword [ebp - 0x10], ecx
jmp 0x5157a0
mov edx, dword [ebp - 0x10]
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x990]
push ecx
mov byte [edx], 0
call dword [sym.imp.SHLWAPI.dll_PathAppendA]
cmp dword [ebp - 0x174], 0
jne 0x515865
mov edx, dword [ebp - 0x170]
add edx, 0xffffffe7
cmp edx, 0x1ffe7
ja 0x515865
lea eax, [ebp - 8]
push eax
lea ecx, [ebp - 4]
push ecx
lea edx, [ebp - 0xc]
push edx
lea eax, [ebp - 0x164]
push str.Log__u__u__u.dat
push eax
call esi
add esp, 0x14
cmp eax, 3
je 0x515807
lea ecx, [ebp - 0x990]
push ecx
jmp 0x51586c
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 4]
movzx ecx, word [ebp - 0xc]
push edx
push eax
push ecx
lea edx, [ebp - 0x50]
push str.Log__u__u__u.dat
push edx
call dword [sym.imp.msvcrt.dll_sprintf]
lea eax, [ebp - 0x164]
push eax
lea ecx, [ebp - 0x50]
push ecx
call sym.GameRanger.exe_int___cdecl_strcasecmp_char_const___char_const__
add esp, 0x1c
test eax, eax
jne 0x515865
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
push eax
push ecx
push edx
lea eax, [ebp - 0x990]
push eax
call fcn.00514ec0
add esp, 0x10
test al, al
jne 0x515862
lea ecx, [ebp - 0x990]
push ecx
jmp 0x51586c
inc ebx
jmp 0x515874
lea edx, [ebp - 0x990]
push edx
call fcn.004526a0
add esp, 4
cmp ebx, 4
jae 0x51588f
lea eax, [ebp - 0x190]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindNextFileA]
test eax, eax
jne 0x5157a0
push edi
call dword [sym.imp.KERNEL32.dll_FindClose]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret