joyce8/EMBER2024-capa huggingface dataset:
Function at 0x423140
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov esi, eax
push ebx
sub esp, 0x3c
mov eax, dword [0x57d6a0]
test eax, eax
jle 0x423250
mov edx, dword [0x57d6a4]
xor ebx, ebx
mov ecx, dword [edx + 0xc]
cmp ecx, esi
ja 0x423171
mov edi, dword [edx + 0x10]
add ecx, dword [edi + 8]
cmp esi, ecx
jb 0x4231ea
add ebx, 1
add edx, 0x14
cmp ebx, eax
jne 0x423160
mov dword [esp], esi
call fcn.00486d30
test eax, eax
mov edi, eax
je 0x423277
lea esi, [ebx + ebx*4]
mov ebx, dword [0x57d6a4]
shl esi, 2
add ebx, esi
mov dword [ebx + 0x10], eax
mov dword [ebx], 0
call fcn.00486e20
add eax, dword [edi + 0xc]
mov dword [ebx + 0xc], eax
lea eax, [ebp - 0x34]
mov dword [esp + 4], eax
mov eax, dword [0x57d6a4]
mov dword [esp + 8], 0x1c
mov eax, dword [eax + esi + 0xc]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
sub esp, 0xc
test eax, eax
je 0x423257
mov eax, dword [ebp - 0x20]
cmp eax, 0x40
jne 0x4231f2
add dword [0x57d6a0], 1
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp eax, 4
je 0x4231e3
cmp eax, 0x80
je 0x4231e3
cmp eax, 8
je 0x4231e3
mov eax, dword [ebp - 0x34]
mov edx, dword [ebp - 0x28]
add esi, dword [0x57d6a4]
mov dword [esi + 4], eax
mov dword [esi + 8], edx
mov dword [esp + 0xc], esi
mov dword [esp + 8], 0x40
mov dword [esp + 4], edx
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
sub esp, 0x10
test eax, eax
jne 0x4231e3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [esp], str.__VirtualProtect_failed_with_code_0x_x
mov dword [esp + 4], eax
call fcn.004230e0
nop
lea esi, [esi]
xor ebx, ebx
jmp 0x42317b
mov eax, dword [0x57d6a4]
mov eax, dword [eax + esi + 0xc]
mov dword [esp + 8], eax
mov eax, dword [edi + 8]
mov dword [esp], str.__VirtualQuery_failed_for__d_bytes_at_address__p
mov dword [esp + 4], eax
call fcn.004230e0
mov dword [esp + 4], esi
mov dword [esp], str.Address__p_has_no_image_section
call fcn.004230e0
mov esi, esi
lea edi, [edi]
Function at 0x429a60
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.api_ms_win_crt_runtime_l1_1_0.dll__errno
test ebx, ebx
mov dword [eax], 0
je 0x429c0e
cmp byte [ebx], 0
je 0x429bd8
mov dword [esp], ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
sub esp, 4
cmp eax, 0xffffffff
je 0x429bf0
test al, 0x10
je 0x429bd8
lea edi, [ebp - 0x11c]
mov dword [esp + 4], ebx
mov ebx, edi
mov dword [esp + 8], 0x104
mov dword [esp], edi
call sub.api_ms_win_crt_filesystem_l1_1_0.dll__fullpath
mov edx, dword [ebx]
add ebx, 4
lea eax, [edx - 0x1010101]
not edx
and eax, edx
and eax, 0x80808080
je 0x429ac4
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.api_ms_win_crt_heap_l1_1_0.dll_malloc
test eax, eax
mov esi, eax
je 0x429bff
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.api_ms_win_crt_private_l1_1_0.dll_memcpy
mov edx, dword [ebp - 0x12c]
cmp byte [esi + 0x22c], 0
je 0x429b53
movzx eax, byte [esi + ebx + 0x22b]
cmp al, 0x2f
je 0x429b53
cmp al, 0x5c
je 0x429b53
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 0x429b55
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.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0x14
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 2
xor eax, eax
jmp 0x429bd0
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0xc
xor eax, eax
jmp 0x429bd0
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov dword [eax], 0xe
xor eax, eax
jmp 0x429bd0
Function at 0x486c50
Capabilities:
Enumerate pe sections

Disassembly:
push esi
push ebx
mov edx, dword [esp + 0xc]
mov ebx, dword [esp + 0x10]
add edx, dword [edx + 0x3c]
movzx esi, word [edx + 6]
movzx eax, word [edx + 0x14]
test esi, esi
lea eax, [edx + eax + 0x18]
je 0x486c88
xor edx, edx
nop
mov ecx, dword [eax + 0xc]
cmp ecx, ebx
ja 0x486c7e
add ecx, dword [eax + 8]
cmp ebx, ecx
jb 0x486c8a
add edx, 1
add eax, 0x28
cmp edx, esi
jb 0x486c70
xor eax, eax
pop ebx
pop esi
ret
Function at 0x490b90
Capabilities:
Read file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 8
mov ebp, dword [esp + 0x1c]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
cmp eax, 0x1f
jne 0x490cd2
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
cmp eax, 0x8b
jne 0x490cd2
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
mov esi, eax
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
xor ebx, ebx
cmp esi, 8
jne 0x490cd4
cmp eax, 0xffffffff
je 0x490cd4
push ebp
mov ebx, eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
test bl, 4
je 0x490c63
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
mov edi, eax
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
mov esi, eax
shl esi, 8
or esi, edi
add esi, 1
nop word cs:[eax + eax]
nop
add esi, 0xffffffff
je 0x490c63
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
cmp eax, 0xffffffff
jne 0x490c50
test bl, 8
je 0x490c81
nop dword [eax + eax]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
add eax, 0xffffffff
cmp eax, 0xfffffffe
jb 0x490c70
test bl, 0x10
je 0x490ca1
nop word cs:[eax + eax]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
add eax, 0xffffffff
cmp eax, 0xfffffffe
jb 0x490c90
test bl, 2
je 0x490cb8
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_getc
add esp, 4
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_feof
add esp, 4
test eax, eax
jne 0x490cd2
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ferror
add esp, 4
test eax, eax
je 0x490cde
xor ebx, ebx
mov eax, ebx
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, dword [esp + 0x28]
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
add esp, 4
mov esi, eax
mov dword [esp + 4], 0
mov dword [esp], 0
push 2
push 0xfffffffffffffff8
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_ftell
add esp, 4
sub eax, esi
mov dword [edi], eax
mov eax, esp
push ebp
push 8
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, 8
sete bl
jne 0x490cd4
mov edi, dword [esp + 0x20]
push 0
push esi
push ebp
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
mov dword [edi], 8
mov eax, dword [esp]
mov ecx, dword [esp + 0x2c]
mov dword [ecx], eax
mov eax, dword [esp + 4]
mov ecx, dword [esp + 0x24]
mov dword [ecx], eax
jmp 0x490cd4
Function at 0x4953e0
Capabilities:
Get system information on windows
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov esi, ecx
mov al, byte [ebp + 0x1c]
mov ebx, dword [ebp + 0xc]
cmp dword [0x57d0f8], 0xffffffff
jne 0x495429
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0x30], 0
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [esp + 0x2c]
mov dword [0x57d0f8], eax
mov al, byte [ebp + 0x1c]
xor al, 1
movzx eax, al
lea edi, [eax + eax]
add edi, 2
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
mov dword [esi + 0x20], eax
push 0
push 0
push 0
push edi
push 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov dword [esi + 0x24], eax
test eax, eax
je 0x4954ce
mov ebx, eax
mov edi, dword [ebp + 0x10]
mov eax, dword [0x57d0f8]
mov ecx, eax
sar ecx, 0x1f
push ecx
push eax
push dword [ebp + 0x14]
push edi
call fcn.004bde60
add esp, 0x10
mov ecx, eax
sar ecx, 0x1f
sub edi, eax
mov edx, dword [ebp + 0x14]
sbb edx, ecx
mov dword [esp + 8], edx
cmp byte [ebp + 0x1c], 0
mov edx, 4
mov ecx, 0xf001f
cmovne ecx, edx
mov dword [esp + 0xc], eax
mov edx, dword [ebp + 0x18]
add eax, edx
mov dword [esp + 4], eax
push eax
push edi
push 0
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
mov dword [esi + 4], eax
test eax, eax
je 0x4954f2
mov ebx, eax
mov edi, dword [esp + 4]
mov eax, dword [ebp + 8]
test eax, eax
je 0x49552a
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll__strdup
add esp, 4
jmp 0x49552c
mov esi, dword [esi + 0x20]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push esi
push str.CreateFileMapping__p___lx__failed_with_error__lu_n
push str.filemap
push 6
call fcn.00420f20
add esp, 0x18
xor eax, eax
jmp 0x49554c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [esp + 8]
push dword [esp + 0x10]
push edi
push str.MapViewOfFile__lld___zu__failed_with_error__lu_n
push str.filemap
push 6
call fcn.00420f20
add esp, 0x1c
push dword [esi + 0x24]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [esi + 0x24], 0
xor eax, eax
jmp 0x49554c
xor eax, eax
mov dword [esi], eax
mov dword [esi + 8], edi
mov eax, dword [ebp + 0x10]
mov dword [esi + 0x10], eax
mov eax, dword [ebp + 0x14]
mov dword [esi + 0x14], eax
add ebx, dword [esp + 0xc]
mov dword [esi + 0x18], ebx
mov eax, dword [ebp + 0x18]
mov dword [esi + 0x1c], eax
mov al, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret 0x18
Function at 0x4982a0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x240
mov esi, dword [ebp + 0xc]
lea eax, [ebp + 8]
test byte [esi], 1
jne 0x4982c1
mov word [esi], 0
jmp 0x4982ce
mov ecx, dword [esi + 8]
mov byte [ecx], 0
mov dword [esi + 4], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x20], xmm0
movaps xmmword [esp + 0x10], xmm0
movaps xmmword [esp], xmm0
mov edi, dword [eax]
mov eax, esp
push eax
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll__fstat32i64]
add esp, 8
cmp eax, 0xffffffff
je 0x49830b
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x1c]
cmp eax, 1
sbb ecx, 0
jl 0x49830b
mov ecx, esi
push eax
call fcn.004801e0
lea ebx, [esp + 0x3c]
jmp 0x49832b
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
cmp dword [eax], 4
jne 0x498353
push 0x200
push ebx
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll__read
add esp, 0xc
cmp eax, 0xffffffff
je 0x498320
test eax, eax
jle 0x49834e
mov ecx, esi
push eax
push ebx
call fcn.00480460
jmp 0x49832b
sete al
jmp 0x498355
xor eax, eax
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret

Function at 0x498630
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x30
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0x14]
mov dword [esp], eax
mov eax, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
mov dword [esp + 0xc], ecx
mov esi, eax
test eax, eax
jne 0x498685
jmp 0x4986f9
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
call edi
mov dword [eax], 5
call edi
cmp dword [eax], 4
jne 0x4986f9
mov dword [esp + 8], 0
xorps xmm0, xmm0
movaps xmmword [esp + 0x10], xmm0
mov dword [esp + 0x20], 0
mov eax, dword [esp]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 4]
mov dword [esp + 0x1c], eax
push dword [esp + 0xc]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll__get_osfhandle]
add esp, 4
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0xc]
push ecx
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x498670
mov ecx, dword [esp + 8]
cmp ecx, 0xffffffff
mov edi, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__errno]
je 0x49867e
add ebx, ecx
mov eax, esi
sub eax, ecx
mov edx, ecx
sar edx, 0x1f
add dword [esp], ecx
adc dword [esp + 4], edx
test ecx, ecx
jg 0x498656
test esi, esi
sete al
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x4a3653
Capabilities:
Contain obfuscated stackstrings
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push edi
push ebx
add esp, 0xffffff80
cmp dword [ebp + 8], 0
jne 0x4a3666
jmp 0x4a379a
mov eax, dword [ebp + 8]
mov dword [esp], eax
call fcn.004d6588
cmp eax, 1
jne 0x4a3792
mov dword [ebp - 0x77], 0x6f727245
mov dword [ebp - 0x73], 0x6c632072
mov dword [ebp - 0x6f], 0x696e6165
mov dword [ebp - 0x6b], 0x7520676e
mov dword [ebp - 0x67], 0x70732070
mov dword [ebp - 0x63], 0x6b5f6e69
mov dword [ebp - 0x5f], 0x20737965
mov dword [ebp - 0x5b], 0x20726f66
mov dword [ebp - 0x57], 0x65726874
mov dword [ebp - 0x53], 0x206461
lea edx, [ebp - 0x4f]
mov ebx, 0x43
mov eax, 0
mov ecx, edx
and ecx, 1
test ecx, ecx
je 0x4a36de
mov byte [edx], al
add edx, 1
sub ebx, 1
mov ecx, edx
and ecx, 2
test ecx, ecx
je 0x4a36f0
mov word [edx], ax
add edx, 2
sub ebx, 2
mov ecx, ebx
shr ecx, 2
mov edi, edx
rep stosd dword es:[edi], eax
mov edx, edi
mov ecx, ebx
and ecx, 2
test ecx, ecx
je 0x4a370a
mov word [edx], ax
add edx, 2
and ebx, 1
mov ecx, ebx
test ecx, ecx
je 0x4a3718
mov byte [edx], al
add edx, 1
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call eax
mov dword [esp + 8], 0xa
lea edx, [ebp - 0x77]
add edx, 0x27
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.api_ms_win_crt_convert_l1_1_0.dll__ultoa]
call eax
mov dword [ebp - 0xc], 0x27
jmp 0x4a3748
add dword [ebp - 0xc], 1
lea edx, [ebp - 0x77]
mov eax, dword [ebp - 0xc]
add eax, edx
movzx eax, byte [eax]
test al, al
je 0x4a375f
mov eax, dword [ebp - 0xc]
cmp eax, 0x69
jbe 0x4a3744
mov eax, dword [ebp - 0xc]
cmp eax, 0x69
ja 0x4a377d
lea edx, [ebp - 0x77]
mov eax, dword [ebp - 0xc]
add eax, edx
mov byte [eax], 0xa
mov eax, dword [ebp - 0xc]
add eax, 1
mov byte [ebp + eax - 0x77], 0
lea eax, [ebp - 0x77]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
call eax
sub esp, 4
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
mov dword [eax], edx
lea esp, [ebp - 8]
pop ebx
pop edi
pop ebp
ret
Function at 0x4a4726
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov dword [ebp - 0x1c], 0xffffffff
mov dword [esp + 4], 0x4a459b
mov dword [esp], 0x57e364
call fcn.004a3ced
mov eax, dword [0x57d128]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call eax
sub esp, 4
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x4a476d
mov eax, dword [ebp - 0x20]
jmp 0x4a48b8
call fcn.004a355c
mov dword [ebp - 0x20], eax
mov eax, dword [entry3]
test eax, eax
je 0x4a4784
cmp dword [ebp - 0x20], 0
jne 0x4a478e
mov eax, 0
jmp 0x4a48b8
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x24], 1
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
call eax
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x3c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
mov eax, dword [sym.imp.KERNEL32.dll_CreateEventA]
call eax
sub esp, 0x10
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x18], eax
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x1c], 0xffffffff
mov eax, dword [ebp - 0x20]
lea edx, [eax + 0x38]
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov dword [esp], edx
call fcn.004a3653
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x64], 0
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0x20]
lea edi, [eax + 0x14]
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call eax
mov esi, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentThread]
call eax
mov ebx, eax
mov eax, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call eax
mov dword [esp + 0x18], 2
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], esi
mov dword [esp + 4], ebx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_DuplicateHandle]
call eax
sub esp, 0x1c
test eax, eax
jne 0x4a4860
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov eax, dword [ebp - 0x20]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetThreadPriority]
call eax
sub esp, 4
mov edx, dword [ebp - 0x20]
mov dword [edx + 0x6c], eax
mov eax, dword [ebp - 0x20]
mov dword [eax + 0x68], 0
mov eax, dword [ebp - 0x20]
movzx edx, byte [eax + 0x20]
and edx, 0xffffffcf
or edx, 0x10
mov byte [eax + 0x20], dl
mov eax, dword [0x57d128]
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
call eax
sub esp, 8
test eax, eax
jne 0x4a48b5
call sub.api_ms_win_crt_runtime_l1_1_0.dll_abort
mov eax, dword [ebp - 0x20]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
Function at 0x4a497c
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x10], 0
mov eax, dword [ebp + 8]
mov dword [ebp - 0xc], eax
call fcn.004a4726
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x14]
mov edx, dword [ebp + 8]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14]
mov eax, dword [eax + 0xb4]
mov dword [esp], eax
call fcn.004a45be
mov eax, dword [ebp - 0x14]
movzx eax, byte [eax + 0x20]
and eax, 0x30
test al, al
jne 0x4a49d5
mov eax, dword [ebp - 0x14]
add eax, 0x70
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.api_ms_win_crt_private_l1_1_0.dll_longjmp
mov eax, dword [0x57d128]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
call eax
sub esp, 4
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
je 0x4a4aff
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
test eax, eax
jne 0x4a4a67
mov eax, dword [ebp - 0x10]
mov dword [eax], 0xdeadbeef
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4a4a24
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004a3470
mov dword [ebp - 0x10], 0
mov eax, dword [0x57d128]
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
call eax
sub esp, 8
jmp 0x4a4aff
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 4]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x68], 1
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x18]
test eax, eax
je 0x4a4a97
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x18], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x24]
and eax, 4
test eax, eax
je 0x4a4aff
mov eax, dword [ebp - 0x10]
mov dword [eax], 0xdeadbeef
mov eax, dword [ebp - 0x10]
mov eax, dword [eax + 0x14]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x10]
mov dword [eax + 0x14], 0
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call fcn.004a3470
mov dword [ebp - 0x10], 0
mov eax, dword [0x57d128]
mov edx, dword [ebp - 0x10]
mov dword [esp + 4], edx
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsSetValue]
call eax
sub esp, 8
mov eax, dword [ebp - 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__endthreadex]
call eax
Function at 0x4b85e0
Capabilities:
Write file on windows

Disassembly:
push ebx
push edi
push esi
sub esp, 0x18
mov esi, ecx
mov ebx, dword [esp + 0x28]
mov dword [esp + 2], 0x6054b50
movzx eax, word [ecx + 4]
mov word [esp + 6], ax
movzx eax, word [ecx + 6]
mov word [esp + 8], ax
movzx eax, word [ecx + 8]
mov word [esp + 0xa], ax
movzx eax, word [ecx + 0xa]
mov word [esp + 0xc], ax
mov eax, dword [ecx + 0xc]
mov dword [esp + 0xe], eax
mov eax, dword [ecx + 0x10]
mov dword [esp + 0x12], eax
movzx eax, word [ecx + 0x14]
mov word [esp + 0x16], ax
lea eax, [esp + 2]
push ebx
push 0x16
push 1
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
mov edi, 0x80000000
cmp eax, 0x16
jne 0x4b866c
movzx eax, word [esi + 0x14]
test eax, eax
je 0x4b866a
push ebx
push 1
push eax
push dword [esi + 0x18]
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
movzx ecx, word [esi + 0x14]
cmp eax, ecx
jne 0x4b866c
xor edi, edi
mov eax, edi
add esp, 0x18
pop esi
pop edi
pop ebx
ret 4

Function at 0x4b8680
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
push ebx
push edi
push esi
mov eax, 0x8010
call fcn.004977ec
mov esi, dword [esp + 0x8034]
mov edi, dword [esp + 0x8030]
mov edx, dword [esp + 0x802c]
mov ebx, dword [esp + 0x8028]
xor edx, esi
mov ecx, ebx
xor ecx, edi
xor eax, eax
or ecx, edx
je 0x4b87e3
mov ebp, dword [esp + 0x8038]
test ebp, ebp
je 0x4b87e3
lea eax, [esp + 0x10]
push 0x8000
push 0
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
add esp, 0xc
mov eax, 0x80000000
cmp ebx, edi
mov edx, dword [esp + 0x802c]
mov ecx, edx
sbb ecx, esi
jge 0x4b87e3
mov dword [esp + 4], ebx
mov dword [esp + 8], esi
mov ebx, dword [esp + 0x8024]
nop word cs:[eax + eax]
nop
mov dword [esp + 0xc], edx
cmp ebp, 0x8000
mov esi, 0x8000
cmovb esi, ebp
push 0
mov dword [esp + 4], edi
push edi
push ebx
mov edi, ebx
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
jne 0x4b8799
push edi
push esi
push 1
lea eax, [esp + 0x1c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fread
add esp, 0x10
cmp eax, esi
jne 0x4b87a3
push 0
mov ebx, dword [esp + 8]
push ebx
push edi
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fseek
add esp, 0xc
test eax, eax
jne 0x4b87ae
mov ebx, edi
push edi
push esi
push 1
lea eax, [esp + 0x1c]
push eax
call sub.api_ms_win_crt_stdio_l1_1_0.dll_fwrite
add esp, 0x10
cmp eax, esi
jne 0x4b87c5
mov edi, dword [esp]
add edi, esi
adc dword [esp + 8], 0
add dword [esp + 4], esi
mov edx, dword [esp + 0xc]
adc edx, 0
sub ebp, esi
jne 0x4b8710
xor eax, eax
jmp 0x4b87e3
push dword [esp]
push str.filemove_src_seek__ld_failed_n
jmp 0x4b87b4
push dword [esp]
push esi
push str.filemove_read__ld_off_ld_failed_n
jmp 0x4b87cf
push ebx
push str.filemove_dst_seek__ld_failed_n
push 0x55f230
push 3
call fcn.00420f20
add esp, 0x10
jmp 0x4b87de
push dword [esp + 4]
push esi
push str.filemove_write__ld_off_ld_failed_n
push 0x55f230
push 3
call fcn.00420f20
add esp, 0x14
mov eax, 0x80000000
add esp, 0x8010
pop esi
pop edi
pop ebx
pop ebp
ret 0x18