joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4b7f00
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x230
mov eax, dword [0x5b3074]
xor eax, esp
mov dword [esp + 0x22c], eax
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
mov eax, dword [edi + 4]
cmp dword [eax + 0x10], 0
je 0x4b7f2f
call fcn.004b8040
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x4b7f52
xor al, al
pop edi
pop esi
mov ecx, dword [esp + 0x22c]
xor ecx, esp
call fcn.00510209
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [edi + 4]
push esi
call fcn.004c5ae0
test eax, eax
je 0x4b7f3a
push esi
lea eax, [esp + 0x2c]
push 0x591530
push eax
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
test esi, esi
je 0x4b7fb1
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4b7fb1
lea eax, [esp + 0x18]
push eax
push 0
lea eax, [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileTime]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [esp + 0x28]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4b8010
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x30]
call fcn.004b8630
test eax, eax
je 0x4b8010
mov eax, dword [esp + 0xc]
cmp eax, dword [esp + 0x14]
jne 0x4b8010
mov eax, dword [esp + 8]
cmp eax, dword [esp + 0x10]
jne 0x4b8010
mov eax, dword [esp + 0x1c]
cmp eax, dword [esp + 0x24]
jne 0x4b8010
mov eax, dword [esp + 0x18]
cmp eax, dword [esp + 0x20]
jne 0x4b8010
mov ecx, dword [edi + 8]
lea eax, [esp + 0x28]
push eax
call fcn.004c6220
test al, al
jne 0x4b8020
mov eax, dword [edi + 4]
mov ecx, edi
push dword [eax + 0xc]
push dword [eax + 0x10]
call fcn.004b8230
mov ecx, dword [esp + 0x234]
pop edi
pop esi
xor ecx, esp
call fcn.00510209
mov esp, ebp
pop ebp
ret 8

Function at 0x4b80e0
Capabilities:
Read file on windows

Disassembly:
push esi
mov esi, ecx
push edi
mov edi, edx
test esi, esi
jne 0x4b80f1
mov dword [edi], ecx
pop edi
xor eax, eax
pop esi
ret
push 2
push 0
push esi
call fcn.0053fd1c
push esi
call fcn.00540352
push 0
push 0
push esi
mov dword [edi], eax
call fcn.0053fd1c
mov eax, dword [edi]
add esp, 0x1c
test eax, eax
jle 0x4b80ec
push ebx
push eax
call fcn.0051e883
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4b813e
push esi
push 1
push dword [edi]
push ebx
call fcn.0054056d
push 0
push 0
push esi
call fcn.0053fd1c
add esp, 0x1c
mov eax, ebx
pop ebx
pop edi
pop esi
ret
Function at 0x4b9fb0
Capabilities:
Link many functions at runtime

Disassembly:
push ebx
push edi
mov edi, ecx
xor ebx, ebx
cmp dword [edi + 4], ebx
je 0x4b9fd0
cmp dword [edi + 0xc], ebx
je 0x4ba03e
cmp dword [edi + 0x10], ebx
je 0x4ba03e
cmp dword [edi + 0x14], ebx
je 0x4ba03e
pop edi
lea eax, [ebx + 1]
pop ebx
ret
push str.uxtheme.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [edi + 4], eax
test eax, eax
je 0x4ba03e
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.BeginBufferedPaint
push eax
call esi
push str.BufferedPaintSetAlpha
push dword [edi + 4]
mov dword [edi + 0xc], eax
call esi
push str.EndBufferedPaint
push dword [edi + 4]
mov dword [edi + 0x10], eax
call esi
push str.BufferedPaintUnInit
push dword [edi + 4]
mov dword [edi + 0x14], eax
call esi
push str.BufferedPaintInit
push dword [edi + 4]
mov dword [edi + 0x18], eax
call esi
mov dword [edi + 0x1c], eax
pop esi
cmp dword [edi + 0xc], ebx
je 0x4ba03e
cmp dword [edi + 0x10], ebx
je 0x4ba03e
cmp dword [edi + 0x14], ebx
mov eax, 1
cmovne ebx, eax
pop edi
mov eax, ebx
pop ebx
ret

Function at 0x4ba830
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x30
push 0x2c
lea eax, [esp + 8]
mov dword [esp + 4], 0x30
push 0
push eax
call fcn.00517390
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov dword [esp + 0x14], eax
call fcn.004bafd0
test eax, eax
mov dword [esp + 8], 0x4ba4b0
mov ecx, 0x5ccd90
cmove ecx, dword [esp + 0x28]
push 0
mov dword [esp + 0x2c], ecx
call dword [sym.imp.GDI32.dll_GetStockObject]
mov dword [esp + 0x20], eax
lea eax, [esp]
push eax
call dword [sym.imp.USER32.dll_RegisterClassExW]
push 0
push dword [esp + 0x18]
push 0
push 0xfffffffffffffffd
push 0x64
push 0x64
push 0
push 0
push 0
push str.TimerWin1
push dword [esp + 0x50]
push 0
call dword [sym.imp.USER32.dll_CreateWindowExW]
push 0
push eax
mov dword [0x5ccd84], eax
call dword [sym.imp.USER32.dll_ShowWindow]
mov ecx, dword [0x5dd3d8]
mov eax, 0x2aaaaaab
sub ecx, dword [0x5dd3d4]
imul ecx
mov dword [0x5c6ba4], 0
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x4ba909
push 0
push 0x32
push 1
push dword [0x5ccd84]
call dword [sym.imp.USER32.dll_SetTimer]
mov dword [0x5c6ba4], 1
xor eax, eax
mov esp, ebp
pop ebp
ret
Function at 0x4beb20
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
push edi
lea edi, [esi + 0x100]
mov dword [esi], vtable.CAnimateMgr.1.0
push edi
mov dword [esi + 0x34], vtable.CAnimateMgr.0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esi + 0xf0]
push edi
mov dword [esi + 0xf4], eax
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
push 0x3e8
push dword [esi + 0xfc]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4beb81
push 0
push dword [esi + 0xfc]
call dword [sym.imp.KERNEL32.dll_TerminateThread]
mov dword [esi + 0xfc], 0
push edi
call dword [sym.imp.KERNEL32.dll_DeleteCriticalSection]
mov ecx, dword [esi + 0xf0]
test ecx, ecx
je 0x4bebc2
mov eax, dword [esi + 0xf8]
sub eax, ecx
sar eax, 2
push eax
push ecx
call fcn.004bf5b0
mov dword [esi + 0xf0], 0
mov dword [esi + 0xf4], 0
mov dword [esi + 0xf8], 0
pop edi
mov ecx, esi
pop esi
jmp fcn.00433b10

Function at 0x4bec30
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, ecx
test esi, esi
jne 0x4bec49
pop edi
mov eax, 0x80004005
pop esi
pop ebp
ret 4
push ebx
lea ebx, [edi + 0x100]
push ebx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 0xf4]
lea ecx, [edi + 0xf0]
mov edx, dword [ecx]
cmp edx, eax
je 0x4bec7f
nop dword [eax]
cmp dword [edx], esi
je 0x4bec7b
add edx, 4
cmp edx, eax
jne 0x4bec70
cmp edx, eax
jne 0x4bec8b
lea eax, [ebp + 8]
push eax
call fcn.004befe0
mov esi, dword [ebp + 8]
push ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi]
pop ebx
cmp eax, vtable.CXAnimation.0
jne 0x4becc7
cmp dword [edi + 0xfc], 0
jne 0x4becbf
push 0
push 0
push edi
push 0x4bebd0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [edi + 0xfc], eax
pop edi
xor eax, eax
pop esi
pop ebp
ret 4
mov ecx, esi
call dword [eax + 4]
jmp 0x4bec9c
Function at 0x4c5ae0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4c5b04
cmp dword [esi + 4], 0
je 0x4c5afd
push eax
call fcn.0051e68e
add esp, 4
mov dword [esi + 0x10], 0
push 0x589994
push dword [ebp + 8]
mov dword [esi + 0xc], 0
mov dword [esi + 8], 0
call fcn.0053f8b7
mov edi, eax
add esp, 8
test edi, edi
jne 0x4c5b2e
pop edi
pop esi
pop ebp
ret 4
push ebx
push 2
push 0
push edi
call fcn.0053fd1c
push edi
call fcn.00540352
push 0
push 0
push edi
mov ebx, eax
call fcn.0053fd1c
add esp, 0x1c
test ebx, ebx
jle 0x4c5b6e
push ebx
mov ecx, esi
call fcn.004c5bf0
mov eax, dword [esi + 0x10]
test eax, eax
je 0x4c5b6e
push edi
push 1
push ebx
push eax
call fcn.0054056d
add esp, 0x10
push edi
call fcn.00540714
add esp, 4
xor eax, eax
cmp dword [esi + 0x10], eax
setne al
pop ebx
pop edi
pop esi
pop ebp
ret 4

Function at 0x4c6220
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573ad6
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], 0
mov eax, dword [ebx]
push dword [eax + 4]
call fcn.004c6c10
mov eax, dword [ebx]
mov dword [eax + 4], eax
mov eax, dword [ebx]
mov dword [eax], eax
mov eax, dword [ebx]
mov dword [ebp - 4], 0xffffffff
mov dword [eax + 8], eax
mov eax, dword [ebp + 8]
mov dword [ebx + 4], 0
test eax, eax
je 0x4c62e0
push 0x589994
push eax
call fcn.0053f8b7
mov edi, eax
add esp, 8
mov dword [ebp - 0x18], edi
test edi, edi
je 0x4c62e0
push edi
call fcn.005432f7
add esp, 4
push eax
call fcn.005432e1
add esp, 4
mov esi, eax
lea eax, [ebp - 0x24]
push edi
push 1
push 8
push eax
call fcn.0054056d
add esp, 0x10
mov byte [ebp + 0xb], 0
cmp dword [ebp - 0x24], 0x78646972
jne 0x4c636f
cmp dword [ebp - 0x20], 0x8000
jb 0x4c62f6
push edi
call fcn.00540714
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
add esi, 0xfffffff8
push esi
call fcn.0051e883
mov ebx, eax
add esp, 4
mov dword [ebp - 0x1c], ebx
test ebx, ebx
je 0x4c636f
push edi
push 1
push esi
push ebx
call fcn.0054056d
lea edx, [ebx + esi]
mov ecx, ebx
xor ebx, ebx
mov dword [ebp + 8], edx
add esp, 0x10
cmp dword [ebp - 0x20], ebx
jle 0x4c635d
mov edi, dword [ebp - 0x14]
nop word [eax + eax]
mov esi, dword [ecx + 0xc]
add esi, 0x12
add esi, ecx
cmp esi, edx
ja 0x4c635a
push dword [ecx + 8]
lea eax, [ecx + 0x10]
push dword [ecx + 4]
push dword [ecx]
mov ecx, edi
push eax
call fcn.004c5e70
mov edx, dword [ebp + 8]
inc ebx
mov ecx, esi
cmp ebx, dword [ebp - 0x20]
jl 0x4c6330
mov edi, dword [ebp - 0x18]
push dword [ebp - 0x1c]
call fcn.0051e68e
add esp, 4
cmp ebx, dword [ebp - 0x20]
sete byte [ebp + 0xb]
push edi
call fcn.00540714
mov al, byte [ebp + 0xb]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x4cb170
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x573d53
mov eax, dword fs:[0]
push eax
push ecx
push esi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [esi + 8], 0xffffffff
mov dword [esi + 4], 0xffffffff
mov dword [esi + 0xc], 0
mov dword [esi + 0x20], 0x5dd06c
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [ebp - 4], 0
lea ecx, [esi + 0x34]
mov dword [esi], vtable.TiXmlDocument.0
mov dword [ecx], 0x5dd06c
mov byte [ebp - 4], 1
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x3c], 0xffffffff
push 0
push 0x58cca0
mov dword [esi + 0x38], 4
mov byte [esi + 0x44], 0
mov byte [esi + 0x2c], 0
mov dword [esi + 0x30], 0
call fcn.004cd6a0
mov dword [esi + 0x40], 0
mov eax, esi
mov dword [esi + 0x3c], 0
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x4cb620
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
push edi
test ebx, ebx
jne 0x4cb67a
cmp byte [esi + 0x2c], bl
jne 0x4cb671
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 2
lea edi, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb650
sub ecx, edi
push ecx
push edx
lea ecx, [esi + 0x34]
call fcn.004cd6a0
mov dword [esi + 0x40], 0xffffffff
mov dword [esi + 0x3c], 0xffffffff
pop edi
pop esi
xor al, al
pop ebx
pop ebp
ret 8
mov edi, dword [esi + 0x18]
test edi, edi
je 0x4cb690
mov ecx, edi
mov edi, dword [edi + 0x28]
push 1
mov eax, dword [ecx]
call dword [eax]
test edi, edi
jne 0x4cb681
push 2
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0
push 0
push ebx
mov dword [esi + 8], 0xffffffff
mov dword [esi + 4], 0xffffffff
call fcn.0053fd1c
push ebx
call fcn.00540352
push 0
mov edi, eax
push 0
push ebx
mov dword [ebp + 8], edi
call fcn.0053fd1c
add esp, 0x1c
test edi, edi
jg 0x4cb6fc
cmp byte [esi + 0x2c], 0
jne 0x4cb671
mov edx, dword [str.Error_document_empty.]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 0xc
lea edi, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb6f0
jmp 0x4cb657
lea eax, [edi + 1]
push eax
call fcn.00510d3b
push ebx
mov ebx, dword [ebp + 8]
mov edi, eax
push 1
push ebx
push edi
mov byte [edi], 0
call fcn.0054056d
add esp, 0x14
cmp eax, 1
je 0x4cb754
push edi
call fcn.00510285
add esp, 4
cmp byte [esi + 0x2c], 0
jne 0x4cb671
mov edx, dword [str.Failed_to_open_file]
mov ecx, edx
mov byte [esi + 0x2c], 1
mov dword [esi + 0x30], 2
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4cb748
jmp 0x4cb657
mov byte [edi + ebx], 0
mov eax, edi
cmp byte [edi], 0
mov ecx, edi
je 0x4cb77f
mov dl, byte [eax]
mov ebx, eax
cmp dl, 0xd
jne 0x4cb776
inc eax
mov byte [ecx], 0xa
cmp byte [eax], 0xa
cmovne eax, ebx
jmp 0x4cb778
mov byte [ecx], dl
inc eax
inc ecx
cmp byte [eax], 0
jne 0x4cb761
push dword [ebp + 0xc]
mov byte [ecx], 0
mov ecx, esi
mov eax, dword [esi]
push 0
push edi
call dword [eax + 8]
push edi
call fcn.00510285
add esp, 4
cmp byte [esi + 0x2c], 0
sete al
pop edi
pop esi
pop ebx
pop ebp
ret 8
Function at 0x4db260
Capabilities:
Create directory
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x574f00
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x18], edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x1c], 0
call fcn.004d8b20
mov dword [ebp - 4], 0
push dword [ebp - 0x10]
call dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x4db2c6
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
push 0
push dword [ebp - 0x10]
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4db2db
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4db2f0
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4db2f2
call edx
add eax, 0x10
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x14]
mov byte [ebp - 4], 1
push eax
lea edx, [ebp - 0x10]
mov ecx, edi
call fcn.004ea720
mov byte [ebp - 4], 0
or esi, 0xffffffff
mov ecx, dword [ebp - 0x14]
add esp, 4
add ecx, 0xfffffff0
mov eax, esi
lock xadd dword [ecx + 0xc], eax
dec eax
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x4db355
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov ebx, dword [eax + 4]
mov dword [ebp - 0x14], ebx
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4db350
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
jmp 0x4db355
mov ecx, edx
call dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x10]
add ecx, 0xfffffff0
lock xadd dword [ecx + 0xc], esi
dec esi
test esi, esi
jg 0x4db39d
mov edx, dword [ecx]
push ecx
mov eax, dword [edx]
mov esi, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4db399
mov eax, dword [edx + 4]
push 0
push dword [eax + 4]
call ebx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, edx
call esi
mov eax, edi
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 0x4dc3d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
mov eax, edx
push 3
push SysReAllocString
push ecx
mov dword [eax], 0
mov dword [ebp - 4], eax
mov dword [edi], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x4dc443
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [edi], eax
test eax, eax
je 0x4dc47f
cmp eax, 0xffffffff
je 0x4dc47f
add eax, 8
push 0x5ca630
push eax
call fcn.0051090a
mov ebx, dword [ebp - 4]
mov ecx, eax
add esp, 8
mov dword [ebx], ecx
test ecx, ecx
jne 0x4dc44c
push esi
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
add eax, 8
push eax
push 0
push ecx
call fcn.00517390
add esp, 0xc
mov dword [ebp + 8], 0
lea eax, [ebp + 8]
push 0
push eax
push dword [edi]
push dword [ebx]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov ecx, dword [ebp + 8]
xor ebx, ebx
cmp ecx, dword [edi]
sete bl
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4dc490
Capabilities:
Delete file
Move file
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575028
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov dword [ebp - 0x14], esi
mov ebx, ecx
test ebx, ebx
je 0x4dc5fb
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x4dc5fb
test esi, esi
je 0x4dc5fb
call fcn.00409c54
mov ecx, eax
test ecx, ecx
jne 0x4dc4f3
push 0x80004005
call fcn.0040b4a2
mov eax, dword [ecx]
mov edx, dword [eax + 0xc]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4dc508
lock inc dword [ecx + 0x14]
lea eax, [ecx + 8]
jmp 0x4dc50a
call edx
add eax, 0x10
mov dword [ebp - 0x10], eax
push ebx
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push str._s.write_cache
push eax
call fcn.00418437
mov esi, dword [ebp - 0x10]
add esp, 0xc
xor edi, edi
push edi
push 0x80
push 2
push edi
push 1
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp eax, 0xffffffff
je 0x4dc59d
push edi
lea ecx, [ebp - 0x10]
mov dword [ebp - 0x10], edi
mov edi, dword [ebp + 8]
push ecx
push edi
push dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x18]
xor eax, eax
cmp dword [ebp - 0x10], edi
sete al
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edi, dword [ebp - 0x14]
test edi, edi
je 0x4dc59d
push 0x80
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 1
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_MoveFileExW]
push esi
mov edi, eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
or ecx, 0xffffffff
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4dc5e7
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
mov edx, dword [eax + 4]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x4dc5e5
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call edx
mov eax, edi
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 0x4dc610
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x575058
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov esi, ecx
test esi, esi
je 0x4dc6ba
push esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4dc6ba
mov dword [ebp - 0x1c], vtable.CxAutoArray_unsigned_char_.0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0x10]
mov dword [ebp - 4], 0
push eax
lea edx, [ebp - 0x18]
mov dword [ebp - 0x10], 0
mov ecx, esi
call fcn.004dc3d0
mov esi, dword [ebp - 0x18]
add esp, 4
test eax, eax
je 0x4dc698
cmp dword [ebp - 0x10], 0
je 0x4dc698
mov edx, edi
mov ecx, esi
call fcn.004dca00
mov edi, eax
jmp 0x4dc69a
xor edi, edi
test esi, esi
je 0x4dc6a7
push esi
call fcn.00510285
add esp, 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
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 0x4e79d0
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5763a6
mov eax, dword fs:[0]
push eax
push esi
push edi
mov eax, dword [0x5b3074]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.00510252
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.004f6aa3
mov dword [esi + 4], eax
lea ecx, [edi + 8]
lea eax, [edi + 4]
mov dword [edi + 0x34], esi
mov dword [edi + 0xc], eax
add esp, 8
lea eax, [edi + 0x14]
mov dword [edi + 0x10], ecx
mov dword [edi + 0x1c], eax
lea eax, [edi + 0x18]
mov dword [edi + 0x20], eax
lea eax, [edi + 0x24]
mov dword [edi + 0x2c], eax
lea eax, [edi + 0x28]
mov dword [edi + 0x30], eax
mov dword [ecx], 0
mov eax, dword [edi + 0x20]
mov dword [eax], 0
mov eax, dword [edi + 0x30]
mov dword [eax], 0
mov eax, dword [edi + 0xc]
mov dword [eax], 0
mov eax, dword [edi + 0x1c]
mov dword [eax], 0
mov eax, dword [edi + 0x2c]
mov dword [eax], 0
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 0x4e9830
Capabilities:
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
push ecx
mov esi, ecx
call fcn.004e97d0
mov ecx, dword [ebp + 8]
test ecx, ecx
jne 0x4e984f
mov dword [esi + 4], 0xffffffff
jmp 0x4e9880
cmp dword [esi], 0
mov edx, 0xc0000000
push 0
push 0x80
push 4
push 0
mov eax, SysReAllocString
push 3
cmovne eax, edx
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x4e9912
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
jne 0x4e9892
xorps xmm0, xmm0
movlpd qword [ebp - 8], xmm0
jmp 0x4e989d
lea ecx, [ebp - 8]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
mov dword [esi + 0x10], eax
or eax, ecx
mov dword [esi + 0x14], ecx
jne 0x4e98bb
cmp dword [esi], eax
je 0x4e98bb
mov dword [esi + 0x10], 1
mov dword [esi + 0x14], eax
mov eax, dword [esi + 0x10]
mov cl, 0x20
mov edx, dword [esi + 0x14]
push ebx
xor ebx, ebx
cmp dword [esi], ebx
push 0
push dword [esi + 0x10]
setne bl
lea ebx, [ebx*2 + 2]
call fcn.005661d0
push eax
push ebx
push 0
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 8], eax
pop ebx
test eax, eax
je 0x4e9912
cmp dword [esi], 0
mov edx, 0xf001f
push 0
push 0
mov ecx, 4
push 0
cmovne ecx, edx
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 0xc], eax
cmp dword [esi + 0xc], 0
jne 0x4e9920
push ecx
mov ecx, esi
call fcn.004e97d0
pop esi
mov esp, ebp
pop ebp
ret 0x10