joyce8/EMBER2024-capa huggingface dataset:
Function at 0x506000
Capabilities:
Access peb ldr_data
Get kernel32 base address

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x14
mov esi, ecx
mov eax, dword [ebp + 8]
lea ecx, [ebp - 0x18]
mov dword [ecx - 4], esp
mov dword [ecx + 8], 0xffffffff
mov dword [ecx + 4], 0x4c6100
mov edx, dword fs:[0]
mov dword [ecx], edx
mov dword fs:[0], ecx
mov dword [esi + 0x18], eax
xor ecx, ecx
test eax, eax
sete cl
mov dword [esi + 0x10], ecx
xor eax, eax
mov dword [esi + 0x14], eax
mov dword [esi + 4], 0x1002
mov dword [esi + 0xc], eax
mov dword [esi + 8], 6
xorps xmm0, xmm0
movups xmmword [esi + 0x20], xmm0
movups xmmword [esi + 0x30], xmm0
mov dword [esi + 0x44], eax
mov dword [esi + 0x40], eax
mov eax, dword [0x6be6d4]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x5060a4
mov eax, dword [0x6be6d0]
mov eax, dword [eax]
mov dword [esi + 0x1c], eax
lock inc dword [eax + 4]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x14
pop esi
pop edi
pop ebx
pop ebp
ret 4
push 0x6be6d4
call fcn.00510c6d
add esp, 4
cmp dword [0x6be6d4], 0xffffffff
jne 0x506083
mov eax, dword [0x6be6c8]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x506100
mov eax, dword [0x6be6c4]
mov eax, dword [eax]
mov dword [0x6be6cc], eax
lock inc dword [eax + 4]
mov dword [0x6be6d0], 0x6be6cc
push 0x6be6d4
call fcn.00510d9d
add esp, 4
jmp 0x506083
push 0x6be6c8
call fcn.00510c6d
add esp, 4
cmp dword [0x6be6c8], 0xffffffff
jne 0x5060d7
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x10], 0
mov ecx, 0x6bed08
push 1
call fcn.00413900
mov dword [0x6be6c0], 0x6bed08
mov dword [0x6be6c4], 0x6be6c0
push 0x6be6c8
call fcn.00510d9d
add esp, 4
mov esi, dword [ebp - 0x20]
jmp 0x5060d7
Function at 0x50a500
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov ebx, dword [ebp + 8]
cmp dword [ecx], ebx
jne 0x50a51a
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret 4
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi]
inc eax
cmp eax, 2
jae 0x50a544
lea eax, [ebx + 1]
cmp eax, 2
jb 0x50a53b
mov dword [esi], ebx
call fcn.004ee180
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x50a510
call fcn.004ee180
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
cmp dword [0x6cebf0], 0
je 0x50a57d
mov eax, dword [0x6cebf0]
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
call dword [section..00cfg]
mov ecx, dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [ebp - 0x10]
mov dword [esi], 0
jmp 0x50a52c
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x5e3e9d
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x50a5b3
mov ecx, eax
cmp eax, sym.360se.exe_GetHandleVerifier
je 0x50a5b8
call dword [section..00cfg]
call ecx
push 0
push eax
call fcn.00415e60
add esp, 8
jmp 0x50a557
xor eax, eax
push eax
jmp 0x50a5a8
push 1
push 0
jmp 0x50a5a9

Function at 0x50b4b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
mov eax, dword [0x6ceb98]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x50b536
mov esi, dword [ebp + 8]
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edi, edi
and eax, 0xfffffffc
je 0x50b4fd
mov ecx, dword [0x6ceb90]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x6ceb94]
jne 0x50b4fd
mov edi, dword [eax + ecx*8]
mov byte [esi], 0
mov eax, edi
shr eax, 0xe
mov ecx, edi
shr ecx, 0x13
mov ecx, dword [ecx*4 + 0x6c24fc]
bt ecx, eax
jb 0x50b52b
mov eax, edi
shr eax, 0x15
mov byte [eax + 0x6ca4fc], 1
mov dword [esi + 4], edi
mov eax, esi
pop esi
pop edi
pop ebp
ret
push edi
call fcn.004e3a80
add esp, 4
jmp 0x50b522
push 0x6ceb98
call fcn.00510c6d
add esp, 4
cmp dword [0x6ceb98], 0xffffffff
jne 0x50b4d2
xor eax, eax
mov dword [0x6ceb94], eax
mov dword [0x6ceb90], 0xffffffff
mov ecx, 0x6ceb90
push eax
call fcn.0040c200
push 0x6ceb98
call fcn.00510d9d
add esp, 4
jmp 0x50b4d2
Function at 0x50b970
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0xc
mov esi, ecx
mov ebx, dword [ebp + 8]
mov dword [ecx], 0
test ebx, ebx
jne 0x50b9a6
mov byte [esi + 4], 0
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
cmp eax, ebx
je 0x50ba3d
mov eax, esi
add esp, 0xc
pop esi
pop edi
pop ebx
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [esi]
inc eax
cmp eax, 2
jae 0x50b9ce
lea eax, [ebx + 1]
cmp eax, 2
jb 0x50b9c5
mov dword [esi], ebx
call fcn.004ee180
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x50b988
call fcn.004ee180
mov eax, dword [esi]
mov dword [ebp - 0x18], eax
cmp dword [0x6cebf0], 0
je 0x50ba07
mov eax, dword [0x6cebf0]
mov dword [ebp - 0x14], eax
mov eax, dword [eax]
mov ecx, dword [eax]
mov dword [ebp - 0x10], ecx
call dword [section..00cfg]
mov ecx, dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [ebp - 0x10]
mov dword [esi], 0
jmp 0x50b9b6
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
push 0x5e3e9d
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x50ba40
mov ecx, eax
cmp eax, sym.360se.exe_GetHandleVerifier
je 0x50ba45
call dword [section..00cfg]
call ecx
push 0
push eax
call fcn.00415e60
add esp, 8
jmp 0x50b9e1
int3
xor eax, eax
push eax
jmp 0x50ba32
push 1
push 0
jmp 0x50ba33
Function at 0x50d630
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
push eax
mov esi, ecx
mov eax, dword [0x6cf570]
mov ecx, dword [0x5f75b4]
mov edx, dword fs:[0x2c]
mov ecx, dword [edx + ecx*4]
cmp eax, dword [ecx + 4]
jg 0x50d68d
push dword [0x5f50f8]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
and eax, 0xfffffffc
je 0x50d685
mov ecx, dword [0x6cf568]
mov edx, dword [eax + ecx*8 + 4]
cmp edx, dword [0x6cf56c]
jne 0x50d685
mov edi, dword [eax + ecx*8]
test edi, edi
je 0x50d685
cmp byte [esi], 0
jne 0x50d6ce
add esp, 4
pop esi
pop edi
pop ebx
pop ebp
ret
push 0x6cf570
call fcn.00510c6d
add esp, 4
cmp dword [0x6cf570], 0xffffffff
jne 0x50d656
xor eax, eax
mov dword [0x6cf56c], eax
mov dword [0x6cf568], 0xffffffff
mov ecx, 0x6cf568
push eax
call fcn.0040c200
push 0x6cf570
call fcn.00510d9d
add esp, 4
jmp 0x50d656
movq xmm0, qword [edi]
pshufd xmm0, xmm0, 0x55
movd eax, xmm0
test eax, eax
js 0x50d770
cmp dword [edi + 0x14], 1
jne 0x50d70a
cmp dword [edi + 8], 0
jne 0x50d7ad
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov ecx, edx
and ecx, 0xbfffffff
mov ebx, eax
lock cmpxchg8b qword [edi]
jne 0x50d6f8
jmp 0x50d730
cmp byte [esi + 0x10], 0
je 0x50d730
cmp dword [edi + 8], 0
jne 0x50d7df
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov ecx, edx
mov ebx, 0x40000000
or ecx, ebx
mov ebx, eax
lock cmpxchg8b qword [edi]
jne 0x50d71f
mov ebx, dword [esi + 8]
mov esi, dword [esi + 0xc]
cmp dword [edi + 8], 0
jne 0x50d77a
movq xmm0, qword [edi]
pshufd xmm0, xmm0, 0x55
movd eax, xmm0
mov ecx, 0x40000000
and eax, ecx
and esi, 0xffffff
or esi, eax
movd xmm0, esi
movd xmm1, ebx
punpckldq xmm1, xmm0
movq qword [edi], xmm1
dec dword [edi + 0x14]
jmp 0x50d685
call fcn.00590c20
jmp 0x50d6e3
lea ecx, [edi + 8]
movq xmm0, qword [edi]
pshufd xmm0, xmm0, 0x55
movd dword [ebp - 0x10], xmm0
call fcn.00590c50
mov ecx, dword [ebp - 0x10]
and ecx, 0xff000000
or ecx, edx
movd xmm0, ecx
movd xmm1, eax
punpckldq xmm1, xmm0
movq qword [edi], xmm1
jmp 0x50d73c
lea ecx, [edi + 8]
movq xmm0, qword [edi]
pshufd xmm0, xmm0, 0x55
movd ebx, xmm0
call fcn.00590c50
and ebx, 0xff000000
or ebx, edx
movd xmm0, ebx
movd xmm1, eax
punpckldq xmm1, xmm0
movq qword [edi], xmm1
jmp 0x50d6f3
lea ecx, [edi + 8]
movq xmm0, qword [edi]
pshufd xmm0, xmm0, 0x55
movd ebx, xmm0
call fcn.00590c50
and ebx, 0xff000000
or ebx, edx
movd xmm0, ebx
movd xmm1, eax
punpckldq xmm1, xmm0
movq qword [edi], xmm1
jmp 0x50d71a
Function at 0x50e490
Capabilities:
Encode data using xor
Hash data using murmur2

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
mov eax, dword [ebp + 8]
movzx ebx, byte [eax + 0xb]
test bl, bl
jns 0x50e4a8
mov ebx, dword [eax + 4]
mov eax, dword [eax]
jmp 0x50e4ab
and ebx, 0x7f
cmp ebx, 4
jb 0x50e570
lea edx, [ebx - 4]
test dl, 4
jne 0x50e4de
imul ecx, dword [eax], 0x5bd1e995
mov esi, ecx
shr esi, 0x18
xor esi, ecx
imul esi, esi, 0x5bd1e995
imul ecx, ebx, 0x5bd1e995
xor ecx, esi
add eax, 4
mov ebx, edx
jmp 0x50e4e0
mov ecx, ebx
cmp edx, 4
jb 0x50e529
mov edx, ebx
imul esi, dword [eax], 0x5bd1e995
mov edi, esi
shr edi, 0x18
xor edi, esi
imul esi, edi, 0x5bd1e995
imul ecx, ecx, 0x5bd1e995
xor ecx, esi
imul esi, dword [eax + 4], 0x5bd1e995
mov edi, esi
shr edi, 0x18
xor edi, esi
imul esi, edi, 0x5bd1e995
imul ecx, ecx, 0x5bd1e995
xor ecx, esi
add eax, 8
add edx, 0xfffffff8
cmp edx, 3
ja 0x50e4e7
cmp edx, 2
je 0x50e541
cmp edx, 1
je 0x50e54a
cmp edx, 3
jne 0x50e555
movzx edx, byte [eax + 2]
shl edx, 0x10
xor ecx, edx
movzx edx, byte [eax + 1]
shl edx, 8
xor ecx, edx
movzx eax, byte [eax]
xor eax, ecx
imul ecx, eax, 0x5bd1e995
mov eax, ecx
shr eax, 0xd
xor eax, ecx
imul ecx, eax, 0x5bd1e995
mov eax, ecx
shr eax, 0xf
xor eax, ecx
pop esi
pop edi
pop ebx
pop ebp
ret 4
mov ecx, ebx
mov edx, ebx
jmp 0x50e529
Function at 0x50f0e0
Capabilities:
Encode data using xor
Encrypt data using des

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 8
mov dword [ebp - 0x10], ecx
mov edi, dword [edx]
mov esi, dword [edx + 4]
bswap edi
bswap esi
mov eax, edi
shr eax, 4
xor eax, esi
and eax, 0xf0f0f0f
xor esi, eax
shl eax, 4
xor eax, edi
mov edi, eax
shr edi, 0x10
movzx edx, si
xor edx, edi
xor esi, edx
shl edx, 0x10
xor edx, eax
mov eax, esi
shr eax, 2
xor eax, edx
and eax, 0x33333333
xor edx, eax
shl eax, 2
xor eax, esi
mov esi, eax
shr esi, 8
xor esi, edx
and esi, 0xff00ff
xor edx, esi
shl esi, 8
xor esi, eax
rol esi, 1
mov ebx, esi
xor ebx, edx
and ebx, 0xaaaaaaaa
xor edx, ebx
xor ebx, esi
rol edx, 1
xor esi, esi
nop word cs:[eax + eax]
mov edi, ebx
mov dword [ebp - 0x14], ebx
rol edi, 0x1c
mov ecx, dword [ebp - 0x10]
xor edi, dword [ecx + esi]
mov eax, edi
and eax, 0x3f
mov ebx, edi
shr ebx, 6
and ebx, 0xfc
mov ebx, dword [ebx + 0x5e2760]
or ebx, dword [eax*4 + 0x5e2660]
mov eax, edi
shr eax, 0xe
and eax, 0xfc
or ebx, dword [eax + 0x5e2860]
shr edi, 0x16
and edi, 0xfc
or ebx, dword [edi + 0x5e2960]
mov edi, dword [ecx + esi + 4]
xor edi, dword [ebp - 0x14]
mov eax, edi
and eax, 0x3f
or ebx, dword [eax*4 + 0x5e2a60]
mov eax, edi
shr eax, 6
and eax, 0xfc
or ebx, dword [eax + 0x5e2b60]
mov eax, edi
shr eax, 0xe
and eax, 0xfc
or ebx, dword [eax + 0x5e2c60]
shr edi, 0x16
and edi, 0xfc
or ebx, dword [edi + 0x5e2d60]
xor edx, ebx
mov edi, edx
rol edi, 0x1c
mov ecx, edx
mov edx, dword [ebp - 0x10]
xor edi, dword [edx + esi + 8]
mov eax, edi
and eax, 0x3f
mov ebx, edi
shr ebx, 6
and ebx, 0xfc
mov ebx, dword [ebx + 0x5e2760]
or ebx, dword [eax*4 + 0x5e2660]
mov eax, edi
shr eax, 0xe
and eax, 0xfc
or ebx, dword [eax + 0x5e2860]
shr edi, 0x16
and edi, 0xfc
or ebx, dword [edi + 0x5e2960]
mov edi, dword [edx + esi + 0xc]
mov edx, ecx
xor edi, ecx
mov eax, edi
and eax, 0x3f
or ebx, dword [eax*4 + 0x5e2a60]
mov eax, edi
shr eax, 6
and eax, 0xfc
or ebx, dword [eax + 0x5e2b60]
mov eax, edi
shr eax, 0xe
and eax, 0xfc
or ebx, dword [eax + 0x5e2c60]
shr edi, 0x16
and edi, 0xfc
or ebx, dword [edi + 0x5e2d60]
xor ebx, dword [ebp - 0x14]
add esi, 0x10
cmp esi, 0x80
jne 0x50f160
ror ebx, 1
mov esi, ebx
xor esi, edx
and esi, 0xaaaaaaaa
mov ecx, esi
xor ecx, edx
xor esi, ebx
shrd ecx, edx, 1
mov eax, ecx
shr eax, 8
xor eax, esi
and eax, 0xff00ff
xor esi, eax
shl eax, 8
xor eax, ecx
mov ecx, eax
shr ecx, 2
xor ecx, esi
and ecx, 0x33333333
xor esi, ecx
shl ecx, 2
xor ecx, eax
mov edx, esi
shr edx, 0x10
movzx eax, cx
xor eax, edx
xor ecx, eax
shl eax, 0x10
xor eax, esi
mov edx, eax
shr edx, 4
xor edx, ecx
and edx, 0xf0f0f0f
xor ecx, edx
shl edx, 4
xor edx, eax
mov eax, edx
shr eax, 0x18
mov esi, dword [ebp + 8]
mov byte [esi], al
mov eax, edx
shr eax, 0x10
mov byte [esi + 1], al
mov byte [esi + 2], dh
mov byte [esi + 3], dl
mov eax, ecx
shr eax, 0x18
mov byte [esi + 4], al
mov eax, ecx
shr eax, 0x10
mov byte [esi + 5], al
mov byte [esi + 6], ch
mov byte [esi + 7], cl
add esp, 8
pop esi
pop edi
pop ebx
pop ebp
ret
Function at 0x51458c
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
push edi
xor edi, edi
push edi
push edi
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
je 0x5145db
mov esi, dword [ebp + 0x18]
lea eax, [ebp + 0x10]
push edi
push eax
push esi
push dword [ebp + 0x14]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x5145db
cmp esi, dword [ebp + 0x10]
je 0x5145d6
push 0x5b05c0
push 1
push edi
push edi
call fcn.0051348d
jmp 0x5145e9
xor eax, eax
inc eax
jmp 0x5145ee
mov eax, 0x5b05c0
push eax
push eax
push edi
push edi
call fcn.00513470
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebp
ret

Function at 0x5147ce
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
jne 0x5147f8
mov eax, 0x5b05c0
push eax
push eax
push 0
push 0
call fcn.00513470
add esp, 0x10
xor eax, eax
pop ebp
ret
xor eax, eax
inc eax
pop ebp
ret
Function at 0x5157dd
Capabilities:
Hash data with md5

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
and dword [eax + 0x14], 0
and dword [eax + 0x10], 0
mov dword [eax], 0x67452301
mov dword [eax + 4], 0xefcdab89
mov dword [eax + 8], 0x98badcfe
mov dword [eax + 0xc], 0x10325476
pop ebp
ret

Function at 0x51624c
Capabilities:
Hash data using sha256

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
and dword [eax + 0x20], 0
and dword [eax + 0x24], 0
mov dword [eax], 0x6a09e667
mov dword [eax + 4], 0xbb67ae85
mov dword [eax + 8], 0x3c6ef372
mov dword [eax + 0xc], 0xa54ff53a
mov dword [eax + 0x10], 0x510e527f
mov dword [eax + 0x14], 0x9b05688c
mov dword [eax + 0x18], 0x1f83d9ab
mov dword [eax + 0x1c], 0x5be0cd19
pop ebp
ret

Function at 0x5169a0
Capabilities:
Check mutex on windows

Disassembly:
push 0xa4
mov eax, 0x5ae9dd
call fcn.0051708b
mov esi, ecx
mov dword [ebp - 0xa0], esi
xor ebx, ebx
mov dword [esi], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
push str.1830B7BD_F7A3_4c4d_989B_C004DE465EDE
push str._s__u
push 0x41
lea eax, [ebp - 0x98]
push eax
call fcn.005167b2
add esp, 0x14
xor eax, eax
mov word [ebp - 0x18], ax
lea eax, [ebp - 0x98]
push eax
push 1
push ebx
call dword [sym.imp.KERNEL32.dll_CreateMutexW]
mov edi, eax
mov dword [ebp - 0x9c], edi
test edi, edi
je 0x516aec
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x516a19
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov dword [ebp - 4], ebx
call fcn.0051684e
test eax, eax
je 0x516a4e
mov dword [esi], eax
mov eax, dword [esi]
inc dword [eax + 0x5bc]
or dword [ebp - 4], 0xffffffff
push edi
call dword [sym.imp.KERNEL32.dll_ReleaseMutex]
test ebx, ebx
jne 0x516aec
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x516aec
push 0x5c0
call fcn.00516e00
pop ecx
mov dword [ebp - 0xac], eax
mov byte [ebp - 4], 1
test eax, eax
je 0x516a71
push edi
mov ecx, eax
call fcn.00516d06
jmp 0x516a73
mov eax, ebx
mov byte [ebp - 4], bl
mov dword [esi], eax
test eax, eax
je 0x516af4
xor ebx, ebx
inc ebx
mov dword [ebp - 0xb0], ebx
push eax
call fcn.005168c7
pop ecx
test eax, eax
jne 0x516a27
mov dword [ebp - 0xa8], 3
push 0x5f21c4
lea eax, [ebp - 0xa8]
jmp 0x516b09
mov eax, esi
call fcn.005170d8
ret
mov dword [ebp - 0xa4], 1
push 0x5f21c4
lea eax, [ebp - 0xa4]
push eax
call fcn.0051822c
int3
Function at 0x516c5f
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
mov ebx, ecx
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
mov ecx, dword [ebx]
add ecx, 8
mov dword [ebp - 4], eax
mov eax, dword [ecx + 0x5a8]
mov dword [ecx + 0x5b0], eax
call fcn.00516f84
mov edi, eax
test edi, edi
je 0x516cea
mov eax, dword [ebp - 4]
cmp eax, dword [edi]
jne 0x516c9a
mov esi, edi
jmp 0x516cd6
push dword [edi]
push 1
push 0x40
call dword [sym.imp.KERNEL32.dll_OpenThread]
test eax, eax
jne 0x516ccf
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x516cc2
mov ecx, dword [ebx]
push edi
add ecx, 8
call fcn.00516f4f
jmp 0x516cd6
push 0x5b0a80
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x516cd6
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebx]
add ecx, 8
call fcn.00516f84
mov edi, eax
test edi, edi
jne 0x516c8f
test esi, esi
jne 0x516cff
mov ecx, dword [ebx]
add ecx, 8
call fcn.00516ea0
mov esi, eax
test esi, esi
je 0x516cff
mov eax, dword [ebp - 4]
mov dword [esi], eax
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret

Function at 0x516d06
Capabilities:
Allocate thread local storage

Disassembly:
push 4
mov eax, 0x5aea1b
call fcn.00517022
mov esi, ecx
mov dword [ebp - 0x10], esi
and dword [esi], 0
lea ecx, [esi + 8]
or dword [esi + 4], 0xffffffff
call fcn.00516e67
and dword [ebp - 4], 0
and dword [esi + 0x5bc], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [esi + 4], eax
cmp eax, 0xffffffff
je 0x516d52
mov eax, dword [ebp + 8]
mov dword [esi], eax
or dword [ebp - 4], 0xffffffff
mov eax, esi
call fcn.005170c4
ret 4
push 0x5f21c4
lea eax, [ebp + 8]
mov dword [ebp + 8], 2
push eax
call fcn.0051822c
int3
Function at 0x52ca01
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 + 0x5f8108]
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 0x52ca41
cmp byte [ebx], 0xa
jne 0x52ca41
or byte [eax + edi + 0x28], 4
jmp 0x52ca46
and byte [eax + edi + 0x28], 0xfb
add ecx, ebx
mov edx, ebx
mov dword [ebp - 0xc], ecx
mov esi, ebx
cmp ebx, ecx
jae 0x52cb44
mov al, byte [edx]
cmp al, 0x1a
je 0x52cb26
lea ecx, [edx + 1]
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 0xc]
cmp al, 0xd
je 0x52ca75
mov edx, dword [ebp - 8]
mov byte [esi], al
jmp 0x52ca9a
mov eax, dword [ebp - 8]
cmp eax, ecx
jae 0x52caa4
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 0x52ca57
jmp 0x52cb44
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 0x52cb21
cmp dword [ebp - 0xc], 0
je 0x52cb21
mov ecx, dword [ebp - 0x10]
mov eax, dword [ecx*4 + 0x5f8108]
test byte [eax + edi + 0x28], 0x48
je 0x52cafb
mov dl, byte [ebp - 1]
lea eax, [esi + 1]
mov dword [ebp - 0x14], eax
cmp dl, 0xa
jne 0x52cae6
mov byte [esi], dl
jmp 0x52caf7
mov byte [esi], 0xd
mov eax, dword [ecx*4 + 0x5f8108]
mov byte [eax + edi + 0x2a], dl
mov eax, dword [ebp - 0x14]
mov esi, eax
jmp 0x52cb44
cmp byte [ebp - 1], 0xa
jne 0x52cb0a
cmp esi, ebx
jne 0x52cb0a
mov byte [esi], 0xa
jmp 0x52cb43
push 1
push 0xffffffffffffffff
push 0xffffffffffffffff
push dword [ebp + 8]
call fcn.0052bbb6
add esp, 0x10
cmp byte [ebp - 1], 0xa
je 0x52cb44
mov byte [esi], 0xd
jmp 0x52cb43
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx*4 + 0x5f8108]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x52cb40
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x52cb44
mov byte [esi], 0x1a
inc esi
sub esi, ebx
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret
Function at 0x52cb4d
Capabilities:
Read file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x18
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ebx, eax
and eax, 0x3f
sar ebx, 6
push edi
imul edi, eax, 0x38
push 0xa
mov eax, dword [ebx*4 + 0x5f8108]
pop edx
mov dword [ebp - 0x14], edx
mov ecx, dword [edi + eax + 0x18]
mov dword [ebp - 0x18], ecx
mov ecx, dword [ebp + 0x10]
test ecx, ecx
je 0x52cb90
cmp word [esi], dx
jne 0x52cb90
or byte [edi + eax + 0x28], 4
jmp 0x52cb95
and byte [edi + eax + 0x28], 0xfb
lea edx, [esi + ecx*2]
mov eax, esi
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
cmp eax, edx
jae 0x52ccce
mov dword [ebp - 0xc], 0xd
movzx ecx, word [eax]
mov edx, ecx
mov dword [ebp - 0x10], edx
push 0x1a
pop edx
cmp cx, dx
mov edx, dword [ebp - 8]
je 0x52ccae
add eax, 2
cmp cx, word [ebp - 0xc]
je 0x52cbd7
mov dword [ebp - 4], eax
mov word [esi], cx
jmp 0x52cc0d
cmp eax, edx
jae 0x52cc19
movzx eax, word [eax]
xor ecx, ecx
cmp ax, word [ebp - 0x14]
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 - 8]
sete al
dec eax
and eax, 3
add eax, ecx
mov word [esi], ax
mov eax, dword [ebp - 4]
add esi, 2
cmp eax, edx
jb 0x52cbaf
jmp 0x52ccce
push 0
lea eax, [ebp - 0x14]
push eax
push 2
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x52ccaa
cmp dword [ebp - 0x14], 0
je 0x52ccaa
mov eax, dword [ebx*4 + 0x5f8108]
push 0xa
test byte [edi + eax + 0x28], 0x48
je 0x52cc82
mov cx, word [ebp - 4]
pop eax
cmp cx, ax
je 0x52ccc8
push 0xd
pop eax
mov word [esi], ax
mov eax, dword [ebx*4 + 0x5f8108]
push 0xa
mov byte [edi + eax + 0x2a], cl
mov eax, dword [ebx*4 + 0x5f8108]
shr cx, 8
mov byte [edi + eax + 0x2b], cl
mov eax, dword [ebx*4 + 0x5f8108]
pop ecx
mov byte [edi + eax + 0x2c], cl
jmp 0x52cccb
pop ebx
cmp word [ebp - 4], bx
jne 0x52cc93
cmp esi, dword [ebp + 0xc]
jne 0x52cc93
mov word [esi], bx
jmp 0x52cccb
push 1
push 0xffffffffffffffff
push 0xfffffffffffffffe
push dword [ebp + 8]
call fcn.0052bbb6
add esp, 0x10
cmp word [ebp - 4], bx
je 0x52ccce
push 0xd
jmp 0x52ccc7
mov ecx, dword [ebx*4 + 0x5f8108]
mov al, byte [ecx + edi + 0x28]
test al, 0x40
jne 0x52ccc5
or al, 2
mov byte [ecx + edi + 0x28], al
jmp 0x52ccce
push 0x1a
pop eax
mov word [esi], ax
add esi, 2
sub esi, dword [ebp + 0xc]
and esi, 0xfffffffe
pop edi
mov eax, esi
pop esi
pop ebx
leave
ret