joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4f7420
Capabilities:
Get system information on windows
Print debug messages
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 0x10]
sub esp, 0x24
push esi
mov esi, ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x130], ecx
test eax, eax
jne 0x4f743f
mov eax, dword [esi + 0x114]
mov edx, eax
add edx, ecx
mov dword [esi + 0x134], eax
cmp edx, dword [esi + 0x114]
jbe 0x4f745a
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
push ebx
push edi
lea eax, [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.DLL_GetSystemInfo]
mov ecx, dword [esi + 0x130]
mov edi, dword [ebp - 8]
mov eax, ecx
xor edx, edx
div edi
push 0
imul eax, edi
mov ebx, eax
mov eax, dword [esi + 0x134]
mov edi, ecx
add ecx, eax
push ecx
push 0
push 2
add edx, eax
mov eax, dword [esi + 0x110]
push 0
push eax
mov dword [ebp + 0xc], edx
sub edi, ebx
call dword [sym.imp.KERNEL32.DLL_CreateFileMappingA]
mov dword [esi + 0x12c], eax
test eax, eax
jne 0x4f74c1
push str.CMappedFile::Map__m_hFM_n
call dword [sym.imp.KERNEL32.DLL_OutputDebugStringA]
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov ecx, dword [ebp + 0xc]
push ecx
push ebx
push 0
push 4
push eax
call dword [sym.imp.KERNEL32.DLL_MapViewOfFile]
mov dword [esi + 0x138], eax
test eax, eax
jne 0x4f74fa
call dword [sym.imp.KERNEL32.DLL_GetLastError]
push eax
push str.CMappedFile::Map__m_lpMapData__lu
call fcn.004f8ad0
add esp, 8
pop edi
pop ebx
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret 0xc
mov edx, dword [ebp + 8]
add edi, eax
mov dword [esi + 0x13c], edi
mov dword [edx], edi
mov eax, dword [esi + 0x13c]
mov ecx, dword [esi + 0x134]
push eax
push ecx
mov ecx, esi
mov dword [esi + 0x128], 0
call fcn.004f7320
mov eax, dword [esi + 0x134]
pop edi
pop ebx
pop esi
mov esp, ebp
pop ebp
ret 0xc

Function at 0x4f88d0
Capabilities:
Get file size

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
push edi
mov esi, ecx
call fcn.004f88b0
mov ebx, dword [ebp + 8]
push 0x104
lea eax, [esi + 8]
push ebx
push eax
call fcn.005a8f80
mov edi, dword [ebp + 0xc]
add esp, 0xc
mov eax, 1
cmp edi, 2
jne 0x4f8909
mov ecx, 0xc0000000
lea eax, [edi + 1]
jmp 0x4f890e
mov ecx, SysReAllocString
xor edx, edx
cmp edi, 1
setne dl
push 0
push 0x80
add edx, 3
push edx
push 0
push eax
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov dword [esi + 0x110], eax
cmp eax, 0xffffffff
je 0x4f8955
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_GetFileSize]
mov dword [esi + 4], edi
pop edi
mov dword [esi + 0x114], eax
pop esi
mov eax, 1
pop ebx
pop ebp
ret 8
pop edi
mov dword [esi + 0x110], 0
pop esi
xor eax, eax
pop ebx
pop ebp
ret 8
Function at 0x4f8bf0
Capabilities:
Encode data using xor
Encrypt data using xtea

Disassembly:
push ebp
mov ebp, esp
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
xor eax, eax
mov edi, 0x20
dec edi
mov dword [ebp + 0xc], edi
mov edi, edx
shr edi, 5
mov ebx, edx
shl ebx, 4
xor edi, ebx
add edi, edx
mov ebx, eax
and ebx, 3
mov ebx, dword [esi + ebx*4]
add ebx, eax
xor edi, ebx
add ecx, edi
mov edi, ecx
shr edi, 5
mov ebx, ecx
shl ebx, 4
xor edi, ebx
sub eax, 0x61c88647
mov ebx, eax
shr ebx, 0xb
and ebx, 3
mov ebx, dword [esi + ebx*4]
add edi, ecx
add ebx, eax
xor edi, ebx
add edx, edi
mov edi, dword [ebp + 0xc]
test edi, edi
ja 0x4f8c06
mov eax, dword [ebp + 0x14]
pop edi
pop esi
mov dword [eax], ecx
mov dword [eax + 4], edx
pop ebx
pop ebp
ret

Function at 0x4f8c60
Capabilities:
Encode data using xor
Encrypt data using xtea

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
push ebx
push esi
mov esi, dword [ebp + 0x10]
push edi
mov eax, 0xc6ef3720
mov edi, 0x20
lea esp, [esp]
dec edi
mov dword [ebp + 0xc], edi
mov edi, edx
shr edi, 5
mov ebx, edx
shl ebx, 4
xor edi, ebx
mov ebx, eax
shr ebx, 0xb
and ebx, 3
mov ebx, dword [esi + ebx*4]
add edi, edx
add ebx, eax
xor edi, ebx
sub ecx, edi
mov edi, ecx
shr edi, 5
mov ebx, ecx
shl ebx, 4
xor edi, ebx
add eax, 0x61c88647
mov ebx, eax
and ebx, 3
mov ebx, dword [esi + ebx*4]
add edi, ecx
add ebx, eax
xor edi, ebx
sub edx, edi
mov edi, dword [ebp + 0xc]
test edi, edi
ja 0x4f8c80
mov eax, dword [ebp + 0x14]
pop edi
pop esi
mov dword [eax], edx
mov dword [eax + 4], ecx
pop ebx
pop ebp
ret

Function at 0x4f8f10
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x255]
push 0x688ec4
push esi
call fcn.005a7055
add esp, 8
test eax, eax
je 0x4f8f3a
push eax
call fcn.005a6aa0
add esp, 4
pop edi
mov al, 1
pop esi
ret
cmp byte [edi + 0x364], 0
je 0x4f8f48
pop edi
xor al, al
pop esi
ret
push 0x63fc80
push esi
call fcn.005a7055
mov esi, eax
add esp, 8
test esi, esi
je 0x4f8f43
push esi
push 1
push 4
push str.EPKD
call fcn.005ac293
push esi
push 1
push 4
push 0x63fc44
call fcn.005ac293
push esi
push 1
push 4
add edi, 0x150
push edi
call fcn.005ac293
push esi
call fcn.005a6aa0
add esp, 0x34
pop edi
mov al, 1
pop esi
ret

Function at 0x4f8f5f
Capabilities:
Write file on windows

Disassembly:
push esi
push edi
mov edi, ecx
lea esi, [edi + 0x255]
push 0x688ec4
push esi
call fcn.005a7055
add esp, 8
test eax, eax
je 0x4f8f3a
push eax
call fcn.005a6aa0
add esp, 4
pop edi
mov al, 1
pop esi
ret
cmp byte [edi + 0x364], 0
je 0x4f8f48
pop edi
xor al, al
pop esi
ret
push 0x63fc80
push esi
call fcn.005a7055
mov esi, eax
add esp, 8
test esi, esi
je 0x4f8f43
push esi
push 1
push 4
push str.EPKD
call fcn.005ac293
push esi
push 1
push 4
push 0x63fc44
call fcn.005ac293
push esi
push 1
push 4
add edi, 0x150
push edi
call fcn.005ac293
push esi
call fcn.005a6aa0
add esp, 0x34
pop edi
mov al, 1
pop esi
ret
Function at 0x4f9180
Capabilities:
Delete file
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60f806
mov eax, dword fs:[0]
push eax
sub esp, 0x168
mov eax, dword [0x6ea244]
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
lea ecx, [ebp - 0x154]
mov dword [ebp - 0x15c], ebx
call fcn.004f72d0
push 0
push 0
lea eax, [ebp - 0x160]
push eax
lea edi, [ebx + 0x255]
push edi
lea ecx, [ebp - 0x154]
mov dword [ebp - 4], 0
call fcn.004f76a0
test eax, eax
jne 0x4f9216
add ebx, 0x155
push ebx
push str.EncryptIndex:_Cannot_open_pack_index_file___s
call fcn.004f8ad0
add esp, 8
lea ecx, [ebp - 0x154]
mov dword [ebp - 4], 0xffffffff
call fcn.004f7620
xor al, al
jmp 0x4f93a6
lea ecx, [ebp - 0x154]
call fcn.004f7540
push eax
call fcn.005a51fc
add esp, 4
lea ecx, [ebp - 0x154]
mov esi, eax
call fcn.004f7540
mov ecx, dword [ebp - 0x160]
push eax
push ecx
push esi
call fcn.005a8a40
add esp, 0xc
lea ecx, [ebp - 0x174]
call fcn.004f7bf0
mov edx, dword [0x6f99cc]
push 0x6e00fc
lea ecx, [ebp - 0x154]
mov byte [ebp - 4], 1
mov dword [ebp - 0x158], edx
call fcn.004f7540
mov ecx, dword [ebp - 0x158]
push eax
push esi
lea eax, [ebp - 0x174]
push eax
call fcn.004f8330
test al, al
jne 0x4f92c0
add ebx, 0x155
push ebx
push str.EncryptIndex:_Cannot_encrypt___s
call fcn.004f8ad0
add esp, 8
test esi, esi
je 0x4f92ac
push esi
call fcn.005a60f9
add esp, 4
lea ecx, [ebp - 0x174]
mov byte [ebp - 4], 0
call fcn.004f8770
jmp 0x4f91fd
lea ecx, [ebp - 0x154]
call fcn.004f7580
mov ebx, dword [sym.imp.KERNEL32.DLL_DeleteFileA]
push edi
call ebx
test eax, eax
je 0x4f92d1
push 0x63fc80
push edi
call fcn.005a7055
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4f9300
mov ecx, dword [ebp - 0x15c]
add ecx, 0x155
push ecx
push str.EncryptIndex:_Cannot_open_file_for_writing___s
jmp 0x4f9297
mov edx, dword [ebp - 0x174]
push ebx
push 1
lea ecx, [ebp - 0x174]
mov dword [ebp - 0x158], edx
call fcn.004f7a80
push eax
mov eax, dword [ebp - 0x158]
push eax
call fcn.005ac293
add esp, 0x10
cmp eax, 1
je 0x4f9367
push edi
push str.Encryptindex:_Cannot_write_to_file___s
call fcn.004f8ad0
add esp, 8
test esi, esi
je 0x4f934a
push esi
call fcn.005a60f9
add esp, 4
push ebx
call fcn.005a6aa0
add esp, 4
lea ecx, [ebp - 0x174]
mov byte [ebp - 4], 0
call fcn.004f8770
jmp 0x4f91fd
push ebx
call fcn.005a6aa0
mov ecx, dword [ebp - 0x15c]
push esi
mov byte [ecx + 0x154], 1
call fcn.005a60f9
add esp, 8
lea ecx, [ebp - 0x174]
mov byte [ebp - 4], 0
call fcn.004f8770
lea ecx, [ebp - 0x154]
mov dword [ebp - 4], 0xffffffff
call fcn.004f7620
mov al, 1
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.005acc10
mov esp, ebp
pop ebp
ret
Function at 0x4f93f0
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
call fcn.004f9170
test al, al
je 0x4f9442
cmp dword [esi], 0
jne 0x4f9422
cmp dword [esi + 0x20], 0x10
jb 0x4f940f
mov eax, dword [esi + 0xc]
jmp 0x4f9412
lea eax, [esi + 0xc]
push 0x63fbf8
push eax
call fcn.005a7055
add esp, 8
mov dword [esi], eax
mov eax, dword [esi]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push eax
push 1
push ecx
push esi
call fcn.005ac293
push esi
push 0x63ffbc
call fcn.005ad6fc
add esp, 0x18
pop esi
pop ebp
ret 8

Function at 0x4fd4e0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax + 0x18], 0x10
jb 0x4fd4f1
mov edx, dword [eax + 4]
jmp 0x4fd4f4
lea edx, [eax + 4]
push esi
mov esi, dword [eax + 0x14]
add esi, edx
xor eax, eax
cmp edx, esi
jae 0x4fd512
push edi
movzx edi, byte [edx]
imul eax, eax, 0x1000193
inc edx
xor eax, edi
cmp edx, esi
jb 0x4fd501
pop edi
xor edx, edx
div dword [ecx + 4]
pop esi
mov eax, edx
pop ebp
ret 4
Function at 0x4fe060
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push ebx
mov ebx, dword [ebp + 0xc]
push esi
mov esi, ecx
mov ecx, dword [ebx + 4]
add ecx, 4
cmp dword [ecx + 0x18], 0x10
push edi
jb 0x4fe07c
mov eax, dword [ecx + 4]
jmp 0x4fe07f
lea eax, [ecx + 4]
mov ecx, dword [ecx + 0x14]
add ecx, eax
xor edi, edi
cmp eax, ecx
jae 0x4fe0a0
lea ebx, [ebx]
movzx edx, byte [eax]
imul edi, edi, 0x1000193
inc eax
xor edi, edx
cmp eax, ecx
jb 0x4fe090
cmp dword [esi], 0
je 0x4fe0b2
mov eax, dword [ebp + 0x10]
push eax
mov ecx, esi
call fcn.004fe010
jmp 0x4fe0df
mov ecx, dword [ebp + 0x10]
push ecx
mov ecx, esi
call fcn.004f9960
cmp dword [esi + 4], eax
lea ecx, [esi + 4]
mov dword [ebp + 0x10], eax
lea eax, [ebp + 0x10]
jb 0x4fe0cd
mov eax, ecx
mov edx, dword [eax]
mov dword [ecx], edx
mov ecx, esi
call fcn.004f95d0
mov ecx, esi
call fcn.004fd420
xor edx, edx
mov eax, edi
div dword [esi + 4]
mov eax, dword [esi]
pop edi
lea ecx, [eax + edx*4]
mov edx, dword [ebx + 4]
mov dword [ebx + 4], 0
mov eax, dword [ecx]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov dword [ecx], edx
inc dword [esi + 0x10]
mov dword [esi + 0x18], ecx
pop esi
mov dword [eax], ecx
mov dword [eax + 4], edx
pop ebx
pop ebp
ret 0xc

Function at 0x4fe110
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x60ffb8
mov eax, dword fs:[0]
push eax
sub esp, 0xc
push ebx
push esi
push edi
mov eax, dword [0x6ea244]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [ebp + 0xc]
cmp dword [ecx + 0x18], 0x10
jb 0x4fe148
mov eax, dword [ecx + 4]
jmp 0x4fe14b
lea eax, [ecx + 4]
mov edx, dword [ecx + 0x14]
add edx, eax
xor ebx, ebx
cmp eax, edx
jae 0x4fe166
movzx edi, byte [eax]
imul ebx, ebx, 0x1000193
inc eax
xor ebx, edi
cmp eax, edx
jb 0x4fe156
xor edx, edx
mov eax, ebx
div dword [esi + 4]
mov eax, dword [esi]
push ecx
mov ecx, esi
lea edi, [eax + edx*4]
push edi
call fcn.004fd560
xor ecx, ecx
cmp eax, ecx
je 0x4fe1a3
mov ecx, dword [ebp + 8]
mov dword [ecx + 4], eax
mov dword [ecx], edi
mov byte [ecx + 8], 0
mov eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], ecx
mov byte [ebp - 0x10], cl
mov byte [ebp - 0xf], cl
mov dword [ebp - 4], ecx
lea ecx, [ebp - 0x18]
call fcn.004fd850
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp - 0x14]
push ecx
add edx, 4
push edx
push 0
call fcn.004fd8d0
mov eax, dword [esi + 0x10]
add esp, 0xc
inc eax
push eax
mov ecx, esi
mov byte [ebp - 0xf], 1
call fcn.004fe010
test al, al
je 0x4fe1ef
mov eax, ebx
xor edx, edx
div dword [esi + 4]
mov ecx, dword [esi]
lea edi, [ecx + edx*4]
mov edx, dword [edi]
mov ecx, dword [ebp - 0x14]
mov dword [ecx], edx
mov dword [edi], ecx
inc dword [esi + 0x10]
cmp edi, dword [esi + 0x18]
jae 0x4fe203
mov dword [esi + 0x18], edi
mov eax, dword [ebp + 8]
mov dword [eax], edi
mov dword [eax + 4], ecx
mov byte [eax + 8], 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x4fe9f0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x610180
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x6ea244]
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 eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp + 0xc]
push 0xffffffffffffffff
xor esi, esi
push esi
mov dword [ebp - 0x4c], ecx
push eax
lea ecx, [ebp - 0x48]
mov dword [ebp - 0x30], 0xf
mov dword [ebp - 0x34], esi
mov byte [ebp - 0x44], 0
call fcn.00401a17
lea edx, [ebp - 0x48]
push edx
mov dword [ebp - 4], esi
call fcn.005e52b0
lea eax, [ebp - 0x48]
push eax
lea ecx, [ebp - 0x2c]
push ecx
call fcn.004fe9c0
add esp, 0xc
cmp dword [ebp - 0x14], 0x10
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 1
jae 0x4fea75
lea eax, [ebp - 0x28]
mov edx, dword [ebp - 0x18]
add edx, eax
xor ecx, ecx
cmp eax, edx
jae 0x4fea90
movzx esi, byte [eax]
imul ecx, ecx, 0x1000193
inc eax
xor ecx, esi
cmp eax, edx
jb 0x4fea80
mov dword [ebp - 0x50], ecx
lea eax, [ebp - 0x50]
push eax
lea ecx, [ebp - 0x60]
push ecx
mov ecx, dword [ebp - 0x54]
call fcn.004fd690
mov esi, dword [eax + 4]
mov edx, dword [eax]
mov dword [ebp - 0x58], edx
test esi, esi
jne 0x4feaef
mov esi, 0x10
cmp dword [ebp - 0x14], esi
jb 0x4feac5
mov eax, dword [ebp - 0x28]
push eax
call fcn.005a6104
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp dword [ebp - 0x30], esi
jb 0x4feae8
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.005a6104
add esp, 4
xor al, al
jmp 0x4feba4
cmp dword [ebp - 0x30], 0x10
mov eax, dword [ebp - 0x44]
jae 0x4feafb
lea eax, [ebp - 0x44]
mov edx, dword [ebp - 0x34]
push edx
push eax
call fcn.005e50d0
mov ecx, eax
mov eax, 0xaaaaaaab
mul ecx
shr edx, 1
lea eax, [edx + edx*2]
mov edx, ecx
sub edx, eax
mov eax, dword [ebp - 0x4c]
mov dword [eax], edx
mov edx, dword [esi + 8]
mov dword [edi], edx
mov eax, dword [esi + 0xc]
mov dword [edi + 4], eax
mov edx, dword [esi + 0x10]
mov dword [edi + 8], edx
mov eax, dword [esi + 0x14]
mov dword [edi + 0xc], eax
mov edx, dword [esi + 0x18]
mov dword [ebx], edx
mov eax, dword [esi + 0x1c]
mov dword [ebx + 4], eax
mov edx, dword [esi + 0x20]
mov dword [ebx + 8], edx
mov eax, dword [esi + 0x24]
add esp, 8
mov dword [ebx + 0xc], eax
xor eax, eax
nop
xor dword [edi + eax*4], ecx
inc eax
cmp eax, 4
jb 0x4feb50
xor eax, eax
jmp 0x4feb60
xor dword [ebx + eax*4], ecx
inc eax
cmp eax, 4
jb 0x4feb60
mov esi, 0x10
cmp dword [ebp - 0x14], esi
jb 0x4feb7f
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.005a6104
add esp, 4
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
cmp dword [ebp - 0x30], esi
jb 0x4feba2
mov edx, dword [ebp - 0x44]
push edx
call fcn.005a6104
add esp, 4
mov al, 1
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.005acc10
mov esp, ebp
pop ebp
ret 0x10
Function at 0x4febd0
Capabilities:
Encode data using xor
Hash data using fnv

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6101b8
mov eax, dword fs:[0]
push eax
sub esp, 0x3c
mov eax, dword [0x6ea244]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x3c], ecx
mov ecx, dword [ebp + 0xc]
push 0xffffffffffffffff
push 0
mov dword [ebp - 0x30], ecx
push eax
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x38], edx
mov dword [ebp - 0x14], 0xf
mov dword [ebp - 0x18], 0
mov byte [ebp - 0x28], 0
call fcn.00401a17
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 4], 0
call fcn.005e52b0
mov edi, dword [ebp - 0x14]
mov eax, dword [ebp - 0x28]
add esp, 4
cmp edi, 0x10
jae 0x4fec4c
lea eax, [ebp - 0x28]
mov ecx, dword [ebp - 0x18]
lea edx, [ecx + eax]
xor ecx, ecx
cmp eax, edx
jae 0x4fec70
jmp 0x4fec60
movzx esi, byte [eax]
imul ecx, ecx, 0x1000193
inc eax
xor ecx, esi
cmp eax, edx
jb 0x4fec60
mov dword [ebp - 0x34], ecx
mov ecx, dword [ebp - 0x3c]
lea edx, [ebp - 0x34]
push edx
lea eax, [ebp - 0x48]
push eax
add ecx, 0x20
call fcn.004fd690
mov esi, dword [eax + 4]
mov ecx, dword [eax]
mov dword [ebp - 0x40], ecx
test esi, esi
jne 0x4feca7
cmp edi, 0x10
jb 0x4feca3
mov edx, dword [ebp - 0x28]
push edx
call fcn.005a6104
add esp, 4
xor al, al
jmp 0x4fecff
mov eax, dword [esi + 0x34]
sub eax, dword [esi + 0x30]
mov ecx, dword [ebp - 0x38]
mov dword [ecx], eax
test eax, eax
jg 0x4fecd4
mov edx, dword [ebp - 0x30]
mov dword [edx], 0
cmp edi, 0x10
jb 0x4feca3
mov eax, dword [ebp - 0x28]
push eax
call fcn.005a6104
add esp, 4
xor al, al
jmp 0x4fecff
mov ecx, dword [esi + 0x34]
sub ecx, dword [esi + 0x30]
jne 0x4fece4
call fcn.005a6714
mov edi, dword [ebp - 0x14]
mov edx, dword [esi + 0x30]
mov eax, dword [ebp - 0x30]
mov dword [eax], edx
cmp edi, 0x10
jb 0x4fecfd
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.005a6104
add esp, 4
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.005acc10
mov esp, ebp
pop ebp
ret 0xc

Function at 0x502e30
Capabilities:
Terminate thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
test eax, eax
jne 0x502e81
call fcn.0050aa80
test eax, eax
je 0x502e6c
mov edx, dword [eax]
push 0
mov ecx, eax
mov eax, dword [edx + 8]
push str.Couldnt_terminate_thread
call eax
push eax
call fcn.0050fe70
add esp, 4
mov eax, 5
pop esi
ret
mov eax, str.Couldnt_terminate_thread
push eax
call fcn.0050fe70
add esp, 4
mov eax, 5
pop esi
ret
mov eax, dword [esi + 4]
test eax, eax
je 0x502e96
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [esi + 4], 0
xor eax, eax
pop esi
ret
Function at 0x502ea0
Capabilities:
Resume thread

Disassembly:
push esi
mov esi, ecx
mov eax, dword [esi + 4]
push eax
call dword [sym.imp.KERNEL32.DLL_ResumeThread]
cmp eax, 0xffffffff
jne 0x502ef2
call fcn.0050aa80
test eax, eax
je 0x502edc
mov edx, dword [eax]
push 0
mov ecx, eax
mov eax, dword [edx + 8]
push str.Can_not_resume_thread__x
call eax
mov ecx, dword [esi + 4]
push ecx
push eax
call fcn.0050fe70
add esp, 8
xor al, al
pop esi
ret
mov ecx, dword [esi + 4]
mov eax, str.Can_not_resume_thread__x
push ecx
push eax
call fcn.0050fe70
add esp, 8
xor al, al
pop esi
ret
cmp dword [esi + 8], 4
mov eax, 1
je 0x502f00
mov dword [esi + 8], eax
pop esi
ret

Function at 0x503590
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x610588
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push esi
push edi
mov eax, dword [0x6ea244]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov esi, dword [ebp + 8]
push esi
lea eax, [ebp - 0x20]
push fcn.00502d40
push eax
call fcn.00503560
add esp, 0xc
mov ecx, dword [0x6e246c]
push esi
or edi, 0xffffffff
mov dword [ebp - 4], 0
push ecx
mov dword [ebp - 0x14], edi
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x50362c
call fcn.0050aa80
test eax, eax
je 0x50360e
mov edx, dword [eax]
push 0
mov ecx, eax
mov eax, dword [edx + 8]
push str.Can_not_start_thread:_error_writing_TLS.
call eax
jmp 0x503613
mov eax, str.Can_not_start_thread:_error_writing_TLS.
push eax
call fcn.0050fe70
add esp, 4
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 4], edi
call fcn.00503250
mov eax, edi
jmp 0x503660
mov edx, dword [esi]
mov eax, dword [edx + 0xc]
mov ecx, esi
call eax
mov esi, eax
jmp 0x503652
lea ecx, [ebp - 0x20]
push ecx
mov dword [ebp - 4], edi
call fcn.00503250
mov eax, esi
add esp, 4
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 0x503780
Capabilities:
Create thread

Disassembly:
mov edx, dword [esp + 8]
push esi
mov esi, ecx
mov ecx, dword [esp + 8]
lea eax, [esi + 0x10]
push eax
push 4
push ecx
push 0x503680
push edx
push 0
call fcn.005af07f
add esp, 0x18
mov dword [esi + 4], eax
test eax, eax
jne 0x5037e5
call fcn.0050aa80
test eax, eax
je 0x5037d1
mov edx, dword [eax]
push 0
mov ecx, eax
mov eax, dword [edx + 8]
push str.Cant_create_thread
call eax
push eax
call fcn.0050fe70
add esp, 4
xor al, al
pop esi
ret 8
mov eax, str.Cant_create_thread
push eax
call fcn.0050fe70
add esp, 4
xor al, al
pop esi
ret 8
mov eax, dword [esi + 0xc]
cmp eax, 0x32
je 0x5037f5
push eax
mov ecx, esi
call fcn.00502da0
mov al, 1
pop esi
ret 8