joyce8/EMBER2024-capa huggingface dataset:
Function at 0x46f210
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cc3a0
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], ebx
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx - 0xc]
cmp eax, ebx
jle 0x46f383
push 0x25
push ecx
call fcn.004af128
add esp, 8
cmp eax, ebx
je 0x46f383
sub eax, dword [ebp + 0xc]
sar eax, 1
cmp eax, 0xffffffff
je 0x46f383
call fcn.0049ff8a
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x46f287
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x10], esi
mov ecx, 1
mov byte [ebp - 4], cl
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x514
or eax, ecx
jge 0x46f2bd
push 0x514
lea ecx, [ebp - 0x10]
call fcn.004214f5
mov esi, dword [ebp - 0x10]
mov ecx, dword [ebp + 0xc]
push 0x514
push esi
push ecx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edi, eax
mov eax, dword [esi - 8]
push eax
push esi
call fcn.004ae65b
add esp, 8
cmp eax, ebx
jl 0x46f3d4
cmp eax, dword [esi - 8]
jg 0x46f3d4
xor edx, edx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], dx
cmp edi, ebx
jbe 0x46f364
add esi, 0xfffffff0
push esi
call fcn.00424240
mov edi, dword [ebp + 8]
add eax, 0x10
mov dword [edi], eax
add esp, 4
mov byte [ebp - 4], bl
lea eax, [esi + 0xc]
or ecx, 0xffffffff
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x46f32a
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f350
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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
lea eax, [esi - 0x10]
mov byte [ebp - 4], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f383
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
push eax
call fcn.00424240
mov esi, dword [ebp + 8]
add eax, 0x10
mov dword [esi], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0xc]
add eax, 0xfffffff0
add esp, 4
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f3c0
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
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 0x80070057
call fcn.00421000
int3
Function at 0x46f5d0
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cd890
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
call fcn.0049ff8a
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46f619
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea ecx, [eax + 0x10]
mov dword [ebp - 0x18], ecx
cmp dword [ebp + 0xc], 0
mov byte [ebp - 4], 1
je 0x46f682
mov edx, dword [ebp + 8]
lea eax, [edx - 0x10]
lea esi, [ecx - 0x10]
cmp eax, esi
je 0x46f6de
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x46f67b
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x46f67b
push eax
call fcn.00424240
add esp, 4
mov ebx, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x46f673
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push esi
call edx
add ebx, 0x10
mov dword [ebp - 0x18], ebx
jmp 0x46f6de
mov eax, dword [edx - 0xc]
push eax
push edx
jmp 0x46f6d6
lea edi, [ebp + 8]
call fcn.00450400
mov ecx, dword [eax]
mov esi, dword [ebp - 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x46f6de
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x46f6d1
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x46f6d1
push eax
call fcn.00424240
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x46f6c9
mov ecx, dword [esi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push esi
call eax
add ebx, 0x10
mov dword [ebp - 0x18], ebx
jmp 0x46f6de
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.004241cf
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x18]
push edx
push 0x46f3e0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], ecx
call dword [sym.imp.USER32.dll_EnumWindows]
mov esi, dword [ebp - 0x14]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f720
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x46f746
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
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 0x473480
Capabilities:
Check for time delay via gettickcount
Enumerate services
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4fdc28
push 0x4b45b0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x50ac94]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov edi, ecx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], 0x7530
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
push 0
push 0
push 1
push edi
mov ebx, dword [sym.imp.ADVAPI32.dll_EnumDependentServicesW]
call ebx
test eax, eax
jne 0x473660
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x47353a
mov edx, dword [ebp - 0x1c]
push edx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
test esi, esi
je 0x47353a
mov dword [ebp - 4], 0
lea eax, [ebp - 0x20]
push eax
lea ecx, [ebp - 0x1c]
push ecx
mov edx, dword [ebp - 0x1c]
push edx
push esi
push 1
push edi
call ebx
test eax, eax
jne 0x47354e
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x50ac94
call fcn.004bdeb4
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
xor ebx, ebx
mov dword [ebp - 0x24], ebx
cmp ebx, dword [ebp - 0x20]
jae 0x473654
lea ecx, [ebx + ebx*8]
lea esi, [esi + ecx*4]
mov ecx, 9
lea edi, [ebp - 0x7c]
rep movsd dword es:[edi], dword [esi]
push 0x24
mov edx, dword [ebp - 0x7c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
mov dword [ebp - 0x34], esi
test esi, esi
jne 0x4735ac
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x50ac94
call fcn.004bdeb4
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edi, 1
mov dword [ebp - 4], edi
lea edx, [ebp - 0x58]
push edx
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_ControlService]
test eax, eax
je 0x473527
cmp dword [ebp - 0x54], edi
je 0x473628
mov ecx, dword [ebp - 0x40]
push ecx
call dword [sym.imp.KERNEL32.dll_Sleep]
lea edx, [ebp - 0x1c]
push edx
push 0x24
lea eax, [ebp - 0x58]
push eax
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatusEx]
test eax, eax
je 0x473585
cmp dword [ebp - 0x54], edi
je 0x473628
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
jbe 0x4735c8
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x50ac94
call fcn.004bdeb4
add esp, 0xc
xor eax, eax
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0
call fcn.0047364c
add ebx, edi
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp - 0x28]
jmp 0x473553
mov dword [ebp - 4], 0xfffffffe
call fcn.0047367a
mov eax, 1
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x4737e0
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 0x1c]
mov edx, dword [eax]
push ecx
mov ecx, esp
mov dword [ebp - 4], esp
push edx
push str.MatrixFileIpc.SaveToDisk__:_saving_tree_and_emptying_DataIntegrity_value_____s
push ecx
call fcn.00468700
add esp, 0xc
call fcn.00473690
add esp, 4
call fcn.004986c0
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [esi + 0x1c]
mov edx, dword [eax]
push edx
call fcn.004893b0
mov eax, dword [esi + 0x1c]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [esi + 0x14]
push str.DataIntegrity
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x47f2c0
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x74
mov eax, dword [0x50ac94]
xor eax, ebp
mov dword [ebp - 8], eax
xor eax, eax
push esi
push edi
push 0x48
push eax
mov dword [ebp - 0x70], eax
mov dword [ebp - 0x6c], eax
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x64], eax
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x5c], eax
mov dword [ebp - 0x58], eax
lea eax, [ebp - 0x54]
push eax
call fcn.004aefb0
add esp, 0xc
mov ecx, 8
mov esi, 0x4f5920
lea edi, [ebp - 0x74]
rep movsd dword es:[edi], dword [esi]
push 0x40
xor edi, edi
lea ecx, [ebp - 0x4c]
push edi
push ecx
call fcn.004aefb0
mov ecx, dword [ebp + 8]
mov esi, dword [ecx - 0xc]
add esp, 0xc
cmp dword [ecx - 4], 1
mov dword [ebp - 0x54], edi
mov dword [ebp - 0x50], edi
jle 0x47f338
mov edx, esi
push edx
lea ecx, [ebp + 8]
call fcn.004251d9
mov ecx, dword [ebp + 8]
mov eax, esi
lea esi, [ebp - 0x74]
call fcn.0047ef80
mov eax, dword [ebp + 8]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.004b24ef
add esp, 8
cmp eax, edi
jl 0x47f3a0
mov ecx, dword [ebp + 8]
cmp eax, dword [ecx - 8]
jg 0x47f3a0
mov dword [ecx - 0xc], eax
mov ecx, dword [ebp + 8]
push ebx
mov byte [eax + ecx], 0
call fcn.0047f060
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
add esp, 4
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x47f390
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 8]
pop edi
xor ecx, ebp
pop esi
call fcn.004add11
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00421000
int3

Function at 0x47f3b0
Capabilities:
Parse pe header
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [ebp + 0x10]
xor ebx, ebx
mov eax, 0x400000
cmp edi, ebx
ja 0x47f3d6
jb 0x47f3ce
cmp dword [ebp + 0xc], eax
jae 0x47f3d6
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], edi
jmp 0x47f3d9
mov dword [ebp - 4], ebx
push eax
mov eax, dword [ebp + 8]
push ebx
push ebx
push 4
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov ecx, eax
cmp ecx, ebx
jne 0x47f3f7
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, 0x5a4d
cmp word [ecx], dx
jne 0x47f438
mov esi, dword [ecx + 0x3c]
mov eax, esi
cdq
cmp edx, edi
ja 0x47f438
jb 0x47f412
cmp eax, dword [ebp + 0xc]
jae 0x47f438
cmp dword [esi + ecx], 0x4550
jne 0x47f438
mov edx, dword [esi + ecx + 0x54]
add edx, dword [esi + ecx + 0x24]
mov eax, dword [ebp + 0x14]
add edx, dword [esi + ecx + 0x20]
add edx, dword [esi + ecx + 0x1c]
mov dword [eax + 4], ebx
mov dword [eax], edx
mov ebx, 1
push ecx
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x47f450
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ce6e0
mov eax, dword fs:[0]
push eax
push ecx
mov eax, dword [0x50ac94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
mov eax, dword [ebp + 8]
push eax
push str.PeContainer
call fcn.00465cd0
lea ecx, [ebp + 8]
push ecx
lea edx, [ebp - 0x10]
push str.PeContainer:
push edx
call fcn.00423863
push 0x4de144
mov byte [ebp - 4], 1
call fcn.004ae67a
add esp, 0x18
push eax
push 0x4de144
lea ecx, [ebp - 0x10]
call fcn.0042494b
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47f4e6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x47f50c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov esp, ebp
pop ebp
ret 4
Function at 0x47fd80
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [esi + 0x20]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov ecx, dword [esi + 4]
xor edi, edi
push ecx
mov dword [esi + 0x20], edi
mov dword [esi + 0x28], edi
mov dword [esi + 0x2c], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push edi
lea eax, [ebp - 4]
push eax
mov dword [ebp - 4], edx
mov edx, dword [esi]
push ecx
push edx
mov dword [esi + 4], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x47fdd3
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 8
mov eax, dword [esi]
push eax
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov eax, dword [esi]
lea ecx, [ebp + 0xc]
push ecx
push eax
mov dword [ebp + 0xc], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x47fdf7
or ecx, eax
or eax, eax
jmp 0x47fdfe
mov edx, dword [ebp + 0xc]
mov ecx, eax
mov eax, edx
push edi
mov edx, ecx
push edx
push eax
mov dword [esi + 0xc], eax
xor eax, eax
cmp dword [esi + 0x10], edi
mov dword [esi + 8], ecx
mov ecx, dword [esi]
setne al
lea eax, [eax + eax + 2]
push eax
push edi
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [esi + 4], eax
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret 8
Function at 0x480050
Capabilities:
Get file size
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [edi + 0x80]
push ebx
push esi
lea esi, [edi + 0x70]
mov dword [ebp - 4], eax
cmp dword [esi + 0xc], eax
jbe 0x48006e
call fcn.004ae7f1
mov ebx, dword [esi + 0xc]
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
cmp ebx, dword [esi + 0x10]
jbe 0x480080
call fcn.004ae7f1
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 0xc]
mov eax, dword [esi]
push ecx
push edx
push ebx
push eax
lea eax, [ebp - 0xc]
push eax
call fcn.004828a0
xor ebx, ebx
cmp dword [edi + 0x10], ebx
je 0x4800aa
mov ecx, dword [edi + 0x8c]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov eax, dword [edi]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x4800ba
push eax
call esi
mov edx, dword [edi + 0x10]
mov eax, dword [edi + 0x8c]
push ebx
push ebx
neg edx
push 3
sbb edx, edx
push ebx
and edx, 0x40000000
push 3
add edx, 0x80000000
push edx
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [edi]
cmp eax, 0xffffffff
je 0x480193
lea ecx, [ebp - 4]
push ecx
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x48010f
or eax, eax
or ecx, 0xffffffff
jmp 0x480112
mov ecx, dword [ebp - 4]
mov dword [edi + 8], eax
mov eax, dword [edi + 4]
mov dword [edi + 0xc], ecx
cmp eax, ebx
je 0x480129
push eax
call esi
mov dword [edi + 4], 0xffffffff
mov eax, dword [edi + 0x20]
cmp eax, ebx
je 0x48013a
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov dword [edi + 0x20], ebx
mov edx, dword [edi + 8]
push ebx
push edx
mov eax, edx
mov edx, dword [edi + 0xc]
mov cl, 0x20
call fcn.004c56b0
mov ecx, dword [edi]
push eax
xor eax, eax
cmp dword [edi + 0x10], ebx
setne al
lea eax, [eax + eax + 2]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi + 4], eax
cmp eax, ebx
jne 0x480175
mov eax, 9
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [edi + 0x68]
cmp dword [edi + 0x3c], ebx
je 0x48019e
mov edx, dword [edi + 0xc]
mov ecx, dword [edi + 8]
push esi
push edx
push ecx
push eax
call fcn.0047f3b0
add esp, 0x10
test eax, eax
jne 0x4801a3
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov edx, dword [edi + 0xc]
mov dword [edi + 0x18], ebx
mov dword [edi + 0x1c], ebx
mov dword [edi + 0x28], ebx
mov dword [edi + 0x2c], ebx
mov dword [edi + 0x30], ebx
mov dword [edi + 0x34], ebx
cmp edx, dword [esi + 4]
jb 0x4801e4
ja 0x4801c6
mov eax, dword [edi + 8]
cmp eax, dword [esi]
jbe 0x4801e4
mov ecx, edi
call fcn.004807f0
test eax, eax
jne 0x4801e4
cmp dword [edi + 0x10], ebx
je 0x4801e4
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
push edx
mov esi, edi
call fcn.0047fd80
pop esi
mov dword [edi + 0x38], ebx
mov dword [edi + 0x88], 1
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x482400
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0xc0000000
push eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x48245c
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, esi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x482450
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 7
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea ecx, [ebp - 4]
push ecx
push esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x482476
or eax, eax
or ecx, 0xffffffff
jmp 0x482479
mov ecx, dword [ebp - 4]
push ebx
push eax
push ecx
push 2
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov edi, eax
cmp edi, ebx
jne 0x482493
mov ebx, 8
jmp 0x48250b
lea edx, [ebp - 4]
push edx
push esi
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x4824ad
or eax, eax
or ecx, 0xffffffff
jmp 0x4824b0
mov ecx, dword [ebp - 4]
lea edx, [ebp - 0x10]
push edx
push ecx
push eax
push edi
call fcn.0047f3b0
add esp, 0x10
test eax, eax
je 0x4824ff
mov ebx, dword [ebp - 0x10]
mov eax, ebx
or eax, dword [ebp - 0xc]
je 0x4824ff
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0xc]
push 0
lea edx, [ebp - 8]
push edx
push ebx
push esi
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4824f4
mov ebx, 0xc
jmp 0x48250b
push esi
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
xor ebx, ebx
jmp 0x48250b
push edi
mov ebx, 8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x482531
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
pop edi
pop esi
mov eax, ebx
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x483430
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4cfc58
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push edi
mov eax, dword [0x50ac94]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
xor ebx, ebx
push ebx
push ebx
push 3
push ebx
push ebx
mov dword [ebp - 4], ebx
mov eax, dword [ebp + 8]
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
jne 0x48349c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp + 8]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
push edx
push str.OpenWrite__s_:_error_opening__LE_d
push ecx
call fcn.00468700
add esp, 0x10
jmp 0x4835ab
push ebx
lea ecx, [ebp - 0x10]
push ecx
push 8
lea edi, [esi + 0x14]
push edi
push eax
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x483588
cmp dword [ebp - 0x10], 8
jne 0x483588
mov edx, dword [edi]
push edx
call fcn.00483260
add esp, 4
push ecx
mov dword [esi + 0x10], eax
mov dword [ebp - 0x1c], esp
cmp eax, ebx
jne 0x483511
mov ecx, dword [ebp + 8]
mov eax, esp
push ecx
push str._OpenWrite__s_:_unknown_encoder_
push eax
call fcn.00468700
add esp, 0xc
call fcn.00483340
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jmp 0x4835ca
mov edx, dword [eax + 8]
mov eax, dword [ebp + 8]
mov ecx, esp
push edx
push eax
push str.OpenWrite__s_:__s_encoding
push ecx
call fcn.00468700
add esp, 0x10
call fcn.00483340
mov edx, dword [esi]
lea ecx, [ebp - 0x14]
push ecx
push edx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x14], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [ebp - 0x14]
mov dword [esi + 8], eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
mov dword [esi + 0xc], ecx
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x483570
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x10]
push ecx
mov ecx, esp
mov dword [ebp - 0x1c], esp
push eax
mov eax, dword [ebp + 8]
push edx
push eax
push str.OpenWrite__s_:_cant_read_header__Read_only__d_bytes__LE_d
push ecx
call fcn.00468700
add esp, 0x14
call fcn.00483340
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4835d6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 4