joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4075cd
Capabilities:
Query environment variable

Disassembly:
push ecx
push ecx
mov eax, dword [0x40e80c]
push ebx
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetEnvironmentStringsW]
push esi
push edi
xor ebx, ebx
xor esi, esi
xor edi, edi
cmp eax, ebx
jne 0x407616
call ebp
mov esi, eax
cmp esi, ebx
je 0x4075fc
mov dword [0x40e80c], 1
jmp 0x40761b
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x407611
push 2
pop eax
mov dword [0x40e80c], eax
jmp 0x407616
mov eax, dword [0x40e80c]
cmp eax, 1
jne 0x407673
cmp esi, ebx
jne 0x40762e
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40762e
xor eax, eax
jmp 0x40771a
cmp word [esi], bx
mov eax, esi
je 0x407643
inc eax
inc eax
cmp word [eax], bx
jne 0x407635
inc eax
inc eax
cmp word [eax], bx
jne 0x407635
sub eax, esi
inc eax
inc eax
mov ebp, eax
push ebp
call fcn.00404c0a
mov edi, eax
cmp edi, ebx
pop ecx
jne 0x407666
xor edi, edi
push esi
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
mov eax, edi
jmp 0x40771a
push ebp
push esi
push edi
call fcn.00404cd0
add esp, 0xc
jmp 0x407658
cmp eax, 2
je 0x40767c
cmp eax, ebx
jne 0x407627
call dword [sym.imp.KERNEL32.dll_GetEnvironmentStrings]
mov ebp, eax
cmp ebp, ebx
je 0x407627
cmp byte [ebp], bl
mov esi, ebp
je 0x4076b2
push ebx
push ebx
push 0xffffffffffffffff
push esi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
cmp eax, ebx
je 0x407627
push esi
add edi, eax
call fcn.00404c40
lea esi, [esi + eax + 1]
cmp byte [esi], bl
pop ecx
jne 0x40768f
inc edi
lea eax, [edi + edi]
push eax
mov dword [esp + 0x18], edi
call fcn.00404c0a
cmp eax, ebx
pop ecx
mov dword [esp + 0x10], eax
je 0x40772b
cmp byte [ebp], bl
mov edi, ebp
mov esi, eax
je 0x40770c
mov ecx, dword [esp + 0x14]
mov eax, esi
sub eax, dword [esp + 0x10]
sar eax, 1
sub ecx, eax
push ecx
push esi
push 0xffffffffffffffff
push edi
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
test eax, eax
je 0x407721
push edi
call fcn.00404c40
push esi
lea edi, [edi + eax + 1]
call fcn.00403c5d
cmp byte [edi], bl
pop ecx
pop ecx
lea esi, [esi + eax*2 + 2]
jne 0x4076d2
push ebp
mov word [esi], bx
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
mov eax, dword [esp + 0x10]
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
push dword [esp + 0x10]
call fcn.00405137
pop ecx
push ebp
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsA]
jmp 0x407627
Function at 0x407737
Capabilities:
Accept command line arguments

Disassembly:
mov eax, dword [0x40e810]
push ebp
xor ebp, ebp
cmp eax, ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
jne 0x407777
call esi
test eax, eax
je 0x40775c
mov dword [0x40e810], 1
jmp 0x40777c
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x78
jne 0x407773
mov dword [0x40e810], 2
jmp 0x407785
xor eax, eax
jmp 0x4077d3
cmp eax, 1
jne 0x407780
call esi
jmp 0x4077d3
cmp eax, 2
jne 0x407773
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
push ebp
push ebp
push 0xffffffffffffffff
mov ebx, eax
push ebx
push 1
push ebp
call edi
mov esi, eax
cmp esi, ebp
je 0x4077cb
lea eax, [esi + esi]
push eax
call fcn.00404c0a
mov ebp, eax
test ebp, ebp
pop ecx
je 0x4077cb
push esi
push ebp
push 0xffffffffffffffff
push ebx
push 1
push 0
call edi
test eax, eax
jne 0x4077cf
push ebp
call fcn.00405137
pop ecx
xor eax, eax
jmp 0x4077d1
mov eax, ebp
pop edi
pop ebx
pop esi
pop ebp
ret

Function at 0x4086d8
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
xor ebx, ebx
cmp dword [0x40e818], ebx
push esi
push edi
jne 0x408758
push str.user32.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
cmp edi, ebx
je 0x408793
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
mov dword [0x40e818], eax
je 0x408793
push str.GetActiveWindow
push edi
call esi
push str.GetLastActivePopup
push edi
mov dword [0x40e81c], eax
call esi
cmp dword [0x40e588], 2
mov dword [0x40e820], eax
jne 0x408758
push str.GetUserObjectInformationA
push edi
call esi
test eax, eax
mov dword [0x40e828], eax
je 0x408758
push str.GetProcessWindowStation
push edi
call esi
mov dword [0x40e824], eax
mov eax, dword [0x40e824]
test eax, eax
je 0x40879d
call eax
test eax, eax
je 0x408784
lea ecx, [ebp - 4]
push ecx
push 0xc
lea ecx, [ebp - 0x10]
push ecx
push 1
push eax
call dword [0x40e828]
test eax, eax
je 0x408784
test byte [ebp - 8], 1
jne 0x40879d
cmp dword [0x40e594], 4
jb 0x408797
or byte [ebp + 0x12], 0x20
jmp 0x4087bc
xor eax, eax
jmp 0x4087cc
or byte [ebp + 0x12], 4
jmp 0x4087bc
mov eax, dword [0x40e81c]
test eax, eax
je 0x4087bc
call eax
mov ebx, eax
test ebx, ebx
je 0x4087bc
mov eax, dword [0x40e820]
test eax, eax
je 0x4087bc
push ebx
call eax
mov ebx, eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push ebx
call dword [0x40e818]
pop edi
pop esi
pop ebx
leave
ret
Function at 0x4087d1
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, dword [ebp + 8]
mov ebx, dword [esi + 8]
test bl, 3
jne 0x4087ff
mov eax, dword fs:[0x18]
mov dword [ebp + 8], eax
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 8]
cmp ebx, ecx
mov dword [ebp - 4], ecx
jb 0x408806
cmp ebx, dword [eax + 4]
jae 0x408806
xor eax, eax
jmp 0x4089f6
push edi
mov edi, dword [esi + 0xc]
cmp edi, 0xffffffff
jne 0x408817
xor eax, eax
inc eax
jmp 0x4089f5
xor edx, edx
mov dword [ebp + 8], edx
mov eax, ebx
mov ecx, dword [eax]
cmp ecx, 0xffffffff
je 0x40882d
cmp ecx, edx
jae 0x408972
cmp dword [eax + 4], 0
je 0x408836
inc dword [ebp + 8]
inc edx
add eax, 0xc
cmp edx, edi
jbe 0x40881e
cmp dword [ebp + 8], 0
je 0x408858
mov eax, dword [esi - 8]
cmp eax, dword [ebp - 4]
jb 0x408972
cmp eax, esi
jae 0x408972
mov eax, dword [0x40e830]
mov edi, ebx
and edi, 0xfffff000
xor esi, esi
test eax, eax
jle 0x40887d
cmp dword [esi*4 + 0x40e838], edi
je 0x408976
inc esi
cmp esi, eax
jl 0x40886b
push 0x1c
lea eax, [ebp - 0x20]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4089f2
cmp dword [ebp - 8], 0x1000000
jne 0x4089f2
test byte [ebp - 0xc], 0xcc
je 0x4088fb
mov ecx, dword [ebp - 0x1c]
cmp word [ecx], 0x5a4d
jne 0x4089f2
mov eax, dword [ecx + 0x3c]
add eax, ecx
cmp dword [eax], 0x4550
jne 0x4089f2
cmp word [eax + 0x18], 0x10b
jne 0x4089f2
sub ebx, ecx
cmp word [eax + 6], 0
movzx ecx, word [eax + 0x14]
lea ecx, [ecx + eax + 0x18]
jbe 0x4089f2
mov eax, dword [ecx + 0xc]
cmp ebx, eax
jb 0x4088fb
mov edx, dword [ecx + 8]
add edx, eax
cmp ebx, edx
jae 0x4088fb
test byte [ecx + 0x27], 0x80
jne 0x408972
push 1
push 0x40e878
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
test eax, eax
jne 0x40880f
mov ecx, dword [0x40e830]
test ecx, ecx
mov edx, ecx
jle 0x40892f
lea eax, [ecx*4 + 0x40e834]
cmp dword [eax], edi
je 0x40892f
dec edx
sub eax, 4
test edx, edx
jg 0x408923
test edx, edx
jne 0x408960
push 0xf
pop ebx
cmp ecx, ebx
jg 0x40893c
mov ebx, ecx
xor edx, edx
test ebx, ebx
jl 0x408954
lea eax, [edx*4 + 0x40e838]
mov esi, dword [eax]
inc edx
cmp edx, ebx
mov dword [eax], edi
mov edi, esi
jle 0x408942
cmp ecx, 0x10
jge 0x408960
inc ecx
mov dword [0x40e830], ecx
push 0
push 0x40e878
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
jmp 0x40880f
xor eax, eax
jmp 0x4089f5
test esi, esi
jle 0x40880f
mov ebx, dword [sym.imp.KERNEL32.dll_InterlockedExchange]
push 1
push 0x40e878
call ebx
test eax, eax
jne 0x40880f
cmp dword [esi*4 + 0x40e838], edi
je 0x4089cc
mov eax, dword [0x40e830]
lea esi, [eax - 1]
test esi, esi
jl 0x4089ba
cmp dword [esi*4 + 0x40e838], edi
je 0x4089b6
dec esi
jns 0x4089aa
test esi, esi
jge 0x4089ca
cmp eax, 0x10
jge 0x4089c5
inc eax
mov dword [0x40e830], eax
lea esi, [eax - 1]
jmp 0x4089cc
je 0x4089e4
xor ecx, ecx
test esi, esi
jl 0x4089e4
lea eax, [ecx*4 + 0x40e838]
mov edx, dword [eax]
inc ecx
cmp ecx, esi
mov dword [eax], edi
mov edi, edx
jle 0x4089d2
push 0
push 0x40e878
call ebx
jmp 0x40880f
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x409730
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.004079f0
mov esi, esp
push 0x1c
lea eax, [ebp - 0x28]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x4097cb
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 [0x40e588]
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 0x4097cb
cmp eax, 1
je 0x4097ec
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 0x4097cb
mov eax, dword [ebp - 0x1c]
add dword [ebp - 4], eax
test dword [ebp - 0x18], ebx
je 0x409798
test byte [ebp - 0x13], 1
mov eax, dword [ebp - 0x28]
mov dword [ebp - 4], eax
je 0x4097c7
xor eax, eax
inc eax
jmp 0x40980b
cmp edi, eax
jae 0x4097cf
xor eax, eax
jmp 0x40980b
cmp eax, esi
jae 0x4097d6
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 [0x40e588]
jmp 0x4097ef
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 0x40a2f7
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push ebx
push esi
mov esi, dword [ebp + 8]
cmp esi, dword [0x40fb44]
push edi
jae 0x40a4cc
mov eax, esi
sar eax, 5
lea edi, [eax*4 + 0x40fb60]
mov eax, dword [edi]
and esi, 0x1f
shl esi, 3
add eax, esi
mov dl, byte [eax + 4]
test dl, 1
je 0x40a4cc
and dword [ebp - 0xc], 0
cmp dword [ebp + 0x10], 0
mov ebx, dword [ebp + 0xc]
mov ecx, ebx
je 0x40a3a2
test dl, 2
jne 0x40a3a2
test dl, 0x48
je 0x40a36c
cmp byte [eax + 5], 0xa
je 0x40a36c
mov eax, dword [edi]
mov al, byte [eax + esi + 5]
dec dword [ebp + 0x10]
mov byte [ebx], al
mov eax, dword [edi]
lea ecx, [ebx + 1]
mov dword [ebp - 0xc], 1
mov byte [eax + esi + 5], 0xa
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp + 0x10]
mov eax, dword [edi]
push ecx
push dword [eax + esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40a3b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 5
pop ecx
cmp eax, ecx
jne 0x40a39d
mov dword [0x40e580], ecx
jmp 0x40a4d3
cmp eax, 0x6d
jne 0x40a3a9
xor eax, eax
jmp 0x40a4e0
push eax
call fcn.00409fd4
pop ecx
jmp 0x40a4dd
mov eax, dword [ebp - 0x10]
mov ecx, dword [edi]
add dword [ebp - 0xc], eax
test byte [ecx + esi + 4], 0x80
je 0x40a4c7
test eax, eax
je 0x40a3dc
cmp byte [ebx], 0xa
jne 0x40a3dc
mov eax, ecx
lea eax, [eax + esi + 4]
or byte [eax], 4
jmp 0x40a3e5
mov eax, dword [edi]
lea eax, [eax + esi + 4]
and byte [eax], 0xfb
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp - 0xc]
add ecx, eax
cmp eax, ecx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], ecx
jae 0x40a4c1
mov eax, dword [ebp - 8]
mov al, byte [eax]
cmp al, 0x1a
je 0x40a4b1
cmp al, 0xd
je 0x40a417
mov byte [ebx], al
inc ebx
inc dword [ebp - 8]
jmp 0x40a4a3
dec ecx
cmp dword [ebp - 8], ecx
jae 0x40a431
mov eax, dword [ebp - 8]
inc eax
cmp byte [eax], 0xa
jne 0x40a42c
add dword [ebp - 8], 2
jmp 0x40a485
mov dword [ebp - 8], eax
jmp 0x40a49f
inc dword [ebp - 8]
push 0
lea eax, [ebp - 0x10]
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 0x40a459
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40a49f
cmp dword [ebp - 0x10], 0
je 0x40a49f
mov eax, dword [edi]
test byte [eax + esi + 4], 0x48
je 0x40a47a
mov al, byte [ebp - 1]
cmp al, 0xa
je 0x40a485
mov byte [ebx], 0xd
mov ecx, dword [edi]
mov byte [ecx + esi + 5], al
jmp 0x40a4a2
cmp ebx, dword [ebp + 0xc]
jne 0x40a48a
cmp byte [ebp - 1], 0xa
jne 0x40a48a
mov byte [ebx], 0xa
jmp 0x40a4a2
push 1
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.00409082
add esp, 0xc
cmp byte [ebp - 1], 0xa
je 0x40a4a3
mov byte [ebx], 0xd
inc ebx
mov ecx, dword [ebp - 0xc]
cmp dword [ebp - 8], ecx
jb 0x40a3fb
jmp 0x40a4c1
mov eax, dword [edi]
test byte [eax + esi + 4], 0x40
jne 0x40a4c1
lea esi, [eax + esi + 4]
or byte [esi], 2
sub ebx, dword [ebp + 0xc]
mov dword [ebp - 0xc], ebx
mov eax, dword [ebp - 0xc]
jmp 0x40a4e0
and dword [0x40e580], 0
mov dword [0x40e57c], 9
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret
Function at 0x413115
Capabilities:
Link many functions at runtime

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
push esi
push edi
call fcn.0040bbfc
and dword [ebp - 4], 0
cmp dword [0x42f228], 0
mov ebx, eax
jne 0x4131c6
push str.USER32.DLL
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, eax
test edi, edi
je 0x413277
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.MessageBoxA
push edi
call esi
test eax, eax
je 0x413277
push eax
call fcn.0040bb8a
mov dword [esp], str.GetActiveWindow
push edi
mov dword [0x42f228], eax
call esi
push eax
call fcn.0040bb8a
mov dword [esp], str.GetLastActivePopup
push edi
mov dword [0x42f22c], eax
call esi
push eax
call fcn.0040bb8a
mov dword [esp], str.GetUserObjectInformationA
push edi
mov dword [0x42f230], eax
call esi
push eax
call fcn.0040bb8a
pop ecx
mov dword [0x42f238], eax
test eax, eax
je 0x4131c6
push str.GetProcessWindowStation
push edi
call esi
push eax
call fcn.0040bb8a
pop ecx
mov dword [0x42f234], eax
mov eax, dword [0x42f234]
cmp eax, ebx
je 0x41321e
cmp dword [0x42f238], ebx
je 0x41321e
push eax
call fcn.0040bc05
push dword [0x42f238]
mov esi, eax
call fcn.0040bc05
pop ecx
pop ecx
mov edi, eax
test esi, esi
je 0x41321e
test edi, edi
je 0x41321e
call esi
test eax, eax
je 0x413215
lea ecx, [ebp - 8]
push ecx
push 0xc
lea ecx, [ebp - 0x14]
push ecx
push 1
push eax
call edi
test eax, eax
je 0x413215
test byte [ebp - 0xc], 1
jne 0x41321e
or dword [ebp + 0x10], 0x200000
jmp 0x413257
mov eax, dword [0x42f22c]
cmp eax, ebx
je 0x413257
push eax
call fcn.0040bc05
pop ecx
test eax, eax
je 0x413257
call eax
mov dword [ebp - 4], eax
test eax, eax
je 0x413257
mov eax, dword [0x42f230]
cmp eax, ebx
je 0x413257
push eax
call fcn.0040bc05
pop ecx
test eax, eax
je 0x413257
push dword [ebp - 4]
call eax
mov dword [ebp - 4], eax
push dword [0x42f228]
call fcn.0040bc05
pop ecx
test eax, eax
je 0x413277
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [ebp - 4]
call eax
jmp 0x413279
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret
Function at 0x1000a67b
Capabilities:
Parse pe header

Disassembly:
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x1000a6ba
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x1000a6ba
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x1000a6ba
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x1000a6ba
cmp dword [ecx + 0x74], 0xe
jbe 0x1000a6ba
cmp dword [ecx + 0xe8], 0
setne al
ret
xor al, al
ret
Function at 0x10011fc6
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100212c0
push 0x100212b8
push str.FlsAlloc
push 0x1f
call fcn.10011e8e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x10011ffa
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001e140]
call esi
jmp 0x10012000
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x10012044
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100212d0
push 0x100212c8
push str.FlsGetValue
push 0x21
call fcn.10011e8e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x1001207b
push dword [ebp + 8]
mov ecx, esi
call dword [0x1001e140]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x10012083
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x100212d8
push 0x100212d0
push str.FlsSetValue
push 0x22
call fcn.10011e8e
mov esi, eax
add esp, 0x10
test esi, esi
je 0x100120bd
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x1001e140]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x100128e9
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.10006a50
mov eax, dword [0x1002a080]
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.1000e85e
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x1001292b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x10012a87
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.1001cbe0
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 + 0x1002b800]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.100136ea
mov ecx, dword [esi*4 + 0x1002b800]
add esp, 0x14
mov dword [ebp - 0x1010], eax
mov eax, edx
mov edx, dword [ebp - 0x1010]
mov dword [ebp - 0x101c], eax
cmp edx, dword [ecx + edi + 0x20]
jne 0x10012a80
cmp eax, dword [ecx + edi + 0x24]
jne 0x10012a80
push 0
lea eax, [ebp - 0x1014]
push eax
push 0x1000
lea eax, [ebp - 0x1004]
push eax
push dword [ecx + edi + 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10012a80
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.100136ea
add esp, 0x14
test edx, edx
jl 0x10012a80
jg 0x100129f6
test eax, eax
jb 0x10012a80
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x10012a80
jl 0x10012a10
cmp dword [ebp - 0x1008], eax
ja 0x10012a80
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x10012a2e
test ebx, ebx
je 0x10012a67
cmp ecx, edi
jae 0x10012a67
mov al, byte [ecx]
cmp al, 0xd
jne 0x10012a48
lea eax, [edi - 1]
cmp ecx, eax
jae 0x10012a54
cmp byte [ecx + 1], 0xa
jne 0x10012a54
inc ecx
jmp 0x10012a54
movzx eax, al
movsx eax, byte [eax + 0x1002a328]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x10012a2e
cmp edx, ebx
jne 0x10012a2e
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x10012a85
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.10005a9c
leave
ret
Function at 0x10012b82
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
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 + 0x1002b800]
mov dword [ebp - 0xc], ecx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x14], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10012bc2
cmp byte [ebx], 0xa
jne 0x10012bc2
or byte [edi + eax + 0x28], 4
jmp 0x10012bc7
and byte [edi + eax + 0x28], 0xfb
add ecx, ebx
mov eax, ebx
mov dword [ebp - 0x10], ecx
mov esi, ebx
mov dword [ebp - 8], eax
cmp ebx, ecx
jae 0x10012cc6
mov dl, byte [eax]
cmp dl, 0x1a
je 0x10012ca9
inc eax
cmp dl, 0xd
je 0x10012bf3
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x10012c19
cmp eax, ecx
jae 0x10012c27
mov cl, byte [eax]
xor eax, eax
cmp cl, 0xa
sete al
inc eax
add dword [ebp - 8], eax
cmp cl, 0xa
sete al
dec al
and al, 3
add al, 0xa
mov byte [esi], al
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x10]
xor edx, edx
inc edx
add esi, edx
cmp eax, ecx
jb 0x10012bdb
jmp 0x10012cc6
push 0
lea eax, [ebp - 0x10]
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 0x10012ca4
cmp dword [ebp - 0x10], 0
je 0x10012ca4
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x1002b800]
test byte [eax + edi + 0x28], 0x48
je 0x10012c7e
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x10012c69
mov byte [esi], dl
jmp 0x10012c7a
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x1002b800]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x10012cc6
cmp byte [ebp - 1], 0xa
jne 0x10012c8d
cmp esi, ebx
jne 0x10012c8d
mov byte [esi], 0xa
jmp 0x10012cc5
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.10013708
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x10012cc6
mov byte [esi], 0xd
jmp 0x10012cc5
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x1002b800]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x10012cc3
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x10012cc6
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x10012ccf
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x1c
mov eax, dword [ebp + 8]
mov ecx, eax
push ebx
mov ebx, dword [ebp + 0xc]
and eax, 0x3f
push esi
sar ecx, 6
push edi
imul edi, eax, 0x38
mov dword [ebp - 8], ecx
mov eax, dword [ecx*4 + 0x1002b800]
push 0xa
pop edx
mov dword [ebp - 0x18], edx
mov ecx, dword [eax + edi + 0x18]
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x10012d15
cmp word [ebx], dx
jne 0x10012d15
or byte [eax + edi + 0x28], 4
jmp 0x10012d1a
and byte [eax + edi + 0x28], 0xfb
lea edx, [ebx + ecx*2]
mov eax, ebx
mov dword [ebp - 0xc], edx
mov esi, ebx
mov dword [ebp - 4], eax
cmp ebx, edx
jae 0x10012e7d
mov dword [ebp - 0x10], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x14], edx
mov edx, dword [ebp - 0xc]
cmp ecx, 0x1a
je 0x10012e5d
add eax, 2
cmp cx, word [ebp - 0x10]
je 0x10012d5b
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x10012d91
cmp eax, edx
jae 0x10012d9f
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x18]
mov edx, eax
push 0xa
sete cl
xor eax, eax
lea ecx, [ecx*2 + 2]
add dword [ebp - 4], ecx
pop ecx
cmp dx, cx
mov edx, dword [ebp - 0xc]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
push 2
pop ecx
add esi, ecx
cmp eax, edx
jb 0x10012d36
jmp 0x10012e7d
push 0
lea eax, [ebp - 0x18]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x10012e58
cmp dword [ebp - 0x18], 0
je 0x10012e58
mov edx, dword [ebp - 8]
push 0xa
mov eax, dword [edx*4 + 0x1002b800]
test byte [eax + edi + 0x28], 0x48
je 0x10012e2e
lea eax, [esi + 2]
mov dword [ebp - 0x1c], eax
mov ax, word [ebp - 4]
pop ecx
mov word [ebp - 2], ax
cmp ax, cx
jne 0x10012df2
mov word [esi], cx
jmp 0x10012e29
push 0xd
pop ecx
mov word [esi], cx
movzx ecx, ax
mov eax, dword [edx*4 + 0x1002b800]
mov dx, word [ebp - 2]
shr ecx, 8
push 0xa
mov byte [eax + edi + 0x2a], dl
mov edx, dword [ebp - 8]
mov eax, dword [edx*4 + 0x1002b800]
mov byte [eax + edi + 0x2b], cl
mov eax, dword [edx*4 + 0x1002b800]
pop ecx
mov byte [eax + edi + 0x2c], cl
mov esi, dword [ebp - 0x1c]
jmp 0x10012e7d
pop eax
cmp word [ebp - 4], ax
jne 0x10012e3e
cmp esi, ebx
jne 0x10012e3e
mov word [esi], ax
jmp 0x10012e7a
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.10013708
add esp, 0x10
push 0xa
pop eax
cmp word [ebp - 4], ax
je 0x10012e7d
push 0xd
pop eax
jmp 0x10012e39
mov edx, dword [ebp - 8]
mov edx, dword [edx*4 + 0x1002b800]
mov al, byte [edx + edi + 0x28]
test al, 0x40
jne 0x10012e77
or al, 2
mov byte [edx + edi + 0x28], al
jmp 0x10012e7d
mov word [esi], cx
add esi, 2
sub esi, ebx
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret