joyce8/EMBER2024-capa huggingface dataset:
Function at 0x403275
Capabilities:
Get common file path

Disassembly:
push ebx
mov edx, 7
sub esp, 4
mov dword [esp], 0
dec edx
jne 0x40327b
call fcn.0040df60
push dword [esp + 0x2c]
call fcn.004051a0
mov edx, dword [esp + 0x24]
lea ecx, [esp]
call fcn.00405060
mov edx, dword [esp + 0x28]
lea ecx, [esp + 4]
call fcn.00405060
call fcn.00402bc1
and eax, eax
je 0x4032cb
call fcn.0040559a
mov ebx, eax
cmp ebx, 0x41
je 0x4032cb
mov eax, 1
jmp 0x4032cd
xor eax, eax
and eax, eax
je 0x40343b
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040de20
pop edx
push eax
push 0x800
call fcn.00406260
lea eax, [esp + 0xc]
push eax
call fcn.0040de60
push 0x800
push dword [esp + 0xc]
call sub.KERNEL32.DLL_GetWindowsDirectoryW
push dword [esp + 8]
call sub.SHLWAPI.DLL_PathAddBackslashW
mov edx, dword [esp + 8]
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040dfc0
mov edx, str.sysnative
push edx
call fcn.0040dfc0
lea eax, [esp + 0xc]
push eax
call fcn.0040de60
push dword [esp + 8]
call sub.SHLWAPI.DLL_PathAddBackslashW
mov edx, dword [esp + 8]
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040dfc0
mov edx, dword [esp + 4]
push edx
call fcn.0040dfc0
lea eax, [esp + 0x10]
push eax
call fcn.0040de60
mov edx, dword [esp + 8]
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040dfc0
mov edx, dword [esp + 4]
push edx
call fcn.0040dfc0
mov edx, dword [esp + 8]
push edx
call fcn.0040dfc0
lea eax, [esp + 0x14]
push eax
call fcn.0040de60
push dword [esp + 0xc]
push 0
call fcn.0040ad60
and eax, eax
je 0x4033bc
mov dword [esp + 0x14], 1
push 0
call fcn.0040a970
jmp 0x4033c4
mov dword [esp + 0x14], 0
push dword [esp + 0x10]
push 0
call fcn.0040ad60
and eax, eax
je 0x4033ea
mov dword [esp + 0x18], 1
push 0
call fcn.0040a970
jmp 0x4033f2
mov dword [esp + 0x18], 0
mov ebx, dword [esp + 0x14]
add ebx, dword [esp + 0x18]
and ebx, ebx
jne 0x403439
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040de20
pop edx
push eax
push 0x800
call fcn.00406260
lea eax, [esp + 0xc]
push eax
call fcn.0040de60
push 0x800
push dword [esp + 0xc]
call sub.KERNEL32.DLL_GetSystemDirectoryW
push dword [esp + 8]
call sub.SHLWAPI.DLL_PathAddBackslashW
jmp 0x403476
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040de20
pop edx
push eax
push 0x800
call fcn.00406260
lea eax, [esp + 0xc]
push eax
call fcn.0040de60
push 0x800
push dword [esp + 0xc]
call sub.KERNEL32.DLL_GetSystemDirectoryW
push dword [esp + 8]
call sub.SHLWAPI.DLL_PathAddBackslashW
mov edx, dword [esp + 8]
push edx
call fcn.0040de20
pop edx
push eax
push edx
call fcn.0040dfc0
pop eax
push eax
call fcn.00405170
pop edx
add eax, edx
jmp 0x40349e
push dword [esp + 0x10]
call fcn.0040def0
push dword [esp]
call fcn.0040def0
push dword [esp + 4]
call fcn.0040def0
push dword [esp + 8]
call fcn.0040def0
push dword [esp + 0xc]
call fcn.0040def0
add esp, 0x1c
pop ebx
ret 8
Function at 0x4034d1
Capabilities:
Delete directory

Disassembly:
push ebp
push ebx
xor eax, eax
push eax
call fcn.0040df60
mov ebx, dword [0x417028]
cmp ebx, 1
jne 0x40357e
push dword [0x4170a0]
call fcn.0040a3e3
mov ebx, eax
and ebx, ebx
jle 0x403525
push dword [0x4170a0]
call fcn.0040a3ed
push dword [0x4170a0]
call fcn.0040a402
or eax, eax
je 0x403525
mov ebp, dword [0x4170a4]
push dword [ebp + 8]
call fcn.0040a787
jmp 0x403506
push dword [0x417098]
call fcn.0040a3e3
mov dword [esp], eax
mov ebx, dword [esp]
and ebx, ebx
jle 0x40357e
push 5
push 0
push 1
push dword [0x417098]
call fcn.00406f50
push dword [0x417098]
call fcn.0040a3ed
push dword [0x417098]
call fcn.0040a402
or eax, eax
je 0x40357e
mov ebp, dword [0x41709c]
push dword [ebp + 0xc]
call sub.KERNEL32.DLL_RemoveDirectoryW
jmp 0x40355f
mov eax, 1
jmp 0x403587
add esp, 4
pop ebx
pop ebp
ret

Function at 0x405436
Capabilities:
Terminate thread

Disassembly:
push ebx
push esi
push edi
mov edi, dword [esp + 0x10]
push 0
push edi
call fcn.004053ea
push eax
call dword [sym.imp.KERNEL32.DLL_TerminateThread]
mov ebx, 0x4176a0
push ebx
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov esi, dword [0x4170bc]
jmp 0x405467
cmp dword [esi + 0xc], edi
je 0x40546d
mov esi, dword [esi]
test esi, esi
jne 0x405460
jmp 0x405485
add esi, 8
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
push 0x4170bc
call fcn.0040dad2
pop ecx
pop ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop edi
pop esi
pop ebx
ret 4

Function at 0x405492
Capabilities:
Create thread

Disassembly:
push ecx
push ebp
push esi
lea eax, [esp + 8]
xor esi, esi
push eax
push esi
push dword [esp + 0x1c]
push dword [esp + 0x1c]
push 0x1000
push esi
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov ebp, eax
test ebp, ebp
je 0x40552a
push edi
push 0x4176a0
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov edi, dword [0x4170bc]
test edi, edi
je 0x4054fe
push ebx
push esi
lea ebx, [edi + 8]
push dword [ebx]
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
test eax, eax
jne 0x4054f7
push dword [ebx]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov edi, dword [edi]
push ebx
push 0x4170bc
call fcn.0040dad2
pop ecx
pop ecx
jmp 0x4054f9
mov edi, dword [edi]
test edi, edi
jne 0x4054ce
pop ebx
mov eax, dword [0x416110]
mov esi, eax
inc eax
push 0x10
push 0x4170bc
mov dword [0x416110], eax
call fcn.0040db12
pop ecx
pop ecx
push 0x4176a0
mov dword [eax], ebp
mov dword [eax + 4], esi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ecx
ret 8
Function at 0x40559a
Capabilities:
Check os version

Disassembly:
sub esp, 0x34c
push ebx
push ebp
push esi
push edi
lea eax, [esp + 0x10]
mov dword [esp + 0x10], 0x114
push eax
mov esi, 0xc8
xor ebx, ebx
xor edi, edi
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x4056f2
mov eax, dword [esp + 0x20]
dec eax
je 0x4056d5
dec eax
jne 0x4056f2
lea eax, [esp + 0x124]
xor ebp, ebp
push eax
call fcn.00405553
pop ecx
test eax, eax
je 0x405606
mov ebx, dword [esp + 0x128]
mov edi, dword [esp + 0x12c]
cmp byte [esp + 0x23e], 1
jmp 0x405633
lea eax, [esp + 0x240]
mov dword [esp + 0x240], 0x11c
push eax
call dword [sym.imp.KERNEL32.DLL_GetVersionExW]
test eax, eax
je 0x405638
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x18]
cmp byte [esp + 0x35a], 1
jne 0x405638
xor ebp, ebp
inc ebp
sub ebx, 3
je 0x4056d1
dec ebx
je 0x4056cd
dec ebx
je 0x4056ac
dec ebx
je 0x405666
sub ebx, 4
jne 0x4056f2
test edi, edi
jne 0x4056f2
push 0x6e
jmp 0x4056f1
sub edi, 0
je 0x40569e
dec edi
je 0x405690
dec edi
je 0x405682
dec edi
jne 0x4056f2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x69
jmp 0x4056f2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x5f
jmp 0x4056f2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x55
jmp 0x4056f2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x4b
jmp 0x4056f2
sub edi, 0
je 0x4056c9
dec edi
je 0x4056c5
dec edi
jne 0x4056f2
mov esi, ebp
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x41
jmp 0x4056f2
push 0x3c
jmp 0x4056f1
push 0x32
jmp 0x4056f1
push 0x14
jmp 0x4056f1
push 5
jmp 0x4056f1
mov eax, dword [esp + 0x18]
test eax, eax
je 0x4056ef
cmp eax, 0xa
je 0x4056eb
cmp eax, 0x5a
jne 0x4056f2
push 0x28
jmp 0x4056f1
push 0x1e
jmp 0x4056f1
push 0xa
pop esi
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x34c
ret
Function at 0x409528
Capabilities:
Enumerate gui resources

Disassembly:
cmp dword [esp + 4], 0
push ebx
push esi
push edi
je 0x40957d
push dword [esp + 0x10]
push 0x4094a7
call dword [sym.imp.USER32.DLL_EnumWindows]
mov esi, dword [0x4170e4]
test esi, esi
je 0x4095d6
xor edi, edi
mov ebx, dword [esi]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
cmp dword [esi + 8], eax
jne 0x409575
cmp byte [esi + 0x10], 0
je 0x409575
push 3
push edi
push edi
push edi
push edi
push 0xfffffffffffffffe
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
mov esi, ebx
test ebx, ebx
jne 0x409551
jmp 0x4095d6
mov esi, dword [0x4170e4]
test esi, esi
je 0x4095d6
xor edi, edi
push ebp
mov ebx, dword [esi]
lea ebp, [esi + 8]
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
cmp dword [ebp], eax
jne 0x4095cf
cmp byte [esi + 0x11], 0
je 0x4095ab
push 1
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_EnableWindow]
cmp byte [esi + 0x10], 0
je 0x4095c2
push 3
push edi
push edi
push edi
push edi
push 0xffffffffffffffff
push dword [esi + 0xc]
call dword [sym.imp.USER32.DLL_SetWindowPos]
push ebp
push 0x4170e4
call fcn.0040dad2
pop ecx
pop ecx
mov esi, ebx
test ebx, ebx
jne 0x40958a
pop ebp
pop edi
pop esi
pop ebx
ret 4

Function at 0x4096da
Capabilities:
Accept command line arguments

Disassembly:
push ecx
push ecx
push ebx
push ebp
push esi
push edi
push dword [0x4176c4]
call fcn.0040d288
mov ebp, eax
or ebx, 0xffffffff
xor eax, eax
mov esi, eax
call dword [sym.imp.KERNEL32.DLL_GetCommandLineW]
mov edi, dword [esp + 0x1c]
movzx edx, word [eax]
test dx, dx
je 0x4097da
mov ecx, dword [esp + 0x1c]
mov dword [esp + 0x10], 0x20
mov dword [esp + 0x14], 0x22
cmp dx, word [esp + 0x10]
jne 0x409730
push 0x20
pop edx
add eax, 2
cmp word [eax], dx
je 0x409728
movzx edx, word [eax]
mov dword [esp + 0x1c], 1
cmp dx, word [esp + 0x14]
jne 0x409770
add eax, 2
mov esi, eax
movzx ecx, word [eax]
test cx, cx
je 0x4097b2
push 0x22
pop edx
cmp cx, dx
je 0x409762
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x409752
xor ecx, ecx
cmp word [eax], cx
je 0x4097b2
mov ecx, eax
add eax, 2
jmp 0x4097b4
test dx, dx
je 0x4097ba
push 0x20
mov esi, eax
pop ecx
cmp dx, cx
je 0x409762
add eax, 2
push 0x22
pop edx
cmp word [eax], dx
jne 0x4097a8
add eax, 2
movzx ecx, word [eax]
test cx, cx
je 0x4097b2
cmp cx, dx
je 0x4097a5
add eax, 2
movzx ecx, word [eax]
test cx, cx
jne 0x409795
push 0x20
pop ecx
movzx edx, word [eax]
test dx, dx
jne 0x40977a
jmp 0x409762
mov ecx, eax
mov edx, dword [esp + 0x1c]
jmp 0x4097bc
xor edx, edx
cmp dword [ebp], ebx
jne 0x4097c5
test edi, edi
jne 0x4097e2
test edx, edx
je 0x4097ca
inc ebx
xor edx, edx
mov esi, edx
movzx edx, word [eax]
test dx, dx
jne 0x40971e
test edi, edi
jne 0x4097f3
mov eax, ebx
jmp 0x4097f7
test esi, esi
je 0x4097f3
sub ecx, esi
mov eax, esi
sar ecx, 1
mov dword [edi], ecx
inc dword [ebp]
jmp 0x4097f7
xor ecx, ecx
mov dword [edi], ecx
pop edi
pop esi
pop ebp
pop ebx
pop ecx
pop ecx
ret
Function at 0x40a665
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x40a6dd
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcsncpy
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call sub.MSVCRT.dll_wcslen
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x40a6be
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x40a6bb
cmp ecx, 0x5c
je 0x40a6bb
cmp ecx, 0x2f
jne 0x40a6c8
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x40a6a8
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.DLL_CreateDirectoryW]
jmp 0x40a6df
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40a6e5
Capabilities:
Set file attributes

Disassembly:
xor eax, eax
cmp dword [esp + 4], eax
je 0x40a6f3
jmp dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
ret 8

Function at 0x40a759
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x40a782
test byte [esp + 8], 2
je 0x40a776
push pe_nt_image_headers32
push dword [esp + 8]
call dword [sym.imp.KERNEL32.DLL_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.DLL_DeleteFileW]
jmp 0x40a784
xor eax, eax
ret 8

Function at 0x40a9e0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0xc]
mov dword [esp + 4], 0
cmp dword [esi + 0x14], 0
jne 0x40aa1c
push 0
lea eax, [esp + 8]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push dword [esi + 4]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 4
xor eax, eax
pop esi
pop ecx
ret 4

Function at 0x40ae20
Capabilities:
Write file on windows

Disassembly:
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x40af14
cmp word [edx], 0
je 0x40af14
mov ecx, dword [esp + 0x10]
push esi
cmp ecx, 0x19
jne 0x40aead
mov esi, dword [esp + 0xc]
mov ecx, edx
push edi
cmp dword [esi + 4], 0
lea edi, [ecx + 2]
je 0x40ae80
jmp 0x40ae60
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ae60
sub ecx, edi
sar ecx, 1
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0040afc0
pop edi
pop esi
pop ecx
ret 0xc
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40ae80
sub ecx, edi
lea eax, [esp + 8]
push 0
sar ecx, 1
push eax
lea eax, [ecx + ecx]
push eax
push edx
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
cmp ecx, 2
lea ecx, [esp + 0x10]
setne al
push ecx
dec eax
and eax, 0xfde9
push edx
push eax
call fcn.0040b0d0
mov esi, eax
test esi, esi
je 0x40af0b
mov eax, dword [esp + 0xc]
cmp dword [eax + 4], 0
je 0x40aee8
push dword [esp + 0x10]
push esi
push eax
call fcn.0040afc0
mov dword [esp + 4], eax
jmp 0x40aefc
push 0
lea ecx, [esp + 8]
push ecx
push dword [esp + 0x18]
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push esi
push 0
push dword [0x417008]
call dword [sym.imp.KERNEL32.DLL_HeapFree]
mov eax, dword [esp + 4]
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc
Function at 0x40af50
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x40afb5
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x40afad
push dword [esp + 0x10]
push dword [0x41771c]
call fcn.0040d3f9
test eax, eax
je 0x40afa3
cmp dword [eax + 4], 0
je 0x40af92
push edi
push esi
push eax
call fcn.0040afc0
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea ecx, [esp + 0xc]
push ecx
push edi
push esi
push dword [eax]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
pop edi
xor eax, eax
pop esi
pop ecx
ret 0xc
xor eax, eax
pop esi
pop ecx
ret 0xc

Function at 0x40afc0
Capabilities:
Write file on windows

Disassembly:
sub esp, 0xc
push esi
mov esi, dword [esp + 0x14]
mov dword [esp + 4], 0
cmp dword [esi + 0x1c], 0
jne 0x40b0c7
cmp dword [esi + 0x14], 1
jne 0x40b00b
mov eax, dword [esi + 0xc]
lea ecx, [esp + 0xc]
push 1
neg eax
cdq
push ecx
push eax
push dword [esi]
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], edx
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
mov eax, dword [esi + 8]
mov dword [esi + 0x14], 0
mov dword [esi + 0xc], eax
mov eax, dword [esi + 0xc]
push edi
mov edi, dword [esp + 0x20]
cmp eax, edi
jle 0x40b088
mov ecx, dword [esi + 8]
add ecx, dword [esi + 4]
sub ecx, eax
mov eax, edi
dec eax
je 0x40b073
dec eax
je 0x40b05c
sub eax, 2
je 0x40b047
push edi
push dword [esp + 0x20]
push ecx
call sub.MSVCRT.dll_memcpy
add esp, 0xc
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov eax, dword [eax]
mov dword [ecx], eax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov ax, word [eax]
mov word [ecx], ax
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
mov eax, dword [esp + 0x1c]
mov al, byte [eax]
mov byte [ecx], al
mov eax, edi
sub dword [esi + 0xc], edi
pop edi
pop esi
add esp, 0xc
ret 0xc
push esi
call fcn.0040a9e0
mov eax, dword [esi + 8]
cmp edi, eax
jl 0x40b0b5
push 0
lea eax, [esp + 0xc]
push eax
push edi
push dword [esp + 0x28]
push dword [esi]
call dword [sym.imp.KERNEL32.DLL_WriteFile]
mov eax, dword [esp + 8]
pop edi
pop esi
add esp, 0xc
ret 0xc
mov ecx, dword [esi + 4]
sub ecx, dword [esi + 0xc]
push edi
push dword [esp + 0x20]
add ecx, eax
jmp 0x40b031
xor eax, eax
pop esi
add esp, 0xc
ret 0xc

Function at 0x40b2b1
Capabilities:
Hash data using sha1

Disassembly:
mov ecx, dword [esp + 4]
mov eax, dword [esp + 8]
and dword [ecx + 0x18], 0
and dword [ecx + 0x14], 0
mov dword [ecx], 0x67452301
mov dword [ecx + 4], 0xefcdab89
mov dword [ecx + 8], 0x98badcfe
mov dword [ecx + 0xc], 0x10325476
mov dword [ecx + 0x10], 0xc3d2e1f0
mov dword [ecx + 0x5c], eax
ret
Function at 0x40c810
Capabilities:
Hash data with md5

Disassembly:
mov eax, dword [esp + 4]
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
ret

Function at 0x40d288
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push edi
push dword [0x417610]
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x40d2e9
push esi
push dword [0x41760c]
push 8
push dword [0x417008]
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov edi, eax
push edi
push dword [0x417610]
call dword [sym.imp.KERNEL32.DLL_TlsSetValue]
mov esi, dword [0x417608]
jmp 0x40d2d9
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x40d2d7
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x40d2c7
push edi
push 0x40d226
call fcn.00411d62
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4

Function at 0x40d2f3
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
mov esi, dword [esp + 0x10]
mov ecx, esi
push edi
and ecx, 3
je 0x40d309
push 4
pop eax
sub eax, ecx
add esi, eax
mov eax, dword [0x41760c]
mov ebx, dword [sym.imp.KERNEL32.DLL_TlsSetValue]
test eax, eax
jne 0x40d340
call dword [sym.imp.KERNEL32.DLL_TlsAlloc]
push esi
push 8
push dword [0x417008]
mov dword [0x417610], eax
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
push eax
push dword [0x417610]
call ebx
mov eax, dword [0x41760c]
mov edi, eax
add eax, esi
push eax
push dword [0x417610]
mov dword [0x41760c], eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
push eax
push 8
push dword [0x417008]
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x417610]
call ebx
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test esi, esi
jne 0x40d380
test ebx, ebx
je 0x40d3a1
push 0x14
push 0x417608
call fcn.0040db12
pop ecx
pop ecx
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], ebx
test esi, esi
je 0x40d3a1
lea ecx, [edi + ebp]
push ecx
call esi
pop ecx
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
ret 0xc
Function at 0x40de60
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 8]
sub edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 8]
cmp dword [eax], 0
jne 0x40dea6
mov ecx, dword [ebp - 4]
add ecx, 0xa
push ecx
push 0
mov edx, dword [0x417720]
push edx
call dword [sym.imp.KERNEL32.DLL_HeapAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jmp 0x40dec7
mov edx, dword [ebp - 4]
add edx, 0xa
push edx
mov eax, dword [ebp + 8]
mov ecx, dword [eax]
push ecx
push 0
mov edx, dword [0x417720]
push edx
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
shr edx, 1
push edx
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
mov eax, dword [edx]
push eax
call fcn.0040e300
mov ecx, dword [ebp - 8]
mov edx, dword [ebp + 0xc]
mov dword [ecx + 8], edx
mov esp, ebp
pop ebp
ret 8

Function at 0x40e020
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
add edx, 2
mov eax, dword [ebp - 4]
mov dword [eax + 8], edx
mov esp, ebp
pop ebp
ret

Function at 0x40e050
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
mov edx, dword [ebp - 4]
add eax, dword [edx + 8]
mov esp, ebp
pop ebp
ret

Function at 0x40e180
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
cmp edx, dword [ecx]
jb 0x40e1be
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
cmp dword [ebp + 8], ecx
ja 0x40e1be
mov eax, dword [ebp - 4]
mov ecx, dword [ebp + 8]
sub ecx, dword [eax]
add ecx, 1
mov eax, ecx
jmp 0x40e1c0
xor eax, eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40e1d0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov eax, dword [ecx]
add eax, dword [ebp + 8]
mov esp, ebp
pop ebp
ret 4
Function at 0x40e200
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x40e224
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 8]
mov dword [ebp + 0xc], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax + 8]
mov edx, dword [ebp + 8]
lea eax, [ecx + edx*2]
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx + 4]
sub edx, 4
cmp dword [ebp - 8], edx
jl 0x40e272
mov eax, dword [ebp - 8]
add eax, 0x4000
mov ecx, dword [ebp - 4]
mov dword [ecx + 4], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx + 4]
add eax, 0xa
push eax
mov ecx, dword [ebp - 4]
mov edx, dword [ecx]
push edx
push 0
mov eax, dword [0x417720]
push eax
call dword [sym.imp.KERNEL32.DLL_HeapReAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov edx, dword [ebp - 4]
mov eax, dword [edx]
add eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
lea eax, [edx + ecx*2]
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret 8

Function at 0x40e350
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ecx
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
shl ecx, 1
mov edx, dword [ebp - 4]
mov eax, dword [edx + 8]
sub eax, ecx
mov ecx, dword [ebp - 4]
mov dword [ecx + 8], eax
mov esp, ebp
pop ebp
ret 4

Function at 0x40e6a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
mov eax, dword [0x416170]
push eax
call dword [sym.imp.KERNEL32.DLL_TlsGetValue]
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 4]
mov edx, dword [ebp + 8]
mov dword [ecx + 8], edx
mov eax, dword [ebp - 4]
mov ecx, dword [eax]
mov edx, dword [ebp - 4]
add ecx, dword [edx + 8]
mov dword [ebp - 8], ecx
mov eax, dword [ebp - 8]
mov esp, ebp
pop ebp
ret 4

Function at 0x40e800
Capabilities:
Compress data via zlib inflate or deflate

Disassembly:
mov ecx, dword [esp + 4]
sub esp, 0x34
push edi
test ecx, ecx
je 0x40fe36
mov edi, dword [ecx + 0x1c]
mov dword [esp + 0x14], edi
test edi, edi
je 0x40fe36
cmp dword [ecx + 0xc], 0
je 0x40fe36
cmp dword [ecx], 0
jne 0x40e838
cmp dword [ecx + 4], 0
jne 0x40fe36
cmp dword [edi], 0xb
jne 0x40e843
mov dword [edi], 0xc
mov eax, dword [ecx + 0xc]
mov edx, dword [edi + 0x38]
mov dword [esp + 0x18], eax
mov eax, dword [ecx + 0x10]
push ebx
mov ebx, dword [ecx]
mov dword [esp + 0x10], eax
mov dword [esp + 0x20], eax
xor eax, eax
push ebp
mov ebp, dword [ecx + 4]
mov dword [esp + 0x28], eax
mov eax, dword [edi]
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], edx
mov dword [esp + 0x38], ebp
push esi
mov esi, dword [edi + 0x3c]
cmp eax, 0x1e
ja 0x40f1b5
lea ebx, [edi + 0x54]
mov dword [esp + 0x40], ebx
mov ebx, dword [esp + 0x14]
jmp 0x40e890
jmp dword [eax*4 + 0x40fe40]
pop esi
pop ebp
pop ebx
mov eax, 0xfffffffe
pop edi
add esp, 0x34
ret
mov eax, 0xfffffffe
pop edi
add esp, 0x34
ret