joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4e5590
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xf4
mov eax, dword [0x5a5014]
xor eax, esp
mov dword [esp + 0xf0], eax
mov dword [esp], 0x57d9e0
mov dword [esp + 4], 0x565228
mov dword [esp + 8], 0x57ca60
mov dword [esp + 0xc], 0x56522c
mov dword [esp + 0x10], 0x565230
mov dword [esp + 0x14], 0x57bcd8
mov dword [esp + 0x18], 0x57b68c
mov dword [esp + 0x1c], 0x565234
mov dword [esp + 0x20], 0x565238
mov dword [esp + 0x24], 0x56523c
mov dword [esp + 0x28], 0x57ca64
mov dword [esp + 0x2c], 0x565240
mov dword [esp + 0x30], 0x565244
mov dword [esp + 0x34], 0x565248
mov dword [esp + 0x38], 0x57cad8
mov dword [esp + 0x3c], 0x56524c
mov dword [esp + 0x40], 0x565250
mov dword [esp + 0x44], 0x565254
mov dword [esp + 0x48], 0x564e4c
mov dword [esp + 0x4c], 0x564e50
mov dword [esp + 0x50], 0x565260
mov dword [esp + 0x54], 0x565264
mov dword [esp + 0x58], 0x57d9e0
mov dword [esp + 0x5c], 0x57d9e0
mov dword [esp + 0x60], 0x565268
mov dword [esp + 0x64], 0x56526c
mov dword [esp + 0x68], 0x565270
mov dword [esp + 0x6c], 0x57bd4c
mov dword [esp + 0x70], 0x564e54
mov dword [esp + 0x74], 0x564e58
mov dword [esp + 0x78], 0x564e5c
mov dword [esp + 0x7c], 0x564e60
mov dword [esp + 0x80], 0x564e64
mov dword [esp + 0x84], 0x564e68
mov dword [esp + 0x88], 0x564e6c
mov dword [esp + 0x8c], 0x564e70
mov dword [esp + 0x90], 0x57bd14
mov dword [esp + 0x94], 0x57bc94
mov dword [esp + 0x98], 0x564e74
mov dword [esp + 0x9c], 0x57d9e0
mov dword [esp + 0xa0], 0x57d9e0
mov dword [esp + 0xa4], 0x57d9e0
mov dword [esp + 0xa8], 0x57d9e0
mov dword [esp + 0xac], 0x57d9e0
mov dword [esp + 0xb0], 0x57d9e0
mov dword [esp + 0xb4], 0x57d9e0
mov dword [esp + 0xb8], 0x57d9e0
mov dword [esp + 0xbc], 0x564e78
mov dword [esp + 0xc0], 0x564e7c
mov dword [esp + 0xc4], 0x564e80
mov dword [esp + 0xc8], 0x561464
mov dword [esp + 0xcc], 0x564e84
mov dword [esp + 0xd0], 0x564e88
mov dword [esp + 0xd4], 0x565274
mov dword [esp + 0xd8], 0x564e8c
mov dword [esp + 0xdc], 0x564e90
mov dword [esp + 0xe0], 0x564e94
mov dword [esp + 0xe4], 0x565278
mov dword [esp + 0xe8], 0x564e98
mov dword [esp + 0xec], 0x564e9c
cmp cl, 0x3c
jb 0x4e57f6
mov eax, 0x57d9e0
mov ecx, dword [esp + 0xf0]
xor ecx, esp
call fcn.004a1084
add esp, 0xf4
ret
movzx eax, cl
mov ecx, dword [esp + 0xf0]
xor ecx, esp
mov eax, dword [esp + eax*4]
call fcn.004a1084
add esp, 0xf4
ret
Function at 0x4f4820
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55ada8
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x5a5014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x10], edi
mov esi, dword [ebp + 8]
lea eax, [edi + 4]
xorps xmm0, xmm0
mov dword [edi], vtable.std::exception.0
push eax
movq qword [eax], xmm0
lea eax, [esi + 4]
mov dword [ebp - 4], 0
push eax
call fcn.00506134
add esp, 8
mov dword [edi], vtable.boost::system::system_error.0
lea ecx, [edi + 0x18]
movq xmm0, qword [esi + 0xc]
movq qword [edi + 0xc], xmm0
mov eax, dword [esi + 0x14]
mov dword [edi + 0x14], eax
lea eax, [esi + 0x18]
push eax
mov dword [ebp - 4], 1
call fcn.00456b10
mov dword [edi], vtable.boost::filesystem::filesystem_error.0
mov eax, dword [esi + 0x30]
mov dword [edi + 0x30], eax
mov ecx, dword [esi + 0x34]
mov dword [edi + 0x34], ecx
test ecx, ecx
je 0x4f48bc
add ecx, 4
mov eax, 1
lock xadd dword [ecx], eax
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 4
Function at 0x4f5a10
Capabilities:
Access peb ldr_data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55bb09
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x5a5014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x34], ecx
push eax
mov dword [ebp - 4], 0
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], 0
call fcn.00420b20
xor eax, eax
mov dword [ebp - 0x2c], 1
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 1
push eax
lea ecx, [ebx + 0x10]
call fcn.004f94a0
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00455260
mov eax, dword [ebx + 0x10]
lea ecx, [ebx + 0x10]
mov edx, dword [ebx + 8]
mov esi, dword [ebx + 0xc]
push dword [ebp + 0x10]
mov eax, dword [eax + 4]
mov dword [eax + ebx + 0x30], edx
mov dword [eax + ebx + 0x34], esi
call fcn.004e9410
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebx + 0x10]
call fcn.004bf770
cmp dword [eax + 0x14], 8
mov ecx, eax
mov dword [ebp - 4], 2
jb 0x4f5ad3
mov ecx, dword [eax]
push dword [eax + 0x10]
push ecx
push dword [ebx]
mov ecx, dword [ebp - 0x30]
call fcn.004c7840
lea ecx, [ebp - 0x28]
call fcn.00455260
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a1084
mov esp, ebp
pop ebp
ret 0xc
Function at 0x5025c0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55cc78
mov eax, dword fs:[0]
push eax
push ecx
push esi
push edi
mov eax, dword [0x5a5014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
mov edi, eax
mov edx, 2
test edi, edi
mov eax, 1
cmove edi, eax
xor ecx, ecx
mov eax, edi
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.004a10f8
mov esi, eax
add esp, 4
mov dword [ebp - 0x10], esi
push esi
push edi
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
test eax, eax
jne 0x502636
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x502638
xor eax, eax
push str.boost::filesystem::current_path
push dword [ebp + 0xc]
push eax
call fcn.005027d0
mov edi, dword [ebp + 8]
mov ecx, esi
add esp, 0xc
xor eax, eax
mov dword [edi + 0x10], 0
lea edx, [ecx + 2]
mov dword [edi + 0x14], 7
mov word [edi], ax
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x502664
sub ecx, edx
sar ecx, 1
push ecx
push esi
mov ecx, edi
call fcn.00469a80
push esi
call fcn.004a1101
add esp, 4
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov esp, ebp
pop ebp
ret
Function at 0x502c80
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55cd70
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x5a5014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 0xc]
mov eax, edi
mov esi, dword [ebp + 0x10]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
cmp dword [edi + 0x14], 8
jb 0x502cc1
mov eax, dword [edi]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov dword [ebp - 0x30], eax
cmp eax, 0xffffffff
jne 0x502ce0
push esi
push edi
push ebx
call fcn.00502b50
add esp, 0xc
jmp 0x502dff
test eax, 0x400
je 0x502dc6
cmp dword [edi + 0x14], 8
mov edx, edi
jb 0x502cf5
mov edx, dword [edi]
mov ecx, edx
mov dword [ebp - 0x18], 0
xor eax, eax
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
lea esi, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x502d10
sub ecx, esi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0x28]
call fcn.00469a80
cmp dword [ebp - 0x14], 8
lea eax, [ebp - 0x28]
push 0
cmovae eax, dword [ebp - 0x28]
push 0x2000000
push 3
push 0
push 7
push 0
push eax
mov dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
mov dword [ebp - 0x34], esi
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00455260
cmp esi, 0xffffffff
jne 0x502d79
push dword [ebp - 0x2c]
push edi
push ebx
call fcn.00502b50
add esp, 0xc
jmp 0x502dff
push edi
call fcn.00502950
add esp, 4
test al, al
jne 0x502dab
push dword [ebp - 0x30]
push edi
call fcn.00502a50
add esp, 8
mov dword [ebx], 9
mov dword [ebx + 4], eax
push esi
mov dword [ebp - 4], 4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x502dff
push esi
mov dword [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
mov dword [ebp - 4], 0xffffffff
test esi, esi
je 0x502ddb
mov dword [esi], 0
mov byte [esi + 4], 0
mov dword [esi + 8], 0x57d978
push eax
push edi
test al, 0x10
je 0x502ded
call fcn.00502a50
mov ecx, 3
jmp 0x502df7
call fcn.00502a50
mov ecx, 2
add esp, 8
mov dword [ebx], ecx
mov dword [ebx + 4], eax
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a1084
mov esp, ebp
pop ebp
ret
Function at 0x503a60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55ce68
mov eax, dword fs:[0]
push eax
sub esp, 0x24
push ebx
push esi
push edi
mov eax, dword [0x5a5014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x5a5700]
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 4], 0
cmp eax, 0xffffffff
je 0x503aa8
push eax
call esi
mov ebx, eax
test ebx, ebx
jne 0x503ac0
call fcn.005047b0
mov eax, dword [0x5a5700]
cmp eax, 0xffffffff
jne 0x503abb
xor ebx, ebx
jmp 0x503ac0
push eax
call esi
mov ebx, eax
mov esi, dword [ebp + 0x10]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
test esi, esi
je 0x503adf
mov ecx, 1
lea edx, [esi + 4]
mov eax, ecx
lock xadd dword [edx], eax
lock xadd dword [edx], ecx
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x18], eax
or edi, 0xffffffff
mov byte [ebp - 4], 1
test esi, esi
je 0x503b1a
lea eax, [esi + 4]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x503b1a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x503b1a
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov eax, dword [ebp + 8]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x24], eax
lea eax, [ebp - 0x30]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebx + 0x14]
call fcn.00502fc0
push eax
add eax, 0x10
lea ecx, [ebx + 0x14]
push eax
push 0
lea eax, [ebp - 0x14]
push eax
call fcn.005031b0
mov esi, dword [ebp - 0x28]
mov byte [ebp - 4], 4
test esi, esi
je 0x503b95
lea eax, [esi + 4]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x503b95
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
mov edx, edi
lock xadd dword [eax], edx
cmp edx, 1
jne 0x503b95
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
mov esi, dword [ebp + 0x10]
mov dword [ebp - 4], 6
test esi, esi
je 0x503bcb
lea eax, [esi + 4]
mov ecx, edi
lock xadd dword [eax], ecx
cmp ecx, 1
jne 0x503bcb
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 4]
lea eax, [esi + 8]
lock xadd dword [eax], edi
cmp edi, 1
jne 0x503bcb
mov eax, dword [esi]
mov ecx, esi
call dword [eax + 8]
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 0x503be0
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5a5700]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_TlsGetValue]
cmp eax, 0xffffffff
je 0x503bf8
push eax
call esi
test eax, eax
jne 0x503c21
call fcn.005047b0
mov eax, dword [0x5a5700]
cmp eax, 0xffffffff
jne 0x503c1e
xor eax, eax
lea esi, [eax + 0xc]
lea eax, [esp + 8]
push esi
push eax
call fcn.005033e0
add esp, 8
mov dword [esi], eax
pop esi
ret
push eax
call esi
lea esi, [eax + 0xc]
lea eax, [esp + 8]
push esi
push eax
call fcn.005033e0
add esp, 8
mov dword [esi], eax
pop esi
ret
Function at 0x504090
Capabilities:
Get thread local storage value

Disassembly:
mov eax, dword [0x5a5700]
cmp eax, 0xffffffff
je 0x5040e0
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x5040e0
push esi
mov esi, dword [eax + 0x14]
mov eax, esi
mov ecx, dword [eax + 4]
cmp byte [ecx + 0xd], 0
jne 0x5040d5
mov edx, dword [esp + 8]
cmp dword [ecx + 0x10], edx
jae 0x5040c2
mov ecx, dword [ecx + 8]
jmp 0x5040c6
mov eax, ecx
mov ecx, dword [ecx]
cmp byte [ecx + 0xd], 0
je 0x5040b8
cmp eax, esi
je 0x5040d5
cmp edx, dword [eax + 0x10]
jae 0x5040d7
mov eax, esi
cmp eax, esi
pop esi
je 0x5040e0
add eax, 0x14
ret
xor eax, eax
ret
Function at 0x5047b0
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55cf20
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5a5014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
call fcn.00503340
mov esi, eax
mov dword [ebp - 4], 0
push 0x503e50
push 0x5b2884
mov dword [ebp - 0x14], esi
call fcn.00503c40
mov eax, dword [0x5a5700]
add esp, 8
cmp eax, 0xffffffff
je 0x504810
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
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 0x504c10
Capabilities:
Check for time delay via queryperformancecounter

Disassembly:
sub esp, 0x10
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_QueryPerformanceFrequency]
test eax, eax
jne 0x504c36
mov eax, dword [esp + 0x14]
mov dword [eax], 0
mov dword [eax + 4], 0
add esp, 0x10
ret
cmp dword [esp + 4], 0
jg 0x504c45
jl 0x504c21
cmp dword [esp], 0
jbe 0x504c21
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
lea eax, [esp + 0x10]
push eax
xor esi, esi
call edi
test eax, eax
jne 0x504c71
nop word [eax + eax]
inc esi
cmp esi, 3
ja 0x504cbc
lea eax, [esp + 0x10]
push eax
call edi
test eax, eax
je 0x504c60
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x10]
call fcn.005355f0
mulsd xmm0, qword [0x57ecb8]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 8]
movsd qword [esp + 0x10], xmm0
call fcn.005355f0
movsd xmm1, qword [esp + 0x10]
divsd xmm1, xmm0
movaps xmm0, xmm1
call fcn.005354e0
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
mov dword [ecx], eax
mov eax, ecx
mov dword [ecx + 4], edx
add esp, 0x10
ret
mov eax, dword [esp + 0x1c]
pop edi
pop esi
mov dword [eax], 0
mov dword [eax + 4], 0
add esp, 0x10
ret
Function at 0x504da0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55cf68
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x5a5014]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [0x5a5700]
cmp eax, 0xffffffff
jne 0x504dd6
xor ebx, ebx
jmp 0x504ddf
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
mov dword [ebp - 0x10], ebx
mov dword [ebp - 4], 0
test ebx, ebx
je 0x504ec7
mov ecx, dword [ebx + 0x18]
mov eax, dword [ebx + 0xc]
mov esi, eax
nop dword [eax]
mov edx, ecx
mov edi, esi
test edx, edx
jne 0x504e10
test eax, eax
je 0x504ea2
test edx, edx
mov esi, eax
cmovne esi, edi
test esi, esi
je 0x504e67
nop dword [eax + eax]
mov eax, dword [esi + 4]
mov dword [ebx + 0xc], eax
mov ecx, dword [esi]
test ecx, ecx
je 0x504e4b
mov eax, dword [ecx]
call dword [eax + 4]
mov edi, dword [esi]
mov ecx, edi
push 0
mov eax, dword [edi]
call dword [eax]
push edi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebx + 0xc]
mov esi, eax
test eax, eax
jne 0x504e20
mov ecx, dword [ebx + 0x18]
test ecx, ecx
je 0x504e00
nop dword [eax + eax]
mov esi, dword [ebx + 0x14]
mov esi, dword [esi]
mov ecx, dword [esi + 0x14]
test ecx, ecx
je 0x504e89
mov edx, dword [esi + 0x1c]
test edx, edx
je 0x504e89
mov eax, dword [ecx]
push edx
call dword [eax + 4]
push esi
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x14]
call fcn.00503ff0
mov ecx, dword [ebx + 0x18]
test ecx, ecx
jne 0x504e70
jmp 0x504df4
push 0x503e50
push 0x5b2884
call fcn.00503c40
mov eax, dword [0x5a5700]
add esp, 8
cmp eax, 0xffffffff
je 0x504ec7
push 0
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov dword [ebp - 4], 1
test ebx, ebx
je 0x504ef4
or eax, 0xffffffff
lock xadd dword [ebx + 4], eax
jne 0x504ef4
mov eax, dword [ebx]
mov ecx, ebx
push 0
call dword [eax]
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
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 0x505120
Capabilities:
Create thread
Resume thread

Disassembly:
push ebx
push esi
mov esi, ecx
mov edx, dword [esi]
lea eax, [edx + 0x10]
push eax
push 4
push edx
push 0x505180
push 0
push 0
call fcn.005100ef
mov ebx, eax
add esp, 0x18
test ebx, ebx
jne 0x505149
pop esi
xor al, al
pop ebx
ret
mov eax, dword [esi]
push edi
add eax, 4
lock inc dword [eax]
mov edi, dword [esi]
mov eax, dword [edi + 8]
test eax, eax
je 0x505167
cmp eax, 0xffffffff
je 0x505167
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 8], ebx
mov eax, dword [esi]
push dword [eax + 8]
call dword [sym.imp.KERNEL32.dll_ResumeThread]
pop edi
pop esi
mov al, 1
pop ebx
ret

Function at 0x522009
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
mov eax, 0x101c
call fcn.004a22e0
mov eax, dword [0x5a5014]
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.0052659d
pop ecx
mov ecx, dword [ebp + 8]
mov ebx, eax
cmp dword [ecx + 8], 0
jne 0x52204b
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
jmp 0x5221a7
mov eax, dword [ecx]
sub eax, dword [ecx + 4]
push esi
push edi
push 0
cdq
push 2
push edx
push eax
call fcn.00535640
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 + 0x5b2e28]
push dword [eax + edi + 0x24]
push dword [eax + edi + 0x20]
push ebx
call fcn.0052b79c
mov ecx, dword [esi*4 + 0x5b2e28]
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 0x5221a0
cmp eax, dword [ecx + edi + 0x24]
jne 0x5221a0
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 0x5221a0
push dword [ebp - 0x100c]
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push ebx
call fcn.0052b79c
add esp, 0x14
test edx, edx
jl 0x5221a0
jg 0x522116
test eax, eax
jb 0x5221a0
mov ebx, dword [ebp - 0x1018]
mov eax, dword [ebp - 0x1014]
test ebx, ebx
jg 0x5221a0
jl 0x522130
cmp dword [ebp - 0x1008], eax
ja 0x5221a0
lea edi, [ebp - 0x1004]
xor edx, edx
add edi, eax
lea ecx, [ebp - 0x1004]
xor esi, esi
cmp dword [ebp - 0x1008], edx
jne 0x52214e
test ebx, ebx
je 0x522187
cmp ecx, edi
jae 0x522187
mov al, byte [ecx]
cmp al, 0xd
jne 0x522168
lea eax, [edi - 1]
cmp ecx, eax
jae 0x522174
cmp byte [ecx + 1], 0xa
jne 0x522174
inc ecx
jmp 0x522174
movzx eax, al
movsx eax, byte [eax + 0x5a5b48]
add ecx, eax
add esi, 1
adc edx, 0
inc ecx
cmp esi, dword [ebp - 0x1008]
jne 0x52214e
cmp edx, ebx
jne 0x52214e
lea eax, [ebp - 0x1004]
sub ecx, eax
mov eax, ecx
cdq
add eax, dword [ebp - 0x1010]
adc edx, dword [ebp - 0x101c]
jmp 0x5221a5
or edx, 0xffffffff
mov eax, edx
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop ebx
call fcn.004a1084
leave
ret
Function at 0x52475b
Capabilities:
Allocate thread local storage

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56a93c
push 0x56a934
push str.FlsAlloc
push 0x1f
call fcn.00524586
mov esi, eax
add esp, 0x10
test esi, esi
je 0x52478f
push dword [ebp + 8]
mov ecx, esi
call dword [0x560334]
call esi
jmp 0x524795
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
pop esi
pop ebp
ret 4

Function at 0x5247d9
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56a94c
push 0x56a944
push str.FlsGetValue
push 0x21
call fcn.00524586
mov esi, eax
add esp, 0x10
test esi, esi
je 0x524810
push dword [ebp + 8]
mov ecx, esi
call dword [0x560334]
call esi
pop esi
pop ebp
ret 4
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsGetValue]

Function at 0x524818
Capabilities:
Set thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
push esi
push 0x56a954
push 0x56a94c
push str.FlsSetValue
push 0x22
call fcn.00524586
mov esi, eax
add esp, 0x10
test esi, esi
je 0x524852
push dword [ebp + 0xc]
mov ecx, esi
push dword [ebp + 8]
call dword [0x560334]
call esi
pop esi
pop ebp
ret 8
pop esi
pop ebp
jmp dword [sym.imp.KERNEL32.dll_TlsSetValue]
Function at 0x52ac34
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 + 0x5b2e28]
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 0x52ac74
cmp byte [ebx], 0xa
jne 0x52ac74
or byte [edi + eax + 0x28], 4
jmp 0x52ac79
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 0x52ad78
mov dl, byte [eax]
cmp dl, 0x1a
je 0x52ad5b
inc eax
cmp dl, 0xd
je 0x52aca5
mov dword [ebp - 8], eax
mov byte [esi], dl
jmp 0x52accb
cmp eax, ecx
jae 0x52acd9
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 0x52ac8d
jmp 0x52ad78
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 0x52ad56
cmp dword [ebp - 0x10], 0
je 0x52ad56
mov ecx, dword [ebp - 0xc]
mov eax, dword [ecx*4 + 0x5b2e28]
test byte [eax + edi + 0x28], 0x48
je 0x52ad30
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x52ad1b
mov byte [esi], dl
jmp 0x52ad2c
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x5b2e28]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x52ad78
cmp byte [ebp - 1], 0xa
jne 0x52ad3f
cmp esi, ebx
jne 0x52ad3f
mov byte [esi], 0xa
jmp 0x52ad77
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0052b7ba
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x52ad78
mov byte [esi], 0xd
jmp 0x52ad77
mov ecx, dword [ebp - 0xc]
mov ecx, dword [ecx*4 + 0x5b2e28]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x52ad75
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x52ad78
mov byte [esi], dl
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret