joyce8/EMBER2024-capa huggingface dataset:
Function at 0x5788e0
Capabilities:
Start service

Disassembly:
sub esp, 0x20
push edi
call fcn.00484370
test eax, eax
je 0x5788fe
mov dword [0x68cb50], 0x32
xor eax, eax
pop edi
add esp, 0x20
ret
mov eax, dword [esp + 0x28]
xor edi, edi
cmp eax, edi
jne 0x578919
mov dword [0x68cb50], 0x57
xor eax, eax
pop edi
add esp, 0x20
ret
push ebx
push ebp
mov ebp, dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
push esi
push 2
push edi
push edi
mov dword [0x68cb50], edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x20], edi
call ebp
mov esi, eax
cmp esi, edi
jne 0x578948
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
cmp esi, edi
mov ebx, dword [sym.imp.ADVAPI32.dll_OpenServiceA]
je 0x57896a
mov eax, dword [esp + 0x34]
push 0x10
push eax
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x5789a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
test edi, edi
je 0x5789df
jne 0x5789a8
test esi, esi
jne 0x57898e
push 2
push esi
push esi
call ebp
mov esi, eax
test esi, esi
jne 0x57898e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
mov dword [esp + 0x14], eax
je 0x5789a8
mov ecx, dword [esp + 0x34]
push 0x10
push ecx
push esi
call ebx
mov edi, eax
test edi, edi
jne 0x5789a8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp + 0x14], eax
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x38]
push edx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov ebp, eax
test ebp, ebp
jne 0x5789ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
mov dword [0x68cb50], eax
jne 0x5789e8
mov dword [esp + 0x10], 1
mov ebp, dword [esp + 0x10]
jmp 0x5789ff
mov eax, dword [0x68cb50]
mov ebp, dword [esp + 0x10]
test eax, eax
jne 0x5789ff
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x5789fa
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cb50], eax
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x578a0c
push edi
call ebx
test esi, esi
je 0x578a13
push esi
call ebx
mov eax, ebp
pop esi
pop ebp
pop ebx
pop edi
add esp, 0x20
ret
Function at 0x578c20
Capabilities:
Query service status

Disassembly:
sub esp, 0x20
call fcn.00484370
test eax, eax
je 0x578c3c
mov dword [0x68cb50], 0x32
xor eax, eax
add esp, 0x20
ret
push ebx
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 6
xor eax, eax
lea edi, [esp + 0x18]
mov dword [esp + 0x14], ebp
push 1
rep stosd dword es:[edi], eax
push ebp
push ebp
mov dword [0x68cb50], ebp
mov dword [esp + 0x1c], ebp
xor ebx, ebx
xor edi, edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
cmp esi, ebp
jne 0x578c7b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp esi, ebp
mov ebp, dword [esp + 0x34]
je 0x578c99
push 4
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x578cd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
test edi, edi
je 0x578cef
jne 0x578cd3
test esi, esi
jne 0x578cbd
push 1
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov esi, eax
test esi, esi
jne 0x578cbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
test esi, esi
je 0x578cd3
push 4
push ebp
push esi
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov edi, eax
test edi, edi
jne 0x578cd3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea eax, [esp + 0x14]
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov ebp, eax
test ebp, ebp
jne 0x578d0c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
jmp 0x578cf3
mov ebp, dword [esp + 0x10]
test ebx, ebx
je 0x578cff
mov dword [0x68cb50], ebx
jmp 0x578d16
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [0x68cb50], eax
jmp 0x578d16
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
mov ebx, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
je 0x578d23
push edi
call ebx
test esi, esi
je 0x578d2a
push esi
call ebx
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
add esp, 0x20
ret
Function at 0x5795f0
Capabilities:
Modify service

Disassembly:
push 0xffffffffffffffff
push 0x6056db
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x624
push esi
push edi
lea ecx, [esp + 0x10]
xor esi, esi
call fcn.005df311
mov eax, dword [esp + 0x65c]
mov dword [esp + 0x634], esi
test eax, eax
je 0x579634
push eax
lea ecx, [esp + 0x14]
call fcn.005df4ed
mov eax, dword [esp + 0x660]
test eax, eax
je 0x579649
push eax
lea ecx, [esp + 0x14]
call fcn.005df4ed
mov ecx, 0xff
xor eax, eax
lea edi, [esp + 0x22d]
mov byte [esp + 0x22c], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov eax, dword [esp + 0x18]
mov dword [esp + 8], 0x400
test eax, eax
jle 0x5796c8
lea eax, [esp + 8]
lea ecx, [esp + 0x22c]
push eax
push ecx
lea edx, [esp + 0x18]
push 0
push edx
call fcn.004a2650
add esp, 0x10
test eax, eax
jne 0x5796c1
lea ecx, [esp + 0x10]
mov dword [esp + 0x634], 0xffffffff
call fcn.005df344
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x624]
mov dword fs:[0], ecx
add esp, 0x630
ret
lea esi, [esp + 0x22c]
mov eax, dword [esp + 0x64c]
mov ecx, dword [esp + 0x668]
mov edx, dword [esp + 0x664]
push ebx
push ebp
push eax
mov eax, dword [esp + 0x664]
push ecx
mov ecx, dword [esp + 0x664]
push edx
mov edx, dword [esp + 0x65c]
push esi
mov esi, dword [esp + 0x654]
push 0
push eax
mov eax, dword [esp + 0x664]
push ecx
mov ecx, dword [esp + 0x664]
push edx
push eax
push ecx
push esi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfigA]
mov ebp, eax
test ebp, ebp
je 0x579781
mov ebx, dword [esp + 0x658]
test ebx, ebx
je 0x579781
test esi, esi
je 0x579781
call fcn.004483b0
mov eax, dword [0x68916c]
test eax, eax
je 0x579781
mov ecx, 0x81
xor eax, eax
lea edi, [esp + 0x2e]
mov word [esp + 0x2c], 0
rep stosd dword es:[edi], eax
push 0
lea edx, [esp + 0x30]
push 0x104
push edx
push 0xffffffffffffffff
push ebx
stosw word es:[edi], ax
call fcn.0049fc50
add esp, 0x14
lea ecx, [esp + 0x14]
lea eax, [esp + 0x2c]
push ecx
push 1
push esi
mov dword [esp + 0x20], eax
call dword [0x68916c]
lea ecx, [esp + 0x18]
mov dword [esp + 0x63c], 0xffffffff
call fcn.005df344
mov ecx, dword [esp + 0x634]
mov eax, ebp
pop ebp
pop ebx
pop edi
pop esi
mov dword fs:[0], ecx
add esp, 0x630
ret
Function at 0x579fd0
Capabilities:
Set registry value

Disassembly:
push edi
mov edi, dword [esp + 0x10]
cmp edi, 0xffffffff
je 0x579fed
cmp edi, 4
jbe 0x579fed
mov dword [0x68cb54], 0x57
xor eax, eax
pop edi
ret
mov eax, dword [esp + 0xc]
push ebx
push esi
mov esi, dword [esp + 0x10]
cmp eax, 0xffffffff
mov ebx, dword [esi]
je 0x57a00c
push eax
mov eax, dword [str.Type]
push eax
mov ecx, esi
call fcn.00477020
cmp edi, 0xffffffff
je 0x57a020
mov ecx, dword [str.Start]
push edi
push ecx
mov ecx, esi
call fcn.00477020
mov eax, dword [esp + 0x1c]
cmp eax, 0xffffffff
je 0x57a038
mov edx, dword [str.ErrorControl]
push eax
push edx
mov ecx, esi
call fcn.00477020
mov eax, dword [esp + 0x20]
test eax, eax
je 0x57a04e
push eax
mov eax, dword [0x67c81c]
push eax
mov ecx, esi
call fcn.004771d0
mov eax, dword [esp + 0x24]
test eax, eax
je 0x57a065
mov ecx, dword [0x67c820]
push eax
push ecx
mov ecx, esi
call fcn.004771d0
mov edx, dword [esp + 0x28]
test edx, edx
je 0x57a08b
mov edi, edx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push edx
mov edx, dword [str.ImagePath]
push 2
push eax
push edx
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov eax, dword [esp + 0x2c]
test eax, eax
je 0x57a0a1
push eax
mov eax, dword [str.Group]
push eax
mov ecx, esi
call fcn.004771d0
mov eax, dword [esp + 0x30]
test eax, eax
je 0x57a0b8
mov ecx, dword [str.DependOnGroup]
push eax
push ecx
mov ecx, esi
call fcn.00477660
mov eax, dword [esp + 0x34]
test eax, eax
je 0x57a0cf
mov edx, dword [str.DependOnService]
push eax
push edx
mov ecx, esi
call fcn.00477660
pop esi
pop ebx
mov eax, 1
pop edi
ret
Function at 0x57b070
Capabilities:
Persist via run registry key

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x605920
push eax
mov dword fs:[0], esp
sub esp, 8
push esi
mov esi, dword [esp + 0x1c]
test esi, esi
jne 0x57b0a3
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
cmp byte [esi], 0
jne 0x57b0ba
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
lea ecx, [esp + 4]
call fcn.00475dc0
mov eax, dword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
push 0x20019
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x10]
mov dword [esp + 0x20], 0
call fcn.00475ee0
test eax, eax
je 0x57b166
push 1
push esi
lea ecx, [esp + 0xc]
call fcn.004783e0
test eax, eax
jne 0x57b11b
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00475e60
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
push edi
mov edi, dword [esp + 0x28]
test edi, edi
je 0x57b14e
lea ecx, [esp + 0x28]
push esi
push ecx
lea ecx, [esp + 0x10]
call fcn.00476510
push eax
mov ecx, edi
mov byte [esp + 0x1c], 1
call fcn.005e1020
lea ecx, [esp + 0x28]
mov byte [esp + 0x18], 0
call fcn.005e0ee7
mov eax, dword [esp + 0x24]
pop edi
test eax, eax
je 0x57b22d
mov dword [eax], 0x10
jmp 0x57b22d
mov edx, dword [0x667cb8]
mov dword [esp + 0x1c], edx
mov eax, dword [str.SystemCurrentControlSetServicesVxD]
push esi
push eax
lea ecx, [esp + 0x24]
push 0x646284
push ecx
mov byte [esp + 0x24], 2
call fcn.005de7af
mov edx, dword [esp + 0x2c]
add esp, 0x10
lea ecx, [esp + 4]
push 0x20019
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00475ee0
test eax, eax
jne 0x57b1da
lea ecx, [esp + 0x1c]
mov byte [esp + 0x14], al
call fcn.005e0ee7
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00475e60
xor eax, eax
pop esi
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov esi, dword [esp + 0x24]
test esi, esi
je 0x57b211
mov eax, dword [str.StaticVxD]
lea ecx, [esp + 0x24]
push eax
push ecx
lea ecx, [esp + 0xc]
call fcn.00476510
push eax
mov ecx, esi
mov byte [esp + 0x18], 3
call fcn.005e1020
lea ecx, [esp + 0x24]
mov byte [esp + 0x14], 2
call fcn.005e0ee7
mov eax, dword [esp + 0x20]
test eax, eax
je 0x57b21f
mov dword [eax], 1
lea ecx, [esp + 0x1c]
mov byte [esp + 0x14], 0
call fcn.005e0ee7
lea ecx, [esp + 4]
mov dword [esp + 0x14], 0xffffffff
call fcn.00475e60
mov ecx, dword [esp + 0xc]
mov eax, 1
pop esi
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x57b260
Capabilities:
Persist via run registry key

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x605948
push eax
mov dword fs:[0], esp
sub esp, 8
push ebx
push esi
push edi
mov edi, dword [esp + 0x24]
xor ebx, ebx
cmp edi, ebx
je 0x57b36f
mov esi, dword [esp + 0x2c]
cmp esi, ebx
je 0x57b36f
cmp byte [edi], bl
je 0x57b36f
cmp byte [esi], bl
je 0x57b36f
lea ecx, [esp + 0xc]
call fcn.00475dc0
mov eax, dword [esp + 0x28]
mov dword [esp + 0x1c], ebx
cmp eax, 2
je 0x57b30d
cmp eax, 1
je 0x57b30d
mov eax, dword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
push 0x2001f
push eax
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x18]
call fcn.00475ee0
test eax, eax
jne 0x57b2fb
mov ecx, dword [str.SoftwareMicrosoftWindowsCurrentVersionRunServices]
push 0x2001f
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [esp + 0x18]
call fcn.00475f50
test eax, eax
je 0x57b35e
push esi
push edi
lea ecx, [esp + 0x14]
call fcn.004771d0
mov esi, eax
jmp 0x57b3f2
mov edx, dword [0x667cb8]
mov dword [esp + 0x24], edx
mov eax, dword [str.SystemCurrentControlSetServicesVxD]
push edi
push eax
lea ecx, [esp + 0x2c]
push 0x646284
push ecx
mov byte [esp + 0x2c], 1
call fcn.005de7af
mov edx, dword [esp + 0x34]
add esp, 0x10
lea ecx, [esp + 0xc]
push 0x2001f
push edx
push reloc.OLEAUT32.dll_SysReAllocString
call fcn.00475ee0
test eax, eax
jne 0x57b383
lea ecx, [esp + 0x24]
mov byte [esp + 0x1c], bl
call fcn.005e0ee7
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0xffffffff
call fcn.00475e60
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [esp + 8]
mov dword fs:[0], ecx
add esp, 0x14
ret
mov eax, dword [0x667cb8]
mov dword [esp + 0x2c], eax
push 0x5c
push esi
mov byte [esp + 0x24], 2
call fcn.0044c90e
add esp, 8
cmp eax, ebx
je 0x57b3ab
inc eax
lea ecx, [esp + 0x2c]
push eax
call fcn.005e1070
mov eax, dword [esp + 0x2c]
cmp dword [eax - 8], ebx
jne 0x57b3c4
lea ecx, [esp + 0x2c]
mov byte [esp + 0x1c], 1
call fcn.005e0ee7
jmp 0x57b351
mov ecx, dword [str.StaticVxD]
push eax
push ecx
lea ecx, [esp + 0x14]
call fcn.004771d0
lea ecx, [esp + 0x2c]
mov esi, eax
mov byte [esp + 0x1c], 1
call fcn.005e0ee7
lea ecx, [esp + 0x24]
mov byte [esp + 0x1c], bl
call fcn.005e0ee7
lea ecx, [esp + 0xc]
call fcn.00475f30
lea ecx, [esp + 0xc]
mov dword [esp + 0x1c], 0xffffffff
call fcn.00475e60
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebx
mov dword fs:[0], ecx
add esp, 0x14
ret
Function at 0x57dfd0
Capabilities:
Get file size

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
push 0
lea eax, [esp + 8]
push 0
push eax
push 0
push 0
push 0
push 0
push 0
push 0
push esi
push 0
mov dword [esp + 0x30], 0
call fcn.0057c5b0
add esp, 0x2c
test eax, eax
je 0x57e0b8
mov eax, dword [esp + 4]
cmp eax, 4
jne 0x57e044
mov ecx, dword [esp + 0x10]
push ecx
push esi
call fcn.005964b0
mov edx, dword [0x68d3e8]
mov ecx, dword [0x68d3ec]
add esp, 8
mov dword [0x68cba8], edx
mov edx, dword [0x68d3f0]
mov dword [0x68cbac], ecx
mov dword [0x68cbb0], edx
pop esi
pop ecx
ret
cmp eax, 3
jne 0x57e07e
mov eax, dword [esp + 0x10]
push eax
push esi
call fcn.00588830
mov ecx, dword [0x68cc58]
mov edx, dword [0x68cc5c]
add esp, 8
mov dword [0x68cba8], ecx
mov ecx, dword [0x68cc60]
mov dword [0x68cbac], edx
mov dword [0x68cbb0], ecx
pop esi
pop ecx
ret
mov edx, dword [esp + 0x10]
cmp eax, 6
push edx
push esi
jne 0x57e0be
call fcn.005a73f0
mov ecx, dword [0x68da00]
mov edx, dword [0x68da04]
add esp, 8
mov dword [0x68cba8], ecx
mov ecx, dword [0x68da08]
mov dword [0x68cbac], edx
mov dword [0x68cbb0], ecx
pop esi
pop ecx
ret
mov eax, dword [esp + 0x10]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
pop esi
pop ecx
ret
Function at 0x581020
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x10
push ebx
mov ebx, dword [esp + 0x18]
push esi
xor esi, esi
cmp ebx, esi
je 0x581178
cmp ebx, 0xffffffff
je 0x581178
cmp dword [0x68cbb8], esi
je 0x581178
mov ecx, dword [0x68cbc0]
cmp ecx, esi
je 0x581178
mov eax, dword [0x68cbbc]
cmp eax, esi
jge 0x581069
neg eax
cmp ecx, eax
ja 0x581178
push edi
push ecx
mov dword [esp + 0x10], esi
call fcn.005e15b8
mov edi, eax
add esp, 4
cmp edi, esi
mov dword [esp + 0x20], edi
je 0x58116d
mov ecx, dword [0x68cbc0]
xor eax, eax
mov edx, ecx
push ebp
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 1
and ecx, 3
mov dword [esp + 0x1c], esi
rep stosb byte es:[edi], al
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, dword [0x68cbc0]
mov esi, dword [0x68cbbc]
lea eax, [esp + 0x18]
push eax
push 0
push ebx
mov dword [esp + 0x24], 0
call edi
xor ecx, ecx
mov dword [esp + 0x1c], eax
test esi, esi
setl cl
dec ecx
and ecx, 0xfffffffe
add ecx, 2
push ecx
push 0
push esi
push ebx
call edi
cmp eax, 0xffffffff
je 0x58115f
mov eax, dword [esp + 0x28]
test eax, eax
je 0x5810f0
xor esi, esi
jmp 0x581106
mov eax, dword [esp + 0x24]
lea edx, [esp + 0x18]
push 0
push edx
push ebp
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x14]
push 0
push ecx
push edx
push ebx
call edi
test esi, esi
je 0x58115f
mov ebp, dword [0x68cb60]
xor edx, edx
test ebp, ebp
jle 0x58115f
mov ebx, dword [0x68cb5c]
mov eax, dword [ebx]
mov esi, dword [esp + 0x18]
mov ecx, dword [eax + 8]
cmp esi, ecx
jb 0x581145
mov edi, dword [eax + 4]
mov esi, dword [esp + 0x24]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
je 0x581157
inc edx
add ebx, 4
cmp edx, ebp
mov dword [esp + 0x10], 0
jge 0x58115f
jmp 0x58112b
mov dword [esp + 0x10], 1
mov ecx, dword [esp + 0x24]
push ecx
call fcn.005e15e1
add esp, 4
pop ebp
mov eax, dword [esp + 0xc]
pop edi
pop esi
pop ebx
add esp, 0x10
ret
pop esi
xor eax, eax
pop ebx
add esp, 0x10
ret
Function at 0x581180
Capabilities:
Read file on windows

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x28
test eax, eax
push ebp
push esi
push edi
je 0x58139d
cmp eax, 0xffffffff
je 0x58139d
mov eax, dword [0x68cbb8]
test eax, eax
je 0x58139d
mov ebp, dword [0x68cbc4]
test ebp, ebp
je 0x58139d
mov esi, dword [0x68cbc8]
test esi, esi
je 0x58139d
mov edi, dword [0x68cbcc]
test edi, edi
je 0x58139d
push ebx
push edi
xor ebx, ebx
mov dword [esp + 0x34], edi
call fcn.005e15b8
mov edx, eax
add esp, 4
test edx, edx
mov dword [esp + 0x1c], edx
je 0x581393
mov ecx, edi
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor edx, edx
and ecx, 3
cmp esi, 0x15
rep stosb byte es:[edi], al
mov ecx, esi
mov dword [esp + 0x28], edx
mov dword [esp + 0x10], edx
mov dword [esp + 0x14], 1
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ebp
jb 0x581386
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x24], eax
lea esi, [eax + 0x15]
cmp esi, ecx
mov dword [esp + 0x34], esi
ja 0x581384
test byte [ebp], 1
jne 0x581251
mov ecx, dword [esp + 0x14]
test ecx, ecx
je 0x581303
mov edi, dword [ebp + 8]
mov ecx, edi
sub ecx, edi
jne 0x581384
cmp dword [ebp + 0x10], 1
je 0x581266
neg edi
cmp dword [esp + 0x28], edi
jne 0x581276
cmp dword [esp + 0x10], eax
jae 0x581328
cmp eax, dword [esp + 0x30]
ja 0x581318
mov ebx, dword [esp + 0x3c]
lea edx, [esp + 0x20]
push 1
push edx
push 0
push ebx
mov dword [esp + 0x30], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebp, eax
xor esi, esi
xor eax, eax
test edi, edi
setl al
dec eax
and al, 0xfe
add eax, 2
push eax
push esi
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x5812ed
mov eax, dword [esp + 0x40]
test eax, eax
jne 0x5812de
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
lea ecx, [esp + 0x20]
push 0
push ecx
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x24]
cmp ecx, eax
mov edx, esi
je 0x58131c
xor edx, edx
mov ebp, dword [esp + 0x18]
xor ebx, ebx
mov eax, dword [ebp]
test al, 1
je 0x58134b
test ebx, ebx
mov dword [esp + 0x14], 1
jne 0x581386
jmp 0x581365
xor edx, edx
jmp 0x581301
test esi, esi
je 0x5812fd
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x28], edi
test edx, edx
je 0x581301
mov ecx, dword [ebp + 0xc]
mov eax, dword [esp + 0x10]
cmp eax, ecx
jb 0x581301
mov esi, dword [esp + 0x1c]
lea edi, [ebp + 0x14]
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x581301
mov ebx, 1
jmp 0x581303
test al, 2
je 0x581355
mov dword [esp + 0x14], ebx
jmp 0x581365
test al, 4
je 0x581365
test ebx, ebx
mov dword [esp + 0x14], 1
jne 0x581386
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x34]
sub ecx, eax
add ebp, eax
cmp ecx, 0x15
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x18], ebp
jae 0x581229
jmp 0x581386
xor ebx, ebx
mov ecx, dword [esp + 0x1c]
push ecx
call fcn.005e15e1
add esp, 4
mov eax, ebx
pop ebx
pop edi
pop esi
pop ebp
add esp, 0x28
ret
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x28
ret
Function at 0x582480
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3ec
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push ebp
push esi
xor ebp, ebp
push edi
mov dword [0x68cc58], ebp
call ebx
mov dword [0x68cc60], eax
mov ecx, 0xf7
xor eax, eax
lea edi, [esp + 0x1d]
mov byte [esp + 0x1c], 0
mov esi, dword [esp + 0x41c]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp esi, ebp
stosb byte es:[edi], al
je 0x5825bc
mov ecx, 0xf8
lea edi, [esp + 0x1c]
rep movsd dword es:[edi], dword [esi]
lea eax, [esp + 0x1c]
push eax
call fcn.00589550
mov esi, dword [esp + 0x408]
mov ebx, dword [esp + 0x414]
mov ebp, dword [esp + 0x410]
mov edi, dword [esp + 0x40c]
add esp, 4
mov dword [esp + 0x10], eax
test esi, esi
jne 0x582525
test edi, edi
jne 0x582525
test ebp, ebp
jne 0x582525
test ebx, ebx
jne 0x582525
mov ecx, dword [esp + 0x414]
test ecx, ecx
jne 0x582525
mov ecx, dword [esp + 0x418]
test ecx, ecx
je 0x5825b1
cmp eax, 3
jne 0x5825b1
mov ecx, dword [esp + 0x4c]
lea edx, [esp + 0x1c]
push ecx
push 0x30
push edx
call fcn.005a9ac0
add esp, 0xc
test eax, eax
je 0x5825ad
mov eax, dword [esp + 0x40]
test esi, esi
je 0x582555
mov ecx, eax
and ecx, 1
mov dword [esi], ecx
test edi, edi
je 0x582560
mov edx, eax
and edx, 2
mov dword [edi], edx
test ebp, ebp
je 0x58256c
mov ecx, eax
and ecx, 4
mov dword [ebp], ecx
test ebx, ebx
je 0x58258b
mov edx, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov dword [ebx], edx
mov edx, dword [esp + 0x34]
mov dword [ebx + 4], ecx
mov ecx, dword [esp + 0x38]
mov dword [ebx + 8], edx
mov dword [ebx + 0xc], ecx
mov ecx, dword [esp + 0x414]
test ecx, ecx
je 0x58259d
mov edx, eax
and edx, 8
mov dword [ecx], edx
mov ecx, dword [esp + 0x418]
test ecx, ecx
je 0x5825ad
and eax, 0x10
mov dword [ecx], eax
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x3ec
ret
mov esi, dword [esp + 0x400]
lea eax, [esp + 0x10]
push 1
push eax
mov dword [esp + 0x18], ebp
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call ebp
push 0
push 0
push 0
push esi
mov dword [esp + 0x28], eax
call ebp
cmp esi, 0xffffffff
je 0x58264d
lea ecx, [esp + 0x1c]
test ecx, ecx
je 0x58264d
push esi
call dword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x582668
mov ecx, 0xd
xor eax, eax
lea edi, [esp + 0x1c]
lea edx, [esp + 0x14]
rep stosd dword es:[edi], eax
xor edi, edi
lea eax, [esp + 0x1c]
push edi
push edx
push 0x34
push eax
push esi
mov dword [esp + 0x28], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x582646
mov dword [0x68cc58], 0xd
mov dword [0x68cc5c], 0x29f7
call ebx
mov dword [0x68cc60], eax
jmp 0x58266a
mov edi, 1
jmp 0x58266a
mov dword [0x68cc58], 1
mov dword [0x68cc5c], 0x29ea
call ebx
mov dword [0x68cc60], eax
xor edi, edi
mov edx, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push 0
push ecx
push edx
push esi
call ebp
test edi, edi
jne 0x5824ce
mov dword [0x68cc58], 0xf
mov dword [0x68cc5c], 0x1b63
call ebx
pop edi
pop esi
mov dword [0x68cc60], eax
pop ebp
xor eax, eax
pop ebx
add esp, 0x3ec
ret