joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f8e80
Capabilities:
Read file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x4f8f1e
mov eax, dword [esi + 0x14]
test eax, eax
jne 0x4f8f16
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4f8eb9
mov al, byte [esi + 0x1c]
mov dword [esi + 0x20], 0
mov byte [esp + 0xc], al
mov eax, dword [esp + 0xc]
and eax, 0xff
pop esi
pop ecx
ret
mov eax, dword [esi + 4]
test eax, eax
je 0x4f8ee3
cmp eax, 0xffffffff
je 0x4f8ecf
mov ecx, dword [esi + 8]
mov eax, dword [esi + 0xc]
cmp ecx, eax
jge 0x4f8f16
mov ecx, dword [esi + 8]
mov edx, dword [esi]
xor eax, eax
mov al, byte [ecx + edx]
inc ecx
mov dword [esi + 0x1c], eax
mov dword [esi + 8], ecx
pop esi
pop ecx
ret
mov edx, dword [esi + 0x10]
lea eax, [esp + 4]
push 0
push eax
lea ecx, [esp + 0x14]
push 1
push ecx
push edx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x4f8f16
mov eax, dword [esp + 4]
test eax, eax
je 0x4f8f16
mov eax, dword [esp + 0xc]
and eax, 0xff
mov dword [esi + 0x1c], eax
pop esi
pop ecx
ret
mov eax, 0xffffff69
mov dword [esi + 0x18], eax
pop esi
pop ecx
ret

Function at 0x4f8f30
Capabilities:
Write file on windows

Disassembly:
mov cl, byte [esp + 8]
push esi
mov esi, dword [esp + 8]
mov byte [esp + 0xc], cl
mov eax, dword [esi + 0x18]
test eax, eax
jne 0x4f8fdd
mov eax, dword [esi + 0x14]
test eax, eax
je 0x4f8f5a
mov eax, dword [esi + 8]
inc eax
mov dword [esi + 8], eax
xor eax, eax
pop esi
ret
mov eax, dword [esi + 0x20]
test eax, eax
je 0x4f8f73
mov eax, dword [esi + 8]
test eax, eax
je 0x4f8f73
dec eax
mov dword [esi + 0x20], 0
mov dword [esi + 8], eax
mov eax, dword [esi + 4]
test eax, eax
je 0x4f8fad
cmp eax, 0xffffffff
je 0x4f8f8e
cmp dword [esi + 8], eax
jl 0x4f8f8e
mov eax, 0xffffff6a
mov dword [esi + 0x18], eax
pop esi
ret
mov eax, dword [esi]
mov edx, dword [esi + 8]
mov byte [eax + edx], cl
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0xc]
inc edx
mov eax, edx
mov dword [esi + 8], edx
cmp ecx, eax
jge 0x4f8fa9
mov dword [esi + 0xc], eax
xor eax, eax
pop esi
ret
mov edx, dword [esi + 0x10]
lea eax, [esp + 8]
push 0
push eax
lea ecx, [esp + 0x14]
push 1
push ecx
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x4f8fd5
mov eax, dword [esp + 8]
test eax, eax
je 0x4f8fd5
xor eax, eax
pop esi
ret
mov eax, 0xffffff36
mov dword [esi + 0x18], eax
pop esi
ret
Function at 0x4f9010
Capabilities:
Read file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
push edi
mov eax, dword [ebx + 0x18]
mov edi, dword [esp + 0x14]
test eax, eax
jne 0x4f90ec
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4f9039
mov eax, 0xffffff69
pop edi
mov dword [ebx + 0x18], eax
pop ebp
pop ebx
ret
mov ebp, dword [esp + 0x18]
test ebp, ebp
jne 0x4f9047
pop edi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [ebx + 0x20]
test eax, eax
je 0x4f9064
mov al, byte [ebx + 0x1c]
mov byte [edi], al
inc edi
dec ebp
mov dword [ebx + 0x20], 0
jne 0x4f9064
pop edi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, dword [ebx + 4]
test eax, eax
je 0x4f90c1
cmp eax, 0xffffffff
je 0x4f909a
mov ecx, dword [ebx + 8]
mov eax, dword [ebx + 0xc]
add ecx, ebp
cmp ecx, eax
jle 0x4f909a
mov ecx, ebp
xor eax, eax
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, 0xffffff69
pop edi
mov dword [ebx + 0x18], eax
pop ebp
pop ebx
ret
mov eax, dword [ebx + 8]
push esi
mov esi, dword [ebx]
mov ecx, ebp
add esi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 8]
pop esi
add eax, ebp
pop edi
mov dword [ebx + 8], eax
pop ebp
xor eax, eax
pop ebx
ret
mov edx, dword [ebx + 0x10]
lea ecx, [esp + 0x14]
push 0
push ecx
push ebp
push edi
push edx
call dword [sym.imp.kernel32.dll_ReadFile]
test eax, eax
je 0x4f90e4
cmp dword [esp + 0x14], ebp
jne 0x4f90e4
pop edi
pop ebp
xor eax, eax
pop ebx
ret
mov eax, 0xffffff37
mov dword [ebx + 0x18], eax
pop edi
pop ebp
pop ebx
ret

Function at 0x4f90f0
Capabilities:
Write file on windows

Disassembly:
push ebx
mov ebx, dword [esp + 8]
push ebp
mov eax, dword [ebx + 0x18]
test eax, eax
jne 0x4f91a6
mov ebp, dword [esp + 0x14]
test ebp, ebp
jne 0x4f910c
pop ebp
pop ebx
ret
mov eax, dword [ebx + 0x14]
test eax, eax
je 0x4f9120
mov eax, dword [ebx + 8]
add eax, ebp
pop ebp
mov dword [ebx + 8], eax
xor eax, eax
pop ebx
ret
mov eax, dword [ebx + 4]
test eax, eax
je 0x4f9178
cmp eax, 0xffffffff
je 0x4f9140
mov ecx, dword [ebx + 8]
add ecx, ebp
cmp ecx, eax
jle 0x4f9140
mov eax, 0xffffff6a
pop ebp
mov dword [ebx + 0x18], eax
pop ebx
ret
mov edx, dword [ebx + 8]
push esi
mov esi, dword [esp + 0x14]
push edi
mov edi, dword [ebx]
mov ecx, ebp
add edi, edx
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edx, dword [ebx + 8]
mov ecx, dword [ebx + 0xc]
add edx, ebp
pop edi
mov eax, edx
mov dword [ebx + 8], edx
cmp ecx, eax
pop esi
jge 0x4f9173
mov dword [ebx + 0xc], eax
pop ebp
xor eax, eax
pop ebx
ret
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x10]
lea eax, [esp + 0x10]
push 0
push eax
push ebp
push ecx
push edx
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
je 0x4f919e
cmp dword [esp + 0x10], ebp
jne 0x4f919e
pop ebp
xor eax, eax
pop ebx
ret
mov eax, 0xffffff36
mov dword [ebx + 0x18], eax
pop ebp
pop ebx
ret
Function at 0x4fa180
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
push ebx
push esi
mov esi, dword [esp + 0xc]
push edi
push eax
mov ebx, dword [esi]
push esi
call fcn.004fa2c0
mov edi, eax
add esp, 8
test edi, edi
jge 0x4fa1a1
pop edi
pop esi
pop ebx
ret
mov ecx, dword [esi + 4]
mov eax, dword [ebx + 0x40]
cmp ecx, 2
jne 0x4fa232
test eax, eax
jne 0x4fa1bd
pop edi
pop esi
mov eax, 0xffffff9c
pop ebx
ret
mov ecx, dword [esp + 0x18]
test ecx, ecx
jne 0x4fa1e6
lea ecx, [edi*8]
push ecx
push esi
call eax
add esp, 8
test eax, eax
jne 0x4fa2b1
mov dword [esi + 0xc], 1
pop edi
pop esi
pop ebx
ret
lea eax, [esp + 0x10]
lea edx, [edi*8]
push eax
push 0
push esi
push 0x4fa0f0
push 0
push 0
mov dword [esi + 0x1a8], 0
mov dword [esi + 0x1a4], 0
mov dword [esi + 0x1ac], 0
mov dword [esi + 0x10], edx
call fcn.005aa0bf
add esp, 0x18
neg eax
sbb eax, eax
pop edi
neg eax
pop esi
dec eax
pop ebx
ret
test eax, eax
je 0x4fa268
lea ecx, [edi*8]
push ecx
push esi
call eax
add esp, 8
test eax, eax
jne 0x4fa2b1
mov edx, dword [esi + 4]
mov ecx, 1
cmp edx, ecx
jne 0x4fa25e
mov dword [esi + 0x130], ecx
pop edi
pop esi
pop ebx
ret
mov dword [esi + 0x10c], ecx
pop edi
pop esi
pop ebx
ret
cmp ecx, 1
jne 0x4fa28b
lea ebx, [esi + 8]
push edi
push ebx
call fcn.004f19d0
add esp, 8
test eax, eax
jne 0x4fa28f
push edi
push ebx
push esi
call fcn.004fa030
add esp, 0xc
jmp 0x4fa28f
mov eax, dword [esp + 0x10]
cmp dword [esi + 4], 4
jne 0x4fa2b1
lea ebx, [esi + 8]
push edi
push ebx
call fcn.004f19d0
add esp, 8
test eax, eax
jne 0x4fa2b1
push edi
push ebx
push esi
call fcn.004fa030
add esp, 0xc
pop edi
pop esi
pop ebx
ret
Function at 0x4fa3f0
Capabilities:
Check http status code

Disassembly:
mov ecx, dword [esp + 8]
push ebx
push ebp
push esi
mov eax, dword [ecx]
push edi
cmp eax, 1
jl 0x4fa40b
cmp eax, 0x63
jg 0x4fa40b
mov ebp, 1
jmp 0x4fa436
cmp eax, 0x64
jl 0x4fa41e
cmp eax, 0xc7
jg 0x4fa41e
mov ebp, 2
jmp 0x4fa436
cmp eax, 0xc8
jl 0x4fa431
cmp eax, 0x12b
mov ebp, 3
jle 0x4fa436
mov ebp, 4
mov ebx, dword [esp + 0x14]
mov edx, dword [esp + 0x1c]
test edx, edx
mov dword [ebx], 0xffffffff
je 0x4fa45c
cmp eax, 7
je 0x4fa452
cmp eax, 8
jne 0x4fa45c
pop edi
pop esi
pop ebp
mov eax, 0xfffffff4
pop ebx
ret
mov eax, dword [ecx + 0x58]
test eax, eax
je 0x4fa46d
pop edi
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
ret
mov esi, dword [sym.imp.kernel32.dll_EnterCriticalSection]
push 0x6befc0
call esi
mov eax, dword [0x6ae104]
test eax, eax
jne 0x4fa49a
push 0x6befc0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov edi, 0xffffffcd
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
push 0x6befa0
call esi
push 0x6befc0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
cmp ebp, 1
je 0x4fa4ba
cmp ebp, 4
je 0x4fa4ba
xor eax, eax
jmp 0x4fa4bf
mov eax, 1
mov ecx, dword [esp + 0x20]
push 0x4fa610
or eax, ecx
push eax
push 0x1d8
push 1
call fcn.004f82a0
mov edi, eax
add esp, 0x10
test edi, edi
jl 0x4fa525
cmp edi, dword [0x68e5cc]
jge 0x4fa4ff
mov ecx, dword [0x6bef98]
mov eax, edi
shl eax, 5
add eax, ecx
cmp dword [eax], 1
jne 0x4fa4ff
mov esi, dword [eax + 4]
jmp 0x4fa501
xor esi, esi
lea ebx, [esi + 0x1bc]
push ebx
call dword [sym.imp.kernel32.dll_InitializeCriticalSection]
push ebx
mov dword [esi + 0x1d4], 1
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov ebx, dword [esp + 0x14]
jmp 0x4fa529
mov esi, dword [esp + 0x14]
push 0x6befa0
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
test edi, edi
jge 0x4fa53f
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret
mov dword [ebx], edi
mov edi, dword [esp + 0x18]
mov dword [esi], edi
mov dword [esi + 4], ebp
mov edx, dword [ebx]
or eax, 0xffffffff
cmp ebp, 2
mov dword [esi + 0x1b4], edx
mov dword [esi + 0x19c], eax
mov dword [esi + 0x1a0], eax
jne 0x4fa5b0
mov dword [esi + 0x5c], eax
mov dword [esi + 0x10], 0
call fcn.004f10e0
mov dword [esi + 0x28], eax
call fcn.004f10e0
mov dword [esi + 0x2c], eax
call fcn.004f10e0
mov dword [esi + 0x30], eax
call fcn.004f10e0
mov dword [esi + 0x34], eax
call fcn.004f10e0
mov dword [esi + 0x38], eax
call fcn.004f10e0
mov dword [esi + 0x3c], eax
call fcn.004f10e0
mov dword [esi + 0x40], eax
call fcn.004f10e0
mov dword [esi + 0x44], eax
mov eax, dword [edi + 0x30]
test eax, eax
je 0x4fa5f5
mov ecx, dword [esp + 0x1c]
push ecx
push esi
call eax
mov edi, eax
add esp, 8
test edi, edi
jge 0x4fa5f5
add esi, 0x1bc
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
mov edx, dword [ebx]
push 0
push 0
push 0
push 0x13
push edx
call fcn.004f84b0
add esp, 0x14
mov eax, edi
mov dword [ebx], 0xffffffff
pop edi
pop esi
pop ebp
pop ebx
ret
add esi, 0x1bc
push esi
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
Function at 0x50ef49
Capabilities:
Encode data using xor

Disassembly:
push ebx
push esi
mov esi, ecx
xor eax, eax
mov dword [esi], eax
xor ecx, ecx
mov dl, 1
shl dl, cl
inc ecx
cmp ecx, 8
mov byte [esi + ecx + 3], dl
jl 0x50ef53
mov dl, al
rol dl, 4
mov cl, dl
mov bl, dl
shr cl, 2
shl bl, 2
xor cl, bl
shl dl, 2
and cl, 0x33
xor cl, dl
mov dl, cl
shr dl, 1
mov bl, cl
add bl, bl
xor dl, bl
and dl, 0x55
add cl, cl
xor dl, cl
mov byte [esi + eax + 0xc], dl
inc eax
cmp eax, 0x100
jl 0x50ef61
mov eax, esi
pop esi
pop ebx
ret
Function at 0x5106d0
Capabilities:
Encrypt data using rc4 prga

Disassembly:
push ebp
mov ebp, esp
push ecx
xor edx, edx
cmp dword [ebp + 8], edx
mov dword [ebp - 4], ecx
jne 0x5106e5
xor eax, eax
jmp 0x5107d3
mov ecx, dword [ebp + 0x18]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0xc]
imul esi, dword [ebp + 0x10]
add esi, dword [ebp + 8]
push edi
mov edi, ebx
push 8
sub ecx, ebx
and edi, 7
pop eax
sub eax, edi
inc ecx
cmp eax, ecx
mov dword [ebp + 8], eax
jb 0x51070f
mov dword [ebp + 8], ecx
cmp dword [ebp + 8], 8
jne 0x510718
mov dword [ebp + 8], edx
mov eax, dword [ebp + 0x18]
and eax, 7
inc eax
cmp eax, ecx
mov dword [ebp + 0xc], eax
jb 0x510729
mov dword [ebp + 0xc], ecx
mov eax, ebx
xor eax, dword [ebp + 0x18]
test eax, 0xfffffff8
jne 0x510738
mov dword [ebp + 0xc], edx
mov eax, dword [ebp + 8]
add eax, ebx
cmp ebx, eax
mov dword [ebp + 0x10], eax
jae 0x51076d
mov edx, dword [ebp - 4]
mov eax, ebx
mov edi, ebx
shr eax, 3
not edi
and edi, 7
mov dl, byte [edx + edi + 4]
add eax, esi
cmp dword [ebp + 0x1c], 0
je 0x510763
or byte [eax], dl
jmp 0x510767
not dl
and byte [eax], dl
inc ebx
cmp ebx, dword [ebp + 0x10]
jb 0x510744
xor edi, edi
cmp ecx, 8
jbe 0x51079f
sub ecx, dword [ebp + 0xc]
sub ecx, dword [ebp + 8]
shr ecx, 3
mov edi, ecx
je 0x51079f
mov eax, dword [ebp + 0x1c]
neg eax
sbb eax, eax
and eax, 0xff
push edi
push eax
mov eax, ebx
shr eax, 3
add eax, esi
push eax
call fcn.005ab440
add esp, 0xc
lea edx, [ebx + edi*8]
jmp 0x5107c8
mov edi, dword [ebp - 4]
mov eax, edx
mov ecx, edx
shr eax, 3
not ecx
and ecx, 7
mov cl, byte [edi + ecx + 4]
add eax, esi
cmp dword [ebp + 0x1c], 0
je 0x5107c3
or byte [eax], cl
jmp 0x5107c7
not cl
and byte [eax], cl
inc edx
cmp edx, dword [ebp + 0x18]
jb 0x5107a4
pop edi
xor eax, eax
pop esi
inc eax
pop ebx
leave
ret 0x18

Function at 0x515f8f
Capabilities:
Get file size

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
mov esi, ecx
xor ebx, ebx
mov dword [edi], ebx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x10]
dec ecx
je 0x516002
dec ecx
je 0x515ff0
dec ecx
je 0x515fce
dec ecx
jne 0x515fd6
cmp byte [eax + 0x129], bl
je 0x515fbf
push dword [eax + 0xc]
call dword [sym.imp.kernel32.dll_FlushFileBuffers]
mov eax, dword [esi + 4]
push ebx
push dword [eax + 0xc]
call dword [sym.imp.kernel32.dll_GetFileSize]
jmp 0x516026
cmp dword [eax + 0x140], ebx
jne 0x515fda
xor al, al
jmp 0x51602a
mov esi, eax
push edi
push dword [esi + 0x14c]
call dword [esi + 0x140]
test eax, eax
setne al
jmp 0x51602a
cmp byte [eax + 0x129], bl
je 0x515ffd
mov eax, dword [eax + 0x20]
jmp 0x516026
mov eax, dword [eax + 0x18]
jmp 0x516026
cmp byte [eax + 0x129], bl
je 0x516013
push dword [eax + 8]
call fcn.005abf24
pop ecx
mov eax, dword [esi + 4]
push dword [eax + 8]
call fcn.005abd79
push eax
call fcn.005abc7a
pop ecx
pop ecx
mov dword [edi], eax
mov al, 1
pop edi
pop esi
pop ebx
ret 4
Function at 0x5160c0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x10]
dec ecx
je 0x516163
dec ecx
je 0x51611e
dec ecx
je 0x5160fb
dec ecx
jne 0x516104
and dword [ebp - 4], 0
push 0
lea ecx, [ebp - 4]
push ecx
push dword [ebp + 0xc]
push dword [ebp + 8]
push dword [eax + 0xc]
call dword [sym.imp.kernel32.dll_ReadFile]
mov eax, dword [ebp - 4]
jmp 0x516176
cmp dword [eax + 0x130], 0
jne 0x516108
xor eax, eax
jmp 0x516176
mov esi, eax
push dword [esi + 0x14c]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [esi + 0x130]
jmp 0x516176
cmp byte [eax + 0x129], 0
push edi
mov edi, dword [ebp + 0xc]
mov ecx, eax
je 0x516132
mov eax, dword [ecx + 0x20]
jmp 0x516135
mov eax, dword [ecx + 0x18]
sub eax, dword [ecx + 0x1c]
cmp eax, edi
jae 0x51613e
mov edi, eax
test edi, edi
jbe 0x51615e
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x1c]
add ecx, dword [eax + 0x14]
push edi
push ecx
push dword [ebp + 8]
call fcn.005aad50
mov esi, dword [esi + 4]
add esp, 0xc
add dword [esi + 0x1c], edi
mov eax, edi
pop edi
jmp 0x516176
push dword [eax + 8]
push dword [ebp + 0xc]
push 1
push dword [ebp + 8]
call fcn.005a9841
add esp, 0x10
pop esi
leave
ret 8

Function at 0x5162be
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
mov esi, ecx
mov eax, dword [esi + 4]
cmp byte [eax + 0x129], 0
push edi
jne 0x5162d9
xor al, al
jmp 0x5163b3
mov ecx, dword [eax + 0x10]
dec ecx
je 0x516397
dec ecx
je 0x516350
dec ecx
je 0x516327
dec ecx
jne 0x5162d2
mov esi, dword [ebp + 0xc]
imul esi, dword [ebp + 0x10]
and dword [ebp - 4], 0
push 0
lea ecx, [ebp - 4]
push ecx
push esi
push dword [ebp + 8]
push dword [eax + 0xc]
call dword [sym.imp.kernel32.dll_WriteFile]
test eax, eax
setne al
cmp dword [ebp - 4], esi
jne 0x516320
test al, al
je 0x516320
xor eax, eax
inc eax
jmp 0x5163b3
xor eax, eax
jmp 0x5163b3
cmp dword [eax + 0x134], 0
je 0x5162d2
mov esi, eax
mov eax, dword [ebp + 0xc]
imul eax, dword [ebp + 0x10]
push dword [esi + 0x14c]
push eax
push dword [ebp + 8]
call dword [esi + 0x134]
test eax, eax
setne al
jmp 0x5163b3
mov edi, dword [ebp + 0xc]
imul edi, dword [ebp + 0x10]
mov ecx, dword [eax + 0x1c]
add ecx, edi
cmp ecx, dword [eax + 0x18]
jae 0x5162d2
mov ecx, dword [eax + 0x1c]
add ecx, dword [eax + 0x14]
push edi
push dword [ebp + 8]
push ecx
call fcn.005aad50
mov eax, dword [esi + 4]
add dword [eax + 0x1c], edi
mov eax, dword [esi + 4]
mov ecx, dword [eax + 0x1c]
mov eax, dword [eax + 0x20]
add esp, 0xc
cmp ecx, eax
jbe 0x51638d
mov eax, ecx
mov ecx, dword [esi + 4]
mov dword [ecx + 0x20], eax
mov al, 1
jmp 0x5163b3
push dword [eax + 8]
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.005a8c68
sub eax, dword [ebp + 0x10]
add esp, 0x10
neg eax
sbb eax, eax
inc eax
pop edi
pop esi
leave
ret 0xc
Function at 0x518d40
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60509b
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x104
push ebx
push esi
push edi
mov eax, dword [0x69e3d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x108], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x108]
cmp dword [eax], 0xffffffff
je 0x518ee3
mov ecx, dword [ebp - 0x108]
mov edx, dword [ecx]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x518ee3
push 0x24
call fcn.005655ab
add esp, 4
mov dword [ebp - 0x10c], eax
mov eax, dword [ebp - 0x10c]
mov dword [ebp - 0x20], eax
mov byte [ebp - 4], 1
cmp dword [ebp - 0x20], 0
je 0x518ded
mov ecx, dword [ebp - 0x20]
call fcn.00518f10
mov dword [ebp - 0x110], eax
mov ecx, dword [ebp - 0x110]
mov dword [ebp - 0x114], ecx
jmp 0x518df7
mov dword [ebp - 0x114], 0
mov edx, dword [ebp - 0x114]
mov dword [ebp - 0x1c], edx
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x14], eax
mov ecx, dword [ebp - 0x14]
push ecx
mov edx, dword [ebp - 0x108]
mov eax, dword [edx]
push eax
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x518e4f
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x90], eax
mov ecx, dword [ebp - 0x90]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x24], edx
push 0x66a568
lea eax, [ebp - 0x24]
push eax
call fcn.005ab3f1
mov ecx, dword [ebp - 0x108]
add ecx, 0x10
push ecx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
mov edx, dword [ebp - 0x108]
add edx, 4
mov dword [ebp - 0x104], edx
mov eax, dword [ebp - 0x104]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x9c], ecx
mov dword [ebp - 0x98], 0
mov edx, dword [ebp - 0x9c]
mov dword [ebp - 0x94], edx
mov eax, 1
test eax, eax
je 0x518eaa
cmp dword [ebp - 0x104], 0
jne 0x518eaa
call fcn.005ab3e1
mov ecx, dword [ebp - 0x104]
mov dword [ebp - 0x98], ecx
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x94]
push eax
mov ecx, dword [ebp - 0x98]
push ecx
mov ecx, dword [ebp - 0x104]
call fcn.005190d0
mov edx, dword [ebp - 0x108]
add edx, 0x10
push edx
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x518ef2
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x14]
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 0x5194f0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x605140
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x69e3d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x18]
cmp dword [eax], 0xffffffff
je 0x519544
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
jmp 0x519553
mov dword [ebp - 4], 0xffffffff
xor eax, eax
cmp dword [ebp - 0x14], 0
setne al
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 0x519580
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x605160
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0x100
push ebx
push esi
push edi
mov eax, dword [0x69e3d4]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x10c], ecx
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x10c]
cmp dword [eax], 0xffffffff
je 0x51969b
mov ecx, dword [ebp - 0x10c]
mov edx, dword [ecx]
push edx
call dword [sym.imp.kernel32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x51969b
push 0
mov eax, dword [ebp - 0x10c]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.kernel32.dll_TlsSetValue]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x519624
call dword [sym.imp.kernel32.dll_GetLastError]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x2c]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
push 0x66a568
lea ecx, [ebp - 0x1c]
push ecx
call fcn.005ab3f1
mov edx, dword [ebp - 0x10c]
add edx, 0x10
push edx
call dword [sym.imp.kernel32.dll_EnterCriticalSection]
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x10c]
add ecx, 4
call fcn.00519ab0
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
mov dword [ebp - 0x24], edx
cmp dword [ebp - 0x24], 0
je 0x519681
mov ecx, dword [ebp - 0x24]
call fcn.005196c0
mov eax, 1
and eax, 1
je 0x519676
mov ecx, dword [ebp - 0x24]
push ecx
call fcn.005655db
add esp, 4
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x110], edx
jmp 0x51968b
mov dword [ebp - 0x110], 0
mov eax, dword [ebp - 0x10c]
add eax, 0x10
push eax
call dword [sym.imp.kernel32.dll_LeaveCriticalSection]
jmp 0x5196a3
mov dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret