joyce8/EMBER2024-capa huggingface dataset:
Function at 0x9b3058
Capabilities:
Decompress data using aplib

Disassembly:
call fcn.009b31a8
push ebx
mov ebx, esp
push ebx
mov esi, dword [ebx + 8]
mov edi, dword [ebx + 0x10]
cld
mov dl, 0x80
mov al, byte [esi]
inc esi
mov byte [edi], al
inc edi
mov ebx, 2
add dl, dl
jne 0x9b307e
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9b306a
add dl, dl
jne 0x9b3089
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9b30dc
xor eax, eax
add dl, dl
jne 0x9b3096
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x9b317d
add dl, dl
jne 0x9b30a5
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9b30b0
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9b30bb
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9b30c6
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x9b30d2
push edi
mov eax, eax
sub edi, eax
mov al, byte [edi]
pop edi
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x9b3075
mov eax, 1
add dl, dl
jne 0x9b30ea
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x9b30f5
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9b30e1
sub eax, ebx
mov ebx, 1
jne 0x9b3128
mov ecx, 1
add dl, dl
jne 0x9b310e
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9b3119
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9b3105
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9b3075
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x9b313f
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x9b314a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x9b3136
cmp eax, 0x7d00
jae 0x9b316d
cmp eax, 0x500
jb 0x9b3168
inc ecx
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9b3075
cmp eax, 0x7f
ja 0x9b3170
add ecx, 2
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x9b3075
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x9b319e
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x9b3075
pop ebx
sub edi, dword [ebx + 0x10]
mov eax, edi
pop ebx
ret 0x10
Function at 0x4a14f4
Capabilities:
Create process on windows
Create process suspended

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov edi, ecx
mov esi, edx
mov ebx, eax
xor eax, eax
push ebp
push 0x4a15cd
push dword fs:[eax]
mov dword fs:[eax], esp
push 0x4a15e8
push ebx
push 0x4a15f8
push esi
lea eax, [ebp - 4]
mov edx, 4
call fcn.0040a768
lea eax, [ebp - 0x48]
xor ecx, ecx
mov edx, 0x44
call fcn.004077c0
mov dword [ebp - 0x48], 0x44
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x48]
push eax
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 4]
call fcn.0040a494
push eax
push 0
call sub.kernel32.dll_CreateProcessW
test eax, eax
jne 0x4a1576
mov ax, 0x83
call fcn.004a1118
mov eax, dword [ebp - 0x54]
push eax
call sub.kernel32.dll_CloseHandle
call fcn.004a14c8
push 0x1cff
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x58]
push eax
push 1
call sub.user32.dll_MsgWaitForMultipleObjects
cmp eax, 1
je 0x4a157f
call fcn.004a14c8
push edi
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_GetExitCodeProcess
mov eax, dword [ebp - 0x58]
push eax
call sub.kernel32.dll_CloseHandle
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a15d4
lea eax, [ebp - 4]
call fcn.00409a3c
pop eax
jmp eax

Function at 0x4a16e8
Capabilities:
Allocate or change rwx memory
Get system information on windows

Disassembly:
push ebx
push esi
push edi
push ebp
add esp, 0xffffffb4
mov dword [esp], eax
lea esi, [esp + 0x30]
lea eax, [esp + 0xc]
push eax
call sub.kernel32.dll_GetSystemInfo
mov edi, dword [esp]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4a17b1
jmp 0x4a17a5
cmp dword [esi + 0x10], 0x1000
jne 0x4a1793
test byte [esi + 0x15], 1
jne 0x4a1793
mov byte [esp + 4], 0
mov ebp, dword [esi + 0x14]
cmp ebp, 1
je 0x4a1744
cmp ebp, 2
je 0x4a1744
cmp ebp, 0x10
je 0x4a1744
cmp ebp, 0x20
jne 0x4a1760
lea eax, [esp + 8]
push eax
push 0x40
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
test eax, eax
je 0x4a1760
mov byte [esp + 4], 1
xor ebx, ebx
jmp 0x4a1771
mov eax, dword [esi]
add eax, ebx
call fcn.004a16e0
add ebx, dword [esp + 0x10]
cmp ebx, dword [esi + 0xc]
jb 0x4a1764
cmp byte [esp + 4], 0
je 0x4a1793
lea eax, [esp + 8]
push eax
mov eax, dword [esp + 0xc]
push eax
mov eax, dword [esi + 0xc]
push eax
mov eax, dword [esi]
push eax
call sub.kernel32.dll_VirtualProtect
mov edi, dword [esi]
add edi, dword [esi + 0xc]
push 0x1c
push esi
push edi
call sub.kernel32.dll_VirtualQuery
test eax, eax
je 0x4a17b1
mov eax, dword [esi + 4]
cmp eax, dword [esp]
je 0x4a1719
add esp, 0x4c
pop ebp
pop edi
pop esi
pop ebx
ret

Function at 0x42c005
Capabilities:
Packed with generic packer

Disassembly:
jmp fcn.0042a8d0
jmp section.42vab535
Function at 0x42e000
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
nop
nop
nop
nop
mov eax, section..text
nop
mov ebx, 0x407ef8
nop
mov ecx, 0x32597efe
nop
nop
nop
test eax, eax
nop
nop
nop
nop
je 0x42e04e
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
nop
inc eax
nop
nop
nop
nop
nop
cmp eax, ebx
nop
nop
nop
nop
nop
jne 0x42e024
mov eax, section..data
nop
nop
mov ebx, 0x42cd70
nop
mov ecx, 0xa5312a6
nop
nop
test eax, eax
nop
nop
nop
je 0x42e084
nop
nop
nop
nop
nop
nop
xor dword [eax], ecx
nop
nop
nop
add eax, 4
nop
nop
nop
nop
cmp eax, ebx
nop
jne 0x42e06c
nop
nop
nop
nop
nop
nop
nop
nop
popal
nop
jmp 0x401219
Function at 0x16081000
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x39c
mov eax, dword [0x16093054]
push esi
mov dword [esp + 0x39c], eax
push edi
lea eax, [esp + 0x210]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x1608103f
call edi
test eax, eax
je 0x160810a7
call edi
mov esi, eax
test esi, esi
jne 0x160810ac
push 0x16093044
call sub.WS2_32.dll_WSCUnInstallNameSpace
mov edx, dword [0x16093c58]
push 0x208
lea ecx, [esp + 0xc]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x16081072
call edi
test eax, eax
je 0x16081094
call edi
mov esi, eax
test esi, esi
jne 0x160810ac
mov ecx, dword [str.mdnsNSP]
push 0x16093044
push 1
push 0xc
lea eax, [esp + 0x14]
push eax
push ecx
call sub.WS2_32.dll_WSCInstallNameSpace
test eax, eax
jne 0x1608109b
xor esi, esi
jmp 0x160810ac
mov esi, 0xffffe5d4
jmp 0x160810ac
call edi
test eax, eax
je 0x160810a7
call edi
mov esi, eax
jmp 0x160810ac
mov esi, 0x2726
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x3a0]
pop edi
mov eax, esi
pop esi
call fcn.16083265
add esp, 0x39c
ret

Function at 0x160810d0
Capabilities:
Initialize winsock library

Disassembly:
sub esp, 0x194
mov eax, dword [0x16093054]
push esi
mov dword [esp + 0x194], eax
push edi
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
mov edi, dword [sym.imp.KERNEL32.dll_GetLastError]
je 0x1608110c
call edi
test eax, eax
je 0x1608112a
call edi
mov esi, eax
test esi, esi
jne 0x1608112f
push 0x16093044
call sub.WS2_32.dll_WSCUnInstallNameSpace
test eax, eax
jne 0x1608111e
xor esi, esi
jmp 0x1608112f
call edi
test eax, eax
je 0x1608112a
call edi
mov esi, eax
jmp 0x1608112f
mov esi, 0x2726
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov ecx, dword [esp + 0x198]
pop edi
mov eax, esi
pop esi
call fcn.16083265
add esp, 0x194
ret
Function at 0x160828a0
Capabilities:
Get common file path

Disassembly:
sub esp, 0x210
mov eax, dword [0x16093054]
push ebx
push ebp
mov ebp, dword [esp + 0x21c]
push esi
mov esi, dword [0x16093c68]
xor ebx, ebx
test esi, esi
mov dword [esp + 0x218], eax
push edi
jne 0x16082964
push 0x104
lea eax, [esp + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x11c]
push str._sdriversetchosts
push edx
call fcn.16084157
add esp, 0xc
lea eax, [esp + 0x118]
push eax
lea edi, [esp + 0x14]
call fcn.160824e0
test eax, eax
jne 0x16082977
mov esi, dword [esp + 0x10]
lea ecx, [esp + 0x10]
push ecx
mov ecx, esi
call fcn.16081a40
test eax, eax
jne 0x16082955
mov edi, dword [esp + 0x10]
call fcn.16081850
test eax, eax
je 0x1608293e
mov edx, dword [0x16093c68]
mov dword [edi + 0x10], edx
mov dword [0x16093c68], edi
jmp 0x16082945
mov eax, edi
call fcn.16081990
lea eax, [esp + 0x10]
push eax
mov ecx, esi
call fcn.16081a40
test eax, eax
je 0x16082920
call fcn.16081950
mov esi, dword [0x16093c68]
test esi, esi
je 0x16082977
push ebp
mov eax, esi
call fcn.160818b0
test eax, eax
jne 0x16082992
mov esi, dword [esi + 0x10]
test esi, esi
jne 0x16082964
mov eax, ebx
mov ecx, dword [esp + 0x21c]
pop edi
pop esi
pop ebp
pop ebx
call fcn.16083265
add esp, 0x210
ret 4
mov eax, 1
jmp 0x16082979
Function at 0x160841e0
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x160842d0
mov eax, 0x94
call fcn.16088840
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x16084345
mov ecx, dword [esi + 0x10]
mov dword [0x16093e68], ecx
mov eax, dword [esi + 4]
mov dword [0x16093e74], eax
mov edx, dword [esi + 8]
mov dword [0x16093e78], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x16093e6c], esi
je 0x1608424b
or esi, 0x8000
mov dword [0x16093e6c], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x16093e70], eax
call fcn.160846ba
test eax, eax
pop ecx
je 0x16084345
call fcn.1608716e
test eax, eax
jne 0x16084278
call fcn.1608470b
jmp 0x16084345
call fcn.160887b5
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x160954cc], eax
call fcn.16088693
mov dword [0x16093c88], eax
call fcn.16088174
test eax, eax
jl 0x160842c9
call fcn.160885f1
test eax, eax
jl 0x160842c4
call fcn.160883be
test eax, eax
jl 0x160842c4
push 0
call fcn.16088007
test eax, eax
pop ecx
jne 0x160842c4
inc dword [0x16093c84]
jmp 0x16084356
call fcn.16088372
call fcn.16086f4b
jmp 0x1608426e
test eax, eax
jne 0x16084300
cmp dword [0x16093c84], eax
jle 0x16084345
dec dword [0x16093c84]
cmp dword [0x16093ea4], eax
jne 0x160842ef
call fcn.16088156
call fcn.16088372
call fcn.16086f4b
call fcn.1608470b
jmp 0x16084356
cmp eax, 2
jne 0x16084349
push 0x8c
push 1
call fcn.1608402d
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x16084345
push esi
push dword [0x16093600]
call dword [0x16093e5c]
test eax, eax
push esi
je 0x1608433f
call fcn.16086f68
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x16084356
call fcn.16083273
pop ecx
xor eax, eax
jmp 0x16084359
cmp eax, 3
jne 0x16084356
push 0
call fcn.16087133
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc
Function at 0x16088071
Capabilities:
Terminate process

Disassembly:
push 8
push 0x16090860
call fcn.16084654
push 8
call fcn.160848fb
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x16093ea8], esi
jne 0x160880a5
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x16093ea4], esi
mov al, byte [ebp + 0x10]
mov byte [0x16093ea0], al
cmp dword [ebp + 0xc], edi
jne 0x160880ef
cmp dword [0x16094488], edi
je 0x160880df
mov eax, dword [0x16094484]
sub eax, 4
mov dword [0x16094484], eax
cmp eax, dword [0x16094488]
jb 0x160880df
mov eax, dword [eax]
cmp eax, edi
je 0x160880c0
call eax
jmp 0x160880c0
push 0x16093028
mov eax, 0x16093020
call fcn.16087fd1
pop ecx
push 0x16093030
mov eax, 0x1609302c
call fcn.16087fd1
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x16088120
cmp dword [ebp + 0x10], edi
jne 0x1608812e
mov dword [0x16093ea8], esi
push dword [ebp + 8]
call fcn.16087f8f
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x1608812d
push 8
call fcn.1608482e
pop ecx
ret
call fcn.1608468f
ret

Function at 0x16088a28
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x16093054]
mov ecx, dword [ebp + 0x94]
push ebx
push esi
mov dword [ebp + 0x88], eax
xor edx, edx
push edi
xor eax, eax
cmp ecx, dword [eax*8 + 0x16093838]
je 0x16088a5d
inc eax
cmp eax, 0x13
jb 0x16088a4e
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x16093838]
jne 0x16088b83
mov eax, dword [0x16093c90]
cmp eax, 1
je 0x16088b5b
cmp eax, edx
jne 0x16088a8d
cmp dword [0x16093c94], 1
je 0x16088b5b
cmp ecx, 0xfc
je 0x16088b83
push 0x104
lea eax, [ebp - 0x80]
push eax
push edx
mov byte [ebp + 0x84], dl
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x16088ac3
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.16088d00
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.16088f30
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x16088af7
mov eax, edi
push eax
call fcn.16088f30
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x16090364
push edi
call fcn.16088e00
add esp, 0x10
push edi
call fcn.16088f30
push dword [esi + 0x1609383c]
mov ebx, eax
call fcn.16088f30
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.16088840
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.16088d00
push edi
push ebx
call fcn.16088d10
push 0x16090360
push ebx
call fcn.16088d10
push dword [esi + 0x1609383c]
push ebx
call fcn.16088d10
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.16088c02
add esp, 0x2c
jmp 0x16088b83
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x1609383c]
push dword [esi]
call fcn.16088f30
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
lea esp, [ebp - 0x8c]
mov ecx, dword [ebp + 0x88]
call fcn.16083265
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x16088c02
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x16093fc0], ebx
push esi
push edi
jne 0x16088c82
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x16088cbd
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x16093fc0], eax
je 0x16088cbd
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x16093fc4], eax
call esi
cmp dword [0x16093e68], 2
mov dword [0x16093fc8], eax
jne 0x16088c82
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x16093fd0], eax
je 0x16088c82
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x16093fcc], eax
mov eax, dword [0x16093fcc]
test eax, eax
je 0x16088cc7
call eax
test eax, eax
je 0x16088cae
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x16093fd0]
test eax, eax
je 0x16088cae
test byte [ebp - 8], 1
jne 0x16088cc7
cmp dword [0x16093e74], 4
jb 0x16088cc1
or byte [ebp + 0x12], 0x20
jmp 0x16088ce6
xor eax, eax
jmp 0x16088cf6
or byte [ebp + 0x12], 4
jmp 0x16088ce6
mov eax, dword [0x16093fc4]
test eax, eax
je 0x16088ce6
call eax
mov ebx, eax
test ebx, ebx
je 0x16088ce6
mov eax, dword [0x16093fc8]
test eax, eax
je 0x16088ce6
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x16093fc0]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x16089497
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x16093054]
push edi
xor edi, edi
cmp dword [ebp + 0x3b0], edi
mov dword [ebp + 0x39c], eax
mov dword [ebp - 0x78], edi
mov dword [ebp - 0x7c], edi
jne 0x160894c8
xor eax, eax
jmp 0x16089651
mov eax, dword [ebp + 0x3a8]
push ebx
mov ebx, dword [ebp + 0x3a8]
and eax, 0x1f
sar ebx, 5
push esi
lea esi, [eax + eax*8]
lea ebx, [ebx*4 + 0x16094380]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x16089504
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.1608cdc7
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x160895df
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x1608961d
mov ecx, dword [ebp - 0x74]
sub ecx, dword [ebp + 0x3ac]
lea eax, [ebp - 0x68]
mov dword [ebp - 0x70], edi
cmp ecx, dword [ebp + 0x3b0]
jae 0x16089568
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x16089559
inc dword [ebp - 0x7c]
mov byte [eax], 0xd
inc eax
inc dword [ebp - 0x70]
mov byte [eax], dl
inc eax
inc dword [ebp - 0x70]
cmp dword [ebp - 0x70], 0x400
jl 0x16089539
mov edi, eax
lea eax, [ebp - 0x68]
sub edi, eax
push 0
lea eax, [ebp - 0x80]
push eax
push edi
lea eax, [ebp - 0x68]
push eax
mov eax, dword [ebx]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x160895a8
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x160895b1
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x1608952a
jmp 0x160895b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x1608964c
cmp dword [ebp - 0x6c], edi
je 0x1608961d
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x16089612
call fcn.16087428
mov dword [eax], 9
call fcn.16087431
mov dword [eax], esi
jmp 0x16089647
push edi
lea ecx, [ebp - 0x80]
push ecx
push dword [ebp + 0x3b0]
push dword [ebp + 0x3ac]
push dword [eax]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x16089607
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x160895b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x160895b3
push dword [ebp - 0x6c]
call fcn.1608743a
pop ecx
jmp 0x16089647
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x16089635
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x16089635
xor eax, eax
jmp 0x1608964f
call fcn.16087428
mov dword [eax], 0x1c
call fcn.16087431
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x1608964f
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.16083265
add ebp, 0x3a0
leave
ret
Function at 0x16089867
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
and dword [ebp - 8], 0
cmp dword [ebp + 0x10], 0
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov edx, ebx
je 0x16089a3b
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x16094380]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x16089a3b
test cl, 0x48
je 0x160898d2
cmp byte [eax + 5], 0xa
je 0x160898d2
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea edx, [ebx + 1]
mov dword [ebp - 8], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push edx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x16089924
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1608990c
call fcn.16087428
mov dword [eax], 9
call fcn.16087431
mov dword [eax], esi
jmp 0x1608991c
cmp eax, 0x6d
je 0x16089a3b
push eax
call fcn.1608743a
pop ecx
or eax, 0xffffffff
jmp 0x16089a3d
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x16089a36
test eax, eax
je 0x1608994b
cmp byte [ebx], 0xa
jne 0x1608994b
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x16089954
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 8]
add ecx, eax
cmp eax, ecx
mov dword [ebp + 0x10], eax
mov dword [ebp - 8], ecx
jae 0x16089a30
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x16089a20
cmp al, 0xd
je 0x16089986
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x16089a12
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x160899a0
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x1608999b
add dword [ebp + 0x10], 2
jmp 0x160899f4
mov dword [ebp + 0x10], eax
jmp 0x16089a0e
inc dword [ebp + 0x10]
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
mov eax, dword [edi]
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x160899c8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x16089a0e
cmp dword [ebp - 0xc], 0
je 0x16089a0e
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x160899e9
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x160899f4
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x16089a11
cmp ebx, dword [ebp + 0xc]
jne 0x160899f9
cmp byte [ebp - 1], 0xa
jne 0x160899f9
mov byte [ebx], 0xa
jmp 0x16089a11
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.1608ca61
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x16089a12
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x1608996a
jmp 0x16089a30
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x16089a30
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 8], ebx
mov eax, dword [ebp - 8]
jmp 0x16089a3d
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret