joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f27f0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 8]
push ebx
push edi
mov ebx, ecx
cmp dword [edx + 0x14], 0x10
mov edi, dword [edx + 0x10]
jb 0x4f2805
mov edx, dword [edx]
xor eax, eax
push esi
mov esi, 0x811c9dc5
test edi, edi
je 0x4f2822
movzx ecx, byte [eax + edx]
inc eax
xor ecx, esi
imul esi, ecx, 0x1000193
cmp eax, edi
jb 0x4f2811
push 0x1f31d
and esi, 0x7fffffff
push esi
call fcn.00526151
imul ecx, edx, 0x41a7
add esp, 8
imul eax, eax, 0xb14
pop esi
sub ecx, eax
jns 0x4f284d
add ecx, 0x7fffffff
mov eax, dword [ebx + 0x1c]
pop edi
and eax, ecx
pop ebx
pop ebp
ret 4

Function at 0x4f2de0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
push edi
mov edi, dword [ebp + 8]
mov ecx, dword [edx + 0x10]
mov eax, dword [edi + 0x10]
cmp eax, 1
jle 0x4f2dfc
cmp dword [edi + eax*4 + 0x10], 0
je 0x4f2e53
cmp ecx, 1
jle 0x4f2e0f
cmp dword [edx + ecx*4 + 0x10], 0
jne 0x4f2e0f
push str.cmp_called_with_b__x_b__wds_1___0
jmp 0x4f2e58
sub eax, ecx
jne 0x4f2e4a
add edx, 0x10
lea eax, [ecx - 1]
add edi, 0x14
push esi
lea eax, [edi + eax*4]
lea esi, [edx + ecx*4]
mov ecx, dword [eax]
mov edx, dword [esi]
cmp ecx, edx
jne 0x4f2e43
sub esi, eax
nop dword [eax]
cmp eax, edi
jbe 0x4f2e4d
mov ecx, dword [eax - 4]
sub eax, 4
mov edx, dword [esi + eax]
cmp ecx, edx
je 0x4f2e30
cmp ecx, edx
sbb eax, eax
and eax, 0xfffffffe
inc eax
pop esi
pop edi
pop ebp
ret
pop esi
xor eax, eax
pop edi
pop ebp
ret
push str.cmp_called_with_a__x_a__wds_1___0
push 0x581e50
push 2
call fcn.0051ee5d
add esp, 4
push eax
call fcn.004f5e60
add esp, 0xc
push 1
call fcn.00520783
int3

Function at 0x4f2e80
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x5bca28
call fcn.004e6cc0
push dword [eax]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
jne 0x4f2ea4
mov eax, dword [ebp + 8]
mov dword [eax], 0
pop ebp
ret
mov ecx, dword [eax + 0xa8]
mov eax, dword [ebp + 8]
mov dword [eax], ecx
test ecx, ecx
je 0x4f2ebf
mov edx, 1
add ecx, 4
lock xadd dword [ecx], edx
pop ebp
ret
Function at 0x4fba30
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x552788
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x5b327c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push dword [ebp + 8]
lea eax, [ebp - 0x10]
push 0x400000
push eax
call fcn.004fc440
push dword [ebp - 0x10]
mov dword [ebp - 4], 0
call fcn.0046c870
add esp, 0x14
test eax, eax
jne 0x4fbab9
mov eax, dword [ebp - 0x10]
or ecx, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4fbbe4
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [0x5bdac0]
mov esi, dword [ebp - 0x10]
test edi, edi
jne 0x4fbb15
push 0x5b48c4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [0x5bdac0], edi
jne 0x4fbb04
push 0x1c
call fcn.004627fd
mov ecx, eax
add esp, 4
mov dword [ebp - 0x14], ecx
test ecx, ecx
je 0x4fbaf9
mov dword [ecx], edi
mov dword [ecx + 4], edi
mov dword [ecx + 8], edi
mov dword [ecx + 0xc], edi
jmp 0x4fbafb
xor ecx, ecx
xchg dword [ebp - 0x14], eax
mov dword [0x5bdac0], ecx
push 0x5b48c4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [0x5bdac0]
cmp dword [edi], 0
jne 0x4fbb78
push esi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi], eax
test eax, eax
je 0x4fbbc2
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.HttpInit
push eax
call esi
push str.HttpUninit
push dword [edi]
mov dword [edi + 4], eax
call esi
push str.zlib_uncompress
push dword [edi]
mov dword [edi + 8], eax
call esi
push str.zlib_compress
push dword [edi]
mov dword [edi + 0x10], eax
call esi
push str.zlib_compressBound
push dword [edi]
mov dword [edi + 0x14], eax
call esi
mov dword [edi + 0x18], eax
mov eax, dword [edi + 4]
test eax, eax
je 0x4fbb78
call eax
mov dword [edi + 0xc], eax
cmp dword [edi + 8], 0
je 0x4fbbc2
cmp dword [edi + 4], 0
je 0x4fbbc2
cmp dword [edi + 0xc], 0
je 0x4fbbc2
mov esi, dword [ebp - 0x10]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4fbbac
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10]
or eax, 0xffffffff
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fbbe4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4fc0c0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562de1
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b327c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x21c]
mov esi, dword [ebp + 0xc]
push 0x20a
push 0
push eax
mov dword [ebp - 0x224], edi
call fcn.0050c770
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x1a
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fc268
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x224]
call fcn.0040a850
test al, al
jne 0x4fc187
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4fc165
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.004171c0
push 0
push esi
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push esi
push eax
mov dword [ebp - 4], 1
call fcn.004fcad0
add esp, 0x10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc1c5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x10], 0
je 0x4fc21b
push 0
push dword [ebp - 0x220]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fc21b
push 0x566bb8
mov ecx, edi
call fcn.00404130
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4fc24b
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4fc24b
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.0041b8e0
mov edx, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4fc24b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004626cb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040a830
int3
Function at 0x4fc280
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562de1
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b327c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x21c]
mov esi, dword [ebp + 0xc]
push 0x20a
push 0
push eax
mov dword [ebp - 0x224], edi
call fcn.0050c770
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 0x10
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fc428
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x224]
call fcn.0040a850
test al, al
jne 0x4fc347
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4fc325
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.004171c0
push 0
push esi
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push esi
push eax
mov dword [ebp - 4], 1
call fcn.004fcad0
add esp, 0x10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc385
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x10], 0
je 0x4fc3db
push 0
push dword [ebp - 0x220]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fc3db
push 0x566bb8
mov ecx, edi
call fcn.00404130
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4fc40b
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4fc40b
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.0041b8e0
mov edx, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4fc40b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004626cb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040a830
int3
Function at 0x4fc440
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562e20
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x5b327c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x14]
push eax
call fcn.004fc8c0
push 0
push dword [ebp + 0x10]
mov dword [ebp - 4], 0
push dword [eax]
lea eax, [ebp - 0x10]
push eax
call fcn.004fcad0
add esp, 0x18
mov edx, dword [ebp - 0x14]
or esi, 0xffffffff
mov byte [ebp - 4], 2
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc4ae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x14], 0
je 0x4fc4df
push 0
push dword [ebp - 0x10]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fc4df
mov edi, dword [ebp + 8]
mov ecx, edi
push 0x566bb8
call fcn.00404130
jmp 0x4fc4ed
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x10]
push eax
mov ecx, edi
call fcn.0041b8e0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4fc50c
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4fc520
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562de1
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b327c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x21c]
mov esi, dword [ebp + 0xc]
push 0x20a
push 0
push eax
mov dword [ebp - 0x224], edi
call fcn.0050c770
add esp, 0xc
lea eax, [ebp - 0x21c]
push 0
push 2
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fc6c8
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x224]
call fcn.0040a850
test al, al
jne 0x4fc5e7
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4fc5c5
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.004171c0
push 0
push esi
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push esi
push eax
mov dword [ebp - 4], 1
call fcn.004fcad0
add esp, 0x10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc625
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x10], 0
je 0x4fc67b
push 0
push dword [ebp - 0x220]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fc67b
push 0x566bb8
mov ecx, edi
call fcn.00404130
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4fc6ab
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4fc6ab
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.0041b8e0
mov edx, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4fc6ab
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004626cb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040a830
int3
Function at 0x4fc6e0
Capabilities:
Check if file exists
Create directory
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562de1
mov eax, dword fs:[0]
push eax
sub esp, 0x218
mov eax, dword [0x5b327c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x21c]
mov esi, dword [ebp + 0xc]
push 0x20a
push 0
push eax
mov dword [ebp - 0x224], edi
call fcn.0050c770
add esp, 0xc
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fc887
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x21c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x224]
call fcn.0040a850
test al, al
jne 0x4fc7a6
lea ecx, [ebp - 0x21c]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4fc784
sub ecx, edx
lea eax, [ebp - 0x21c]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x224]
call fcn.004171c0
push 0
push esi
mov esi, dword [ebp - 0x224]
lea eax, [ebp - 0x220]
push esi
push eax
mov dword [ebp - 4], 1
call fcn.004fcad0
add esp, 0x10
lea edx, [esi - 0x10]
mov byte [ebp - 4], 3
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4fc7e4
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp dword [ebp + 0x10], 0
je 0x4fc83a
push 0
push dword [ebp - 0x220]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push dword [ebp - 0x220]
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fc83a
push 0x566bb8
mov ecx, edi
call fcn.00404130
mov eax, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], esi
dec esi
test esi, esi
jg 0x4fc86a
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
jmp 0x4fc86a
lea eax, [ebp - 0x220]
mov ecx, edi
push eax
call fcn.0041b8e0
mov edx, dword [ebp - 0x220]
mov dword [ebp - 4], 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4fc86a
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004626cb
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040a830
int3
Function at 0x4fcad0
Capabilities:
Check if file exists
Create directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562e90
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x5b327c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
test edi, edi
je 0x4fcbe9
cmp dword [ebp + 0x10], 0
je 0x4fcbe9
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fcc39
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp + 0xc], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x105
or eax, ecx
mov dword [ebp - 4], 1
jge 0x4fcb4e
push 0x105
lea ecx, [ebp + 0xc]
call fcn.00415050
mov esi, dword [ebp + 0xc]
push dword [ebp + 0x10]
push edi
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [esi - 8]
push esi
call fcn.00510f6c
add esp, 8
test eax, eax
js 0x4fcc43
cmp eax, dword [esi - 8]
jg 0x4fcc43
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
cmp dword [ebp + 0x14], ecx
je 0x4fcbd9
push ecx
push esi
push ecx
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4fcbd9
mov edi, dword [ebp + 8]
mov ecx, edi
push 0x566bb8
call fcn.00404130
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x4fcbc6
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edi, dword [ebp + 8]
lea eax, [ebp + 0xc]
push eax
mov ecx, edi
call fcn.0041b8e0
jmp 0x4fcba7
call fcn.00412080
mov ecx, eax
test ecx, ecx
je 0x4fcc4d
mov eax, dword [ecx]
call dword [eax + 0xc]
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
push 0x566bb8
mov ecx, esi
mov dword [ebp - 4], 0
call fcn.0040a850
test al, al
jne 0x4fcc26
push 0
push 0x566bb8
mov ecx, esi
call fcn.004171c0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.0040a830
push 0x80070057
call fcn.0040a830
push 0x80004005
call fcn.0040a830
int3
Function at 0x4fdd30
Capabilities:
Check if file exists
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x563050
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x5b327c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov edi, dword [ebp + 8]
test edi, edi
je 0x4fde79
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x4fde79
push edi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4fde79
push edi
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4fde79
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 5
push SysReAllocString
push edi
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x18], edi
cmp edi, 0xffffffff
je 0x4fde65
lea eax, [ebp - 0x20]
xorps xmm0, xmm0
push eax
push edi
movq qword [ebp - 0x20], xmm0
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4fde5e
cmp dword [ebp - 0x1c], ebx
jne 0x4fde5e
mov ecx, dword [esi + 0x10]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 4], ebx
cmp eax, ecx
ja 0x4fddfd
mov dword [esi + 0x10], eax
mov ecx, esi
cmp dword [esi + 0x14], 0x10
jb 0x4fddf7
mov ecx, dword [esi]
mov byte [ecx + eax], 0
jmp 0x4fde09
sub eax, ecx
mov ecx, esi
push 0
push eax
call fcn.004189a0
push 0
lea eax, [ebp + 8]
mov dword [ebp + 8], 0
push eax
push dword [ebp - 0x20]
mov ecx, esi
push 0
call fcn.0046483d
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp + 8]
jne 0x4fde5e
push edi
mov ebx, 1
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4fde90
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
mov eax, dword [0x5b327c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x80], eax
mov dword [ebp - 0x70], ebx
test edi, edi
je 0x4fe058
test eax, eax
je 0x4fe058
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x20
jl 0x4fe058
push ecx
push ebx
push eax
call fcn.0050c770
add esp, 0xc
push ebx
push 1
push 3
push ebx
push 1
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [ebp - 0x84], edi
test edi, edi
je 0x4fe058
cmp edi, 0xffffffff
je 0x4fe051
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.00505490
add esp, 8
lea eax, [ebp - 0x78]
xorps xmm0, xmm0
movq qword [ebp - 0x78], xmm0
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4fe051
mov eax, dword [ebp - 0x78]
or eax, dword [ebp - 0x74]
je 0x4fdfe7
push ebx
push ebx
push ebx
push 2
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edx, eax
mov dword [ebp - 0x70], edx
test edx, edx
je 0x4fe051
mov ecx, dword [ebp - 0x74]
xorps xmm0, xmm0
movq qword [ebp - 0x8c], xmm0
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x7c], eax
cmp eax, ecx
jg 0x4fdfe7
mov esi, dword [ebp - 0x78]
mov edi, dword [ebp - 0x8c]
jl 0x4fdf80
cmp edi, esi
jae 0x4fdfe7
nop
sub esi, edi
sbb ecx, eax
js 0x4fdf95
jg 0x4fdf90
cmp esi, 0x400000
jb 0x4fdf95
mov esi, 0x400000
push esi
push edi
push eax
push 4
push edx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ebx, eax
test ebx, ebx
je 0x4fdfe7
push esi
lea eax, [ebp - 0x6c]
push ebx
push eax
call fcn.005054e0
add esp, 0xc
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x7c]
xor ebx, ebx
mov ecx, dword [ebp - 0x74]
add edi, 0x400000
adc eax, ebx
mov dword [ebp - 0x7c], eax
cmp eax, ecx
jge 0x4fdfdb
mov esi, dword [ebp - 0x78]
mov edx, dword [ebp - 0x70]
jmp 0x4fdf80
jg 0x4fdfe7
mov esi, dword [ebp - 0x78]
mov edx, dword [ebp - 0x70]
cmp edi, esi
jb 0x4fdf80
lea eax, [ebp - 0x6c]
push eax
call fcn.00505380
mov edi, dword [ebp - 0x80]
add esp, 4
xor esi, esi
nop dword [eax + eax]
movzx eax, byte [ebp + esi - 0x14]
push eax
push 0x582e14
push 3
push edi
call fcn.0041a830
inc esi
add esp, 0x10
add edi, 2
cmp esi, 0x10
jl 0x4fe000
push dword [ebp + 0x10]
push dword [ebp - 0x80]
call fcn.0052b1de
add esp, 8
mov esi, 1
test ebx, ebx
je 0x4fe03d
push ebx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [ebp - 0x70]
test eax, eax
je 0x4fe04b
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x84]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004626cb
mov esp, ebp
pop ebp
ret