joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4679e0
Capabilities:
Get session user name

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5e71
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4e5c64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 8]
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x18], edi
call fcn.0048f565
xor ecx, ecx
cmp eax, edi
setne cl
cmp ecx, edi
jne 0x467a2d
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
mov ecx, 0x4c4fbc
mov dword [ebp - 4], 1
test ecx, 0xffff0000
jne 0x467b2c
mov edx, ecx
movzx ebx, dx
push ebx
call fcn.00497482
mov edi, eax
test edi, edi
je 0x467b46
mov eax, ebx
shr eax, 4
inc eax
movzx ecx, ax
push 6
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x467b46
push ebx
push eax
push edi
call fcn.00421708
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x467b46
mov eax, dword [esi]
movzx edi, word [ebx]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, edi
or eax, ecx
jge 0x467ab9
push edi
mov ecx, esi
call fcn.00421527
movzx eax, word [ebx]
mov edx, dword [esi]
add ebx, 2
mov dword [ebp - 0x10], edx
cmp eax, 0xffffffff
jne 0x467ad3
push ebx
call fcn.0049db0a
add esp, 4
inc eax
add eax, eax
push eax
lea ecx, [edi + edi]
push ebx
push ecx
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.0049d600
add esp, 0x10
cmp eax, 0x50
ja case.0x467af6.1
movzx edx, byte [eax + 0x467bdc]
jmp dword [edx*4 + 0x467bcc]
call fcn.0048facd
call fcn.0048fb05
test edi, edi
jl 0x467b22
mov eax, dword [esi]
cmp edi, dword [eax - 8]
jg 0x467b22
mov edx, dword [ebp - 0x14]
mov dword [eax - 0xc], edi
mov eax, dword [esi]
xor ecx, ecx
mov word [edx + eax], cx
jmp 0x467b46
push 0x80070057
call fcn.00421000
push 0x4c4fbc
call fcn.0049db0a
add esp, 4
push eax
push 0x4c4fbc
mov ecx, esi
call fcn.00423f19
mov dword [ebp - 4], 0
mov eax, dword [esi]
sub eax, 0x10
mov ecx, 1
mov dword [ebp - 0x1c], 0x104
mov dword [ebp - 0x18], ecx
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, 0x104
or eax, ecx
jge 0x467b7c
push 0x104
mov ecx, esi
call fcn.00421527
mov eax, dword [esi]
lea ecx, [ebp - 0x1c]
push ecx
push eax
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
mov eax, dword [esi]
mov ecx, dword [eax - 8]
test eax, eax
je 0x467ba0
push ecx
push eax
call fcn.0049daeb
add esp, 8
test eax, eax
jl 0x467b22
mov ecx, dword [esi]
cmp eax, dword [ecx - 8]
jg 0x467b22
mov dword [ecx - 0xc], eax
mov edx, dword [esi]
xor ecx, ecx
mov word [edx + eax*2], cx
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 0x4681b0
Capabilities:
Enumerate gui resources

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b5e30
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x4e5c64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
call fcn.0048f565
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x4681f9
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 0x468262
mov edx, dword [ebp + 8]
lea eax, [edx - 0x10]
lea esi, [ecx - 0x10]
cmp eax, esi
je 0x4682be
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x46825b
mov ecx, dword [eax]
cmp ecx, dword [esi]
jne 0x46825b
push eax
call fcn.00423f8a
add esp, 4
mov ebx, eax
or edx, 0xffffffff
lock xadd dword [edi], edx
dec edx
test edx, edx
jg 0x468253
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 0x4682be
mov eax, dword [edx - 0xc]
push eax
push edx
jmp 0x4682b6
lea edi, [ebp + 8]
call fcn.0044c160
mov ecx, dword [eax]
mov esi, dword [ebp - 0x18]
lea eax, [ecx - 0x10]
add esi, 0xfffffff0
cmp eax, esi
je 0x4682be
cmp dword [esi + 0xc], 0
lea edi, [esi + 0xc]
jl 0x4682b1
mov edx, dword [eax]
cmp edx, dword [esi]
jne 0x4682b1
push eax
call fcn.00423f8a
mov ebx, eax
add esp, 4
or eax, 0xffffffff
lock xadd dword [edi], eax
dec eax
test eax, eax
jg 0x4682a9
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 0x4682be
mov eax, dword [ecx - 0xc]
push eax
push ecx
lea ecx, [ebp - 0x18]
call fcn.00423f19
mov ecx, dword [ebp + 0xc]
lea edx, [ebp - 0x18]
push edx
push 0x467fc0
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 0x468300
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 0x468326
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 0x46a280
Capabilities:
Check for time delay via gettickcount
Enumerate services
Query service status
Stop service

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4da300
push 0x4a2960
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
push ebx
push esi
push edi
mov eax, dword [0x4e5c64]
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 0x46a460
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xea
jne 0x46a33a
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 0x46a33a
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 0x46a34e
push 0xfffffffffffffffe
lea eax, [ebp - 0x10]
push eax
push 0x4e5c64
call fcn.004aa3d0
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 0x46a454
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 0x46a3ac
push 0xfffffffffffffffe
lea ecx, [ebp - 0x10]
push ecx
push 0x4e5c64
call fcn.004aa3d0
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 0x46a327
cmp dword [ebp - 0x54], edi
je 0x46a428
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 0x46a385
cmp dword [ebp - 0x54], edi
je 0x46a428
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x2c]
cmp eax, dword [ebp - 0x30]
jbe 0x46a3c8
push 0xfffffffffffffffe
lea edx, [ebp - 0x10]
push edx
push 0x4e5c64
call fcn.004aa3d0
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.0046a44c
add ebx, edi
mov dword [ebp - 0x24], ebx
mov esi, dword [ebp - 0x28]
jmp 0x46a353
mov dword [ebp - 4], 0xfffffffe
call fcn.0046a47a
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 0x46a5e0
Capabilities:
Delete registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b8578
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x4e5c64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
push ecx
mov esi, esp
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x1c], esi
call fcn.0048f565
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x46a630
push 0x80004005
call fcn.00421000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [esi], eax
mov ecx, str.MatrixFileIpc.SaveToDisk__:_Saving_tree_and_empty_reg_DataIntegrity_value
mov dword [ebp - 4], 0
test ecx, 0xffff0000
jne 0x46a78e
mov edx, ecx
movzx edi, dx
push edi
call fcn.00497482
mov ebx, eax
test ebx, ebx
je 0x46a723
mov eax, edi
shr eax, 4
inc eax
movzx ecx, ax
push 6
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
test eax, eax
je 0x46a723
push edi
push eax
push ebx
call fcn.00421708
mov edi, eax
add esp, 0xc
test edi, edi
je 0x46a723
mov eax, dword [esi]
movzx ebx, word [edi]
sub eax, 0x10
mov ecx, 1
sub ecx, dword [eax + 0xc]
mov eax, dword [eax + 8]
sub eax, ebx
or eax, ecx
jge 0x46a6bc
push ebx
mov ecx, esi
call fcn.00421527
movzx eax, word [edi]
mov edx, dword [esi]
add edi, 2
mov dword [ebp - 0x14], edx
cmp eax, 0xffffffff
jne 0x46a6d6
push edi
call fcn.0049db0a
add esp, 4
inc eax
add eax, eax
push eax
lea ecx, [ebx + ebx]
push edi
push ecx
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.0049d600
add esp, 0x10
cmp eax, 0x50
ja case.0x46a6f9.1
movzx edx, byte [eax + 0x46a7c0]
jmp dword [edx*4 + 0x46a7b0]
call fcn.0048facd
call fcn.0048fb05
test ebx, ebx
jl 0x46a784
mov eax, dword [esi]
cmp ebx, dword [eax - 8]
jg 0x46a784
mov edx, dword [ebp - 0x18]
mov dword [eax - 0xc], ebx
mov eax, dword [esi]
xor ecx, ecx
mov word [edx + eax], cx
mov edi, dword [ebp - 0x10]
mov dword [ebp - 4], 0xffffffff
call fcn.0046a490
add esp, 4
mov esi, edi
call fcn.0048d740
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax + 0x10]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [edi + 0x1c]
mov edx, dword [eax]
push edx
call fcn.0047fae0
mov eax, dword [edi + 0x1c]
mov ecx, dword [eax + 0x10]
push ecx
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
mov edx, dword [edi + 0x14]
push str.DataIntegrity
push edx
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
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
push str.MatrixFileIpc.SaveToDisk__:_Saving_tree_and_empty_reg_DataIntegrity_value
call fcn.0049db0a
add esp, 4
push eax
push str.MatrixFileIpc.SaveToDisk__:_Saving_tree_and_empty_reg_DataIntegrity_value
mov ecx, esi
call fcn.00423f19
jmp 0x46a726
Function at 0x4746e0
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
test ecx, ecx
jne 0x4746e7
xor eax, eax
ret
push esi
not eax
cmp edx, 8
jb 0x4747c4
mov esi, edx
shr esi, 3
push edi
lea esp, [esp]
movzx edi, byte [ecx]
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
xor edi, eax
and edi, 0xff
inc ecx
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
xor edi, eax
inc ecx
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
movzx edi, byte [ecx + 1]
inc ecx
xor edi, eax
and edi, 0xff
shr eax, 8
xor eax, dword [edi*4 + 0x4d4c58]
inc ecx
sub edx, 8
sub esi, 1
jne 0x474700
pop edi
test edx, edx
je 0x4747eb
jmp 0x4747d0
movzx esi, byte [ecx]
xor esi, eax
and esi, 0xff
shr eax, 8
xor eax, dword [esi*4 + 0x4d4c58]
inc ecx
sub edx, 1
jne 0x4747d0
not eax
pop esi
ret

Function at 0x4747f0
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov eax, dword [edx]
movsx ecx, cl
xor ecx, eax
shr eax, 8
and ecx, 0xff
mov ecx, dword [ecx*4 + 0x4d4c58]
xor ecx, eax
movzx eax, cl
add eax, dword [edx + 4]
mov dword [edx], ecx
mov ecx, dword [edx + 8]
imul eax, eax, 0x8088405
inc eax
mov dword [edx + 4], eax
shr eax, 0x18
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x4d4c58]
mov dword [edx + 8], ecx
ret

Function at 0x474840
Capabilities:
Generate random numbers using the delphi lcg
Hash data with crc32

Disassembly:
mov ecx, dword [esi + 8]
push ebx
mov edx, ecx
and edx, 0xfffd
or edx, 2
mov ebx, edx
xor ebx, 1
imul ebx, edx
mov edx, dword [esi]
shr ebx, 8
push edi
xor al, bl
movsx edi, al
xor edi, edx
shr edx, 8
and edi, 0xff
mov ebx, dword [edi*4 + 0x4d4c58]
xor ebx, edx
movzx edx, bl
add edx, dword [esi + 4]
mov dword [esi], ebx
imul edx, edx, 0x8088405
inc edx
mov dword [esi + 4], edx
shr edx, 0x18
xor edx, ecx
and edx, 0xff
shr ecx, 8
xor ecx, dword [edx*4 + 0x4d4c58]
pop edi
mov dword [esi + 8], ecx
pop ebx
ret
Function at 0x475200
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push edi
mov edi, ebx
imul edi, dword [ebp + 0x10]
cmp byte [esi], 0
je 0x47523d
mov ecx, dword [ebp + 8]
mov edx, dword [esi + 4]
push 0
lea eax, [ebp + 0xc]
push eax
push edi
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x475231
mov byte [esi + 8], 1
mov eax, dword [ebp + 0xc]
xor edx, edx
div ebx
pop edi
pop ebx
pop ecx
pop ebp
ret
mov edx, dword [esi + 0x28]
mov ebx, dword [esi + 0x2c]
xor eax, eax
mov ecx, edi
add ecx, edx
adc eax, ebx
cmp eax, dword [esi + 0x24]
jb 0x47525c
ja 0x475257
cmp ecx, dword [esi + 0x20]
jbe 0x47525c
mov edi, dword [esi + 0x20]
sub edi, edx
cmp dword [esi + 0x34], 0
mov eax, dword [ebp + 8]
je 0x4752a4
push eax
mov eax, dword [esi + 0x3c]
push 0
push edi
push ebx
push edx
push ecx
sub eax, 0x10
mov dword [ebp + 0x10], esp
mov ebx, esp
push eax
call fcn.00423f8a
add eax, 0x10
mov dword [ebx], eax
mov ecx, dword [esi + 0x38]
add esp, 4
push ecx
mov ecx, dword [esi + 0x34]
call fcn.00479210
add dword [esi + 0x28], edi
mov eax, edi
adc dword [esi + 0x2c], 0
xor edx, edx
div dword [ebp + 0xc]
pop edi
pop ebx
pop ecx
pop ebp
ret
mov edx, dword [esi + 0x30]
add edx, dword [esi + 0x28]
push edi
push edx
push eax
call fcn.0049dd90
add esp, 0xc
add dword [esi + 0x28], edi
mov eax, edi
pop edi
adc dword [esi + 0x2c], 0
xor edx, edx
div dword [ebp + 0xc]
pop ebx
pop ecx
pop ebp
ret
Function at 0x476480
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b90b8
mov eax, dword fs:[0]
push eax
sub esp, 8
push esi
push edi
mov eax, dword [0x4e5c64]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 4], 0
cmp dword [ebx], 0
jne 0x4765fa
cmp dword [ebx + 4], 0xffffffff
jne 0x4765fa
lea edi, [ebx + 0x203c]
push edi
push 0x1000
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov eax, edi
lea edx, [eax + 2]
jmp 0x4764e0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x4764e0
sub eax, edx
sar eax, 1
movzx eax, word [ebx + eax*2 + 0x203a]
cmp ax, 0x5c
je 0x476519
cmp ax, 0x2f
je 0x476519
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x476506
mov eax, dword [0x4c2ec8]
mov dword [edi], eax
mov eax, dword [ebp + 0xc]
push ecx
add eax, 0xfffffff0
mov dword [ebp - 0x10], esp
mov esi, esp
push eax
call fcn.00423f8a
mov ecx, dword [ebp + 8]
add esp, 4
push ecx
lea edx, [ebp + 8]
add eax, 0x10
push edx
mov dword [esi], eax
call fcn.00474f10
add esp, 0xc
test eax, eax
jne 0x476583
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 0x47656d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
call fcn.004756a0
or edx, 0xffffffff
mov dword [ebx], eax
mov dword [ebp - 4], 0xffffffff
test eax, eax
mov eax, dword [ebp + 0xc]
jne 0x4765cc
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4765b4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x200
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4765e5
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 esi
mov esp, ebp
pop ebp
ret 8
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 0x476620
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, 0x1000000
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
Function at 0x476da0
Capabilities:
Check if file exists
Create directory
Get file attributes

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4004
call fcn.004a3070
mov eax, dword [0x4e5c64]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
test esi, esi
je 0x476dd8
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x476dd8
push 0
push esi
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
movzx eax, word [ebx]
test ax, ax
je 0x476ec4
mov ecx, ebx
mov edx, ebx
movzx eax, ax
jmp 0x476df0
cmp ax, 0x2f
je 0x476dfc
cmp ax, 0x5c
jne 0x476dfe
mov ecx, edx
movzx eax, word [edx + 2]
add edx, 2
test ax, ax
jne 0x476df0
push edi
cmp ecx, ebx
je 0x476e3f
sub ecx, ebx
sar ecx, 1
add ecx, ecx
mov edi, ecx
push edi
lea eax, [ebp - 0x4004]
push ebx
push eax
call fcn.0049dd90
lea edx, [ebp - 0x4004]
push edx
xor ecx, ecx
push esi
mov word [ebp + edi - 0x4004], cx
call fcn.00476da0
add esp, 0x14
xor eax, eax
mov word [ebp - 0x2004], ax
test esi, esi
je 0x476e65
lea edx, [ebp - 0x2004]
mov eax, esi
sub edx, esi
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x476e56
mov eax, ebx
mov edx, ebx
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x476e70
lea edi, [ebp - 0x2004]
sub eax, edx
add edi, 0xfffffffe
mov cx, word [edi + 2]
add edi, 2
test cx, cx
jne 0x476e86
mov ecx, eax
shr ecx, 2
mov esi, edx
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0x2004]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
pop edi
cmp eax, 0xffffffff
jne 0x476ec4
push 0
lea edx, [ebp - 0x2004]
push edx
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
mov ecx, dword [ebp - 4]
pop esi
xor ecx, ebp
pop ebx
call fcn.0049d211
mov esp, ebp
pop ebp
ret
Function at 0x4777b0
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 0x4777d6
jb 0x4777ce
cmp dword [ebp + 0xc], eax
jae 0x4777d6
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], edi
jmp 0x4777d9
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 0x4777f7
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, 0x5a4d
cmp word [ecx], dx
jne 0x477838
mov esi, dword [ecx + 0x3c]
mov eax, esi
cdq
cmp edx, edi
ja 0x477838
jb 0x477812
cmp eax, dword [ebp + 0xc]
jae 0x477838
cmp dword [esi + ecx], 0x4550
jne 0x477838
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 0x477b50
Capabilities:
Get file size
Set file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [edi + 0x84]
cmp dword [edi + 0x80], ebx
push esi
lea esi, [edi + 0x74]
jbe 0x477b6e
call fcn.0049dc81
mov ecx, dword [esi + 0xc]
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
mov dword [ebp - 8], ecx
cmp ecx, dword [esi + 0x10]
jbe 0x477b86
call fcn.0049dc81
mov ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x10]
mov eax, dword [esi]
push ebx
push edx
push ecx
push eax
lea eax, [ebp - 0x10]
push eax
call fcn.00479f80
xor ebx, ebx
cmp dword [edi + 0x18], ebx
je 0x477ba9
mov ecx, dword [edi]
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
mov edx, dword [edi + 0x18]
mov eax, dword [edi]
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 + 4], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov eax, dword [edi + 4]
cmp eax, 0xffffffff
je 0x477c50
lea ecx, [ebp - 8]
push ecx
push eax
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
jne 0x477bf7
or ecx, eax
or eax, eax
jmp 0x477bfb
mov ecx, eax
xor eax, eax
push ebx
mov edx, ecx
push edx
push eax
mov dword [edi + 0x14], eax
xor eax, eax
cmp dword [edi + 0x18], ebx
mov dword [edi + 0x10], ecx
mov ecx, dword [edi + 4]
setne al
lea eax, [eax + eax + 2]
push eax
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
mov dword [edi + 8], eax
cmp eax, ebx
jne 0x477c32
mov eax, 9
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea esi, [edi + 0x20]
cmp dword [ebp + 8], ebx
je 0x477c5d
mov edx, dword [edi + 0x14]
mov ecx, dword [edi + 0x10]
push esi
push edx
push ecx
push eax
call fcn.004777b0
add esp, 0x10
test eax, eax
jne 0x477c62
mov eax, 1
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esi], ebx
mov dword [esi + 4], ebx
mov edx, dword [edi + 0x14]
cmp edx, dword [esi + 4]
jb 0x477c91
ja 0x477c73
mov eax, dword [edi + 0x10]
cmp eax, dword [esi]
jbe 0x477c91
mov ecx, edi
call fcn.004782c0
test eax, eax
jne 0x477c91
cmp dword [edi + 0x18], ebx
je 0x477c91
mov ecx, dword [esi + 4]
mov edx, dword [esi]
push ecx
push edx
mov esi, edi
call fcn.00477aa0
pop esi
mov dword [edi + 0x8c], 1
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4