joyce8/EMBER2024-capa huggingface dataset:
Function at 0x40314d
Capabilities:
Delete registry key
Query or enumerate registry key

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10c
lea eax, [ebp - 4]
push ebx
push edi
push eax
mov eax, dword [0x4480f0]
or eax, 8
push eax
xor edi, edi
push edi
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x4031df
mov ebx, 0x105
jmp 0x403198
cmp dword [ebp + 0x10], edi
jne 0x4031d3
push edi
lea eax, [ebp - 0x10c]
push eax
push dword [ebp - 4]
call fcn.0040314d
test eax, eax
jne 0x4031ae
push ebx
lea eax, [ebp - 0x10c]
push eax
push edi
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegEnumKeyA]
test eax, eax
je 0x40317f
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 3
call fcn.0040696f
test eax, eax
je 0x4031e5
push edi
push dword [0x4480f0]
push dword [ebp + 0xc]
push dword [ebp + 8]
call eax
jmp 0x4031df
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret 0xc
cmp dword [0x4480f0], edi
jne 0x4031dc
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyA]
test eax, eax
jne 0x4031dc
mov eax, edi
jmp 0x4031df

Function at 0x403419
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
mov ecx, dword [ebp + 8]
push edi
xor edi, edi
test ecx, ecx
js 0x403442
mov eax, dword [0x448058]
push edi
add eax, ecx
push edi
push eax
push dword [0x40a010]
mov dword [0x41410c], eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 4
call fcn.0040329a
test eax, eax
js 0x403521
push 4
lea eax, [ebp + 8]
push eax
push dword [0x40a010]
call fcn.004069d1
test eax, eax
jne 0x40346e
push 0xfffffffffffffffd
pop eax
jmp 0x403521
add dword [0x41410c], 4
push esi
push dword [ebp + 8]
call fcn.0040329a
mov esi, eax
test esi, esi
jns 0x403489
jmp 0x403520
push ebx
cmp dword [ebp + 0x10], edi
jne 0x4034ec
mov ecx, dword [ebp + 8]
test ecx, ecx
jle 0x40351d
mov ebx, 0x4000
mov edi, 0x41c1b0
cmp ecx, ebx
mov eax, ebx
cmovl eax, ecx
push eax
push edi
push dword [0x40a010]
mov dword [ebp - 4], eax
call fcn.004069d1
test eax, eax
je 0x40350f
push dword [ebp - 4]
push edi
push dword [ebp + 0xc]
call fcn.00406a78
test eax, eax
je 0x4034e8
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
add dword [0x41410c], eax
sub ecx, eax
add esi, eax
mov dword [ebp + 8], ecx
test ecx, ecx
jg 0x4034a4
jmp 0x40351d
push 0xfffffffffffffffe
jmp 0x403511
push edi
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x14]
cmp dword [ebp + 8], eax
cmovl eax, dword [ebp + 8]
push eax
push dword [ebp + 0x10]
push dword [0x40a010]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x403514
push 0xfffffffffffffffd
pop eax
jmp 0x40351f
mov esi, dword [ebp - 4]
add dword [0x41410c], esi
mov eax, esi
pop ebx
pop esi
pop edi
leave
ret 0x10
Function at 0x403544
Capabilities:
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
cmp dword [ebp + 8], 0
je 0x403569
mov eax, dword [0x414120]
test eax, eax
je 0x403560
push eax
call dword [sym.imp.USER32.dll_DestroyWindow]
and dword [0x414120], 0
leave
ret
cmp dword [0x414120], 0
je 0x40357b
push 0
call fcn.004061d8
leave
ret
call dword [sym.imp.KERNEL32.dll_GetTickCount]
cmp eax, dword [0x448060]
jbe 0x4035e5
cmp dword [0x443ff8], 0
je 0x4035c0
test byte [0x4480f4], 1
je 0x4035e5
call fcn.00403526
push eax
lea eax, [ebp - 0x40]
push str....__d__
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
lea eax, [ebp - 0x40]
push eax
push 0
call fcn.00405d76
leave
ret
push 0
push 0x4038a4
push 0
push 0x6f
push dword [0x443ff4]
call dword [sym.imp.USER32.dll_CreateDialogParamA]
push 5
push eax
mov dword [0x414120], eax
call dword [sym.imp.USER32.dll_ShowWindow]
leave
ret
Function at 0x405e5b
Capabilities:
Create directory

Disassembly:
push esi
xor esi, esi
push esi
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x405e75
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov eax, esi
pop esi
ret 4

Function at 0x405e7b
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
and dword [ebp - 0x14], 0
and dword [ebp - 4], 0
push 4
pop eax
mov word [ebp - 0x1e], ax
mov eax, 0x408c98
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x20]
mov dword [ebp - 8], eax
lea eax, [ebp - 0xc]
push eax
push dword [ebp + 8]
mov word [ebp - 0x20], 1
mov dword [ebp - 0x10], 0x408c88
mov dword [ebp - 0xc], 0xc
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x405ee9
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x405ef3
lea eax, [ebp - 0x20]
push eax
push 0x80000007
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_SetFileSecurityA]
test eax, eax
je 0x405eed
xor eax, eax
jmp 0x405ef3
call dword [sym.imp.KERNEL32.dll_GetLastError]
leave
ret 4
Function at 0x40616a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
lea eax, [ebp - 0x120]
push esi
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov ecx, eax
xor eax, eax
cmp ecx, esi
cmova ecx, eax
pop esi
test ecx, ecx
je 0x40619f
cmp byte [ebp + ecx - 0x121], 0x5c
jne 0x4061a2
xor eax, eax
inc eax
push dword [ebp + 8]
lea eax, [eax + 0x4086ac]
push eax
lea eax, [ebp - 0x120]
add eax, ecx
push str._s_s.dll
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
lea eax, [ebp - 0x120]
push 8
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
leave
ret 4

Function at 0x406206
Capabilities:
Move file

Disassembly:
push 5
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
test eax, eax
jne 0x406229
push dword [esp + 8]
push dword [esp + 8]
call fcn.00406238
pop ecx
pop ecx
inc dword [0x4480d0]
ret 8

Function at 0x406238
Capabilities:
Get file size

Disassembly:
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_lstrcpyA]
push esi
push edi
push 0x408ed4
push 0x43ea38
call ebp
mov esi, dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, 0x400
test esi, esi
je 0x40628b
push 1
push 0
push esi
call fcn.004069a4
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
push 0x43ea38
push esi
call edi
test eax, eax
je 0x406378
cmp eax, ebx
jg 0x406378
push ebx
mov esi, 0x43e638
push esi
push dword [esp + 0x1c]
call edi
test eax, eax
je 0x406378
cmp eax, ebx
jg 0x406378
push esi
push 0x43ea38
push str._s_s_r_n
push 0x43e238
call dword [sym.imp.USER32.dll_wsprintfA]
mov ecx, dword [0x44800c]
add esp, 0x10
push dword [ecx + 0x128]
mov esi, eax
mov edi, 0x43e638
push edi
mov dword [esp + 0x20], esi
call fcn.00405ef7
push 4
push 0xc0000000
push edi
call fcn.004069a4
mov ebx, eax
cmp ebx, 0xffffffff
je 0x406378
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
lea ecx, [esi + 0xa]
add ecx, edi
push ecx
push 0x40
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x406371
push edi
push esi
push ebx
call fcn.004069d1
test eax, eax
je 0x406371
push str._Rename__r_n
push esi
call fcn.00406b99
test eax, eax
jne 0x40637d
push str._Rename__r_n
lea eax, [esi + edi]
push eax
call ebp
add edi, 0xa
mov ecx, edi
mov ebp, dword [esp + 0x18]
push ebp
push 0x43e238
lea eax, [ecx + esi]
push eax
call fcn.004066cd
xor eax, eax
push eax
push eax
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
lea eax, [edi + ebp]
push eax
push esi
push ebx
call fcn.00406a78
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x408ee0
add eax, 0xa
push eax
call fcn.00406b99
mov ecx, eax
test ecx, ecx
je 0x40633e
lea edx, [esi + edi]
mov ebp, dword [esp + 0x18]
add ebp, edx
cmp edx, ecx
jbe 0x4063aa
sub ebp, edx
mov al, byte [edx]
mov byte [edx + ebp], al
dec edx
cmp edx, ecx
ja 0x4063a0
sub ecx, esi
inc ecx
jmp 0x406340
Function at 0x4064df
Capabilities:
Delete directory
Delete file
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push dword [ebp + 8]
call fcn.00406bec
mov edi, eax
cmp edi, 0xffffffff
je 0x406522
test byte [ebp + 0xc], 1
push dword [ebp + 8]
je 0x40650a
call dword [sym.imp.KERNEL32.dll_RemoveDirectoryA]
test eax, eax
je 0x406512
xor eax, eax
inc eax
jmp 0x406524
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x406501
test byte [ebp + 0xc], 4
jne 0x406522
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
xor eax, eax
pop edi
pop ebp
ret 8

Function at 0x40658d
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebx
push esi
push dword [esp + 0xc]
mov ebx, 0x43c238
push ebx
call fcn.00406b7d
push ebx
call fcn.00406c14
mov esi, eax
test esi, esi
jne 0x4065ae
xor eax, eax
jmp 0x406601
push esi
call fcn.00406d0e
test byte [0x448008], 0x80
je 0x4065c7
mov al, byte [esi]
test al, al
je 0x4065aa
cmp al, 0x5c
je 0x4065aa
sub esi, ebx
jmp 0x4065df
call fcn.00406529
test eax, eax
je 0x4065d9
test byte [eax], 0x10
je 0x4065aa
push ebx
call fcn.00406ce3
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push ebx
cmp eax, esi
jg 0x4065cb
call fcn.004064b2
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
xor ecx, ecx
cmp eax, 0xffffffff
setne cl
mov eax, ecx
pop esi
pop ebx
ret 4

Function at 0x4066ed
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
lea eax, [ebp - 0x10]
push eax
push 0x43a1f0
xor eax, eax
push eax
push eax
push 0x4000000
push eax
push eax
push eax
push dword [ebp + 8]
mov dword [0x43a1f0], 0x44
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
test eax, eax
je 0x40672c
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x10]
leave
ret 4
Function at 0x4069a4
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
push 0
xor ecx, ecx
cmp eax, 0xffffffff
cmove eax, ecx
push eax
push dword [esp + 0x14]
push ecx
push 1
push dword [esp + 0x1c]
push dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
ret 0xc

Function at 0x406a00
Capabilities:
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
mov esi, dword [ebp + 0x14]
lea eax, [ebp - 4]
push eax
mov eax, dword [ebp + 0x18]
xor ebx, ebx
neg eax
sbb eax, eax
and eax, 0x100
or eax, 0x20019
push eax
push ebx
push dword [ebp + 0xc]
mov byte [esi], bl
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x406a72
lea eax, [ebp + 0x18]
push eax
push esi
lea eax, [ebp + 0x14]
push eax
push ebx
push dword [ebp + 0x10]
mov dword [ebp + 0x18], 0x2000
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x406a61
cmp dword [ebp + 0x14], 1
je 0x406a63
cmp dword [ebp + 0x14], 2
je 0x406a63
mov byte [esi], bl
push dword [ebp - 4]
mov byte [esi + 0x1fff], bl
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop esi
pop ebx
leave
ret 0x14

Function at 0x406ac3
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, dword [ebp + 8]
push edi
push 0x64
pop edi
dec edi
mov dword [ebp + 8], 0x61736e
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push 0x1a
pop ecx
xor edx, edx
div ecx
push esi
push 0
lea eax, [ebp + 8]
push eax
push dword [ebp + 0xc]
add byte [ebp + 0xa], dl
call dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
test eax, eax
jne 0x406b03
test edi, edi
jne 0x406ace
mov byte [esi], 0
jmp 0x406b05
mov eax, esi
pop edi
pop esi
pop ebp
ret 8

Function at 0x406bec
Capabilities:
Check if file exists
Get file attributes
Set file attributes

Disassembly:
push esi
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov esi, eax
cmp esi, 0xffffffff
je 0x406c0e
mov ecx, esi
and ecx, 0xfffffffe
push ecx
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov eax, esi
pop esi
ret 4

Function at 0x406dd4
Capabilities:
Encode data using xor
Hash data with crc32

Disassembly:
cmp dword [0x43ef7c], 0
push esi
jne 0x406e0c
xor ecx, ecx
push 8
mov edx, ecx
pop esi
mov eax, edx
and al, 1
movzx eax, al
neg eax
sbb eax, eax
and eax, 0xedb88320
shr edx, 1
xor edx, eax
dec esi
jne 0x406de5
mov dword [ecx*4 + 0x43ef78], edx
inc ecx
cmp ecx, 0x100
jl 0x406de0
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 8]
not ecx
test edx, edx
je 0x406e36
mov esi, dword [esp + 0xc]
movzx eax, byte [esi]
xor eax, ecx
and eax, 0xff
shr ecx, 8
xor ecx, dword [eax*4 + 0x43ef78]
inc esi
dec edx
jne 0x406e1e
not ecx
mov eax, ecx
pop esi
ret 0xc
Function at 0x411670
Capabilities:
Reference sql statements

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push 0x401c26
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x38
push ebx
push esi
push edi
mov dword [ebp - 0xc], esp
mov dword [ebp - 8], 0x401bd0
lea eax, [ebp - 0x1c]
xor edi, edi
push eax
push 0xff
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x30], edi
mov dword [ebp - 0x40], edi
call dword [sym.imp.MSVBVM60.DLL___vbaFixstrConstruct]
mov edx, dword [ebp - 0x1c]
push edi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVBVM60.DLL___vbaStrCopy]
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcLeftCharBstr]
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaStrMove]
mov edx, eax
lea ecx, [ebp - 0x30]
call esi
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x1c]
push ecx
push edx
push edi
call dword [sym.imp.MSVBVM60.DLL___vbaLsetFixstr]
mov edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x20]
mov dword [ebp - 0x30], edi
call esi
lea ecx, [ebp - 0x2c]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
mov eax, dword [ebp - 0x20]
push 0x406c64
push edi
push 0xffffffffffffffff
push 1
push 0x406cc8
push 0x406cc0
push eax
call dword [sym.imp.MSVBVM60.DLL_rtcReplace]
mov edx, eax
lea ecx, [ebp - 0x2c]
call esi
mov edi, dword [sym.imp.MSVBVM60.DLL___vbaStrCat]
push eax
call edi
mov edx, eax
lea ecx, [ebp - 0x30]
call esi
push eax
push 0x406cc0
call edi
mov edx, eax
lea ecx, [ebp - 0x18]
call esi
lea ecx, [ebp - 0x30]
lea edx, [ebp - 0x2c]
push ecx
push edx
push 2
call dword [sym.imp.MSVBVM60.DLL___vbaFreeStrList]
add esp, 0xc
lea eax, [ebp - 0x18]
lea ecx, [ebp - 0x40]
push eax
push ecx
call fcn.0040b190
lea edx, [ebp - 0x40]
push edx
call dword [sym.imp.MSVBVM60.DLL___vbaStrVarMove]
mov edx, eax
lea ecx, [ebp - 0x28]
call esi
lea ecx, [ebp - 0x40]
call dword [sym.imp.MSVBVM60.DLL___vbaFreeVar]
push 0x4117c7
jmp 0x4117b1
mov esi, dword [sym.imp.MSVBVM60.DLL___vbaFreeStr]
lea ecx, [ebp - 0x18]
call esi
lea ecx, [ebp - 0x1c]
call esi
lea ecx, [ebp - 0x20]
call esi
ret
Function at 0x100046c0
Capabilities:
Access peb ldr_data
Get process heap flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1002fb20
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x10040054]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
push 8
mov dword [edi], vtable.std::basic_streambuf_char__struct_std::char_traits_char__.0
call fcn.1000ec5f
mov esi, eax
push 1
mov dword [ebp - 4], 0
call fcn.1000de04
mov dword [esi + 4], eax
lea ebx, [edi + 4]
mov eax, dword [ebp - 0x10]
lea edx, [edi + 8]
mov dword [ebp - 0x14], ebx
lea ecx, [eax + 0x18]
mov ebx, dword [ebp - 0x10]
add esp, 8
mov dword [ebp - 0x18], edx
mov edx, dword [ebp - 0x10]
mov dword [edi + 0x34], esi
add edi, 0x14
mov dword [ebx], vtable.std::basic_filebuf_char__struct_std::char_traits_char__.0
lea esi, [eax + 0x24]
mov byte [ebx + 0x48], 0
add eax, 0x28
mov byte [ebx + 0x3d], 0
mov ebx, dword [ebp - 0x14]
mov dword [edx + 0xc], ebx
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x18]
mov dword [ebx + 0x30], eax
mov dword [ebx + 0x10], edx
mov dword [ebx + 0x20], ecx
mov dword [ebx + 0x1c], edi
mov dword [ebx + 0x2c], esi
mov ebx, dword [ebp - 0x14]
mov dword [edx], 0
mov edx, dword [ebp - 0x10]
mov dword [ecx], 0
mov ecx, dword [0x10041f98]
mov dword [eax], 0
mov eax, dword [0x10041f94]
mov dword [ebx], 0
mov dword [edi], 0
mov dword [esi], 0
mov dword [edx + 0x40], eax
mov eax, edx
mov dword [edx + 0x4c], 0
mov dword [edx + 0x44], ecx
mov dword [edx + 0x38], 0
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 0x10020d4f
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
pop ebp
jmp fcn.10020bc0

Function at 0x10021131
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10035000
push 0x10034ff8
push str.FlsAlloc
push 0x1e
call fcn.10020ffb
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10021165
push dword [ebp + 8]
mov ecx, esi
call dword [0x10031174]
call esi
jmp 0x1002116b
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x100211af
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x10035010
push 0x10035008
push str.FlsGetValue
push 0x20
call fcn.10020ffb
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100211e6
push dword [ebp + 8]
mov ecx, esi
call dword [0x10031174]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]
Function at 0x10021921
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.1000fd30
mov eax, dword [0x10040054]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
push dword [ebp + 8]
mov dword [ebp - 0x100c], eax
call fcn.1001e6d7
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x10021963
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10021abf
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1002e770
push dword [ebp - 0x100c]
mov ecx, ebx
mov dword [ebp - 0x1008], eax
mov esi, ebx
mov dword [ebp - 0x1018], edx
and ecx, 0x3f
sar esi, 6
imul edi, ecx, 0x38
push 0
mov eax, dword [esi*4 + 0x10041b50]
push dword [edi + eax + 0x24]
push dword [edi + eax + 0x20]
push ebx
call fcn.10023249
mov ecx, dword [esi*4 + 0x10041b50]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [edi + ecx + 0x20]
jne 0x10021ab8
cmp eax, dword [edi + ecx + 0x24]
jne 0x10021ab8
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [edi + ecx + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10021ab8
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.10023249
add esp, 0x14
test edx, edx
jl 0x10021ab8
jg 0x10021a2e
test eax, eax
jb 0x10021ab8
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10021ab8
jl 0x10021a48
cmp dword [ebp - 0x1008], eax
ja 0x10021ab8
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x10021a66
test ebx, ebx
je 0x10021a9f
cmp ecx, edi
jae 0x10021a9f
mov al, byte [ecx]
cmp al, 0xd
jne 0x10021a80
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10021a8c
cmp byte [ecx + 1], 0xa
jne 0x10021a8c
inc ecx
jmp 0x10021a8c
movzx eax, al
movsx eax, byte [eax + 0x10040470]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x10021a66
cmp edx, ebx
jne 0x10021a66
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10021abd
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.1000ec51
leave
ret
Function at 0x10022701
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
sar ecx, 6
push esi
push edi
imul edi, eax, 0x38
mov eax, dword [ecx*4 + 0x10041b50]
mov dword [ebp - 0x10], ecx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10022741
cmp byte [ebx], 0xa
jne 0x10022741
or byte [eax + edi + 0x28], 4
jmp 0x10022746
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x10022844
mov al, byte [edx]
cmp al, 0x1a
je 0x10022826
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x10022775
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x1002279a
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x100227a4
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add edx, eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov ecx, dword [ebp - 0xc]
inc esi
cmp edx, ecx
jb 0x10022757
jmp 0x10022844
push 0
lea eax, [ebp - 0xc]
push eax
push 1
lea eax, [ebp - 1]
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10022821
cmp dword [ebp - 0xc], 0
je 0x10022821
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x10041b50]
test byte [eax + edi + 0x28], 0x48
je 0x100227fb
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x100227e6
mov byte [esi], dl
jmp 0x100227f7
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x10041b50]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10022844
cmp byte [ebp - 1], 0xa
jne 0x1002280a
cmp esi, ebx
jne 0x1002280a
mov byte [esi], 0xa
jmp 0x10022843
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10023267
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10022844
mov byte [esi], 0xd
jmp 0x10022843
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x10041b50]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10022840
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10022844
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret