joyce8/EMBER2024-capa huggingface dataset:
Function at 0x404f92
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 8]
xor ebx, ebx
push edi
mov edi, ebx
cmp dword [esi], 1
jne 0x404fb8
push ebx
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [esi + 8]
call dword [sym.imp.WS2_32.dll_recv]
mov edi, eax
jmp 0x404ff5
cmp dword [esi + 0x2c], ebx
je 0x404ff5
mov edi, dword [ebp + 0x10]
cmp edi, dword [esi + 0x30]
jle 0x404fc8
mov edi, dword [esi + 0x30]
push edi
push dword [esi + 0x34]
push dword [ebp + 0xc]
call fcn.00414ba0
sub dword [esi + 0x30], edi
add esp, 0xc
add dword [esi + 0x34], edi
cmp dword [esi + 0x30], ebx
jne 0x404ff5
push dword [esi + 0x2c]
push ebx
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [esi + 0x2c], ebx
mov eax, edi
pop edi
pop esi
pop ebx
pop ebp
ret 0xc

Function at 0x404ffe
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
cmp dword [eax], 1
jne 0x40501c
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [eax + 8]
call dword [sym.imp.WS2_32.dll_send]
jmp 0x40504f
mov edx, dword [eax + 0x24]
xor ecx, ecx
cmp byte [eax + 0x20], cl
push esi
setne cl
lea esi, [eax + 4]
dec ecx
and ecx, 0xfffffff4
add ecx, 0x1c
test edx, edx
je 0x40503a
mov eax, dword [edx]
jmp 0x40503d
mov eax, dword [eax + 0x28]
push ecx
push esi
push 0
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push eax
call dword [sym.imp.WS2_32.dll_sendto]
pop esi
pop ebp
ret 0xc

Function at 0x40523a
Capabilities:
Get memory capacity
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x90
lea eax, [ebp - 0x40]
push 0x40
push 0
push eax
call fcn.00401510
add esp, 0xc
cmp dword [ebp + 8], 6
jne 0x40526b
lea eax, [ebp - 0x64]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x60]
jmp 0x4052f7
lea eax, [ebp - 0x40]
mov dword [ebp - 0x40], 0x40
push eax
call dword [sym.imp.KERNEL32.dll_GlobalMemoryStatusEx]
test eax, eax
je 0x4052d1
mov eax, dword [ebp + 8]
sub eax, 0
je 0x4052c9
sub eax, 1
je 0x4052c1
sub eax, 1
je 0x4052b9
sub eax, 1
je 0x4052b1
sub eax, 1
je 0x4052a9
sub eax, 1
jne 0x4052d1
mov eax, dword [ebp - 0x20]
mov edx, dword [ebp - 0x1c]
jmp 0x4052f9
mov eax, dword [ebp - 0x28]
mov edx, dword [ebp - 0x24]
jmp 0x4052f9
mov eax, dword [ebp - 0x10]
mov edx, dword [ebp - 0xc]
jmp 0x4052f9
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
jmp 0x4052f9
mov eax, dword [ebp - 0x30]
mov edx, dword [ebp - 0x2c]
jmp 0x4052f9
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x34]
jmp 0x4052f9
cmp dword [ebp + 8], 7
jne 0x4052f5
push 0x2c
lea eax, [ebp - 0x90]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call sub.KERNEL32.dll_K32GetProcessMemoryInfo
test eax, eax
je 0x4052f5
mov eax, dword [ebp - 0x68]
jmp 0x4052f7
xor eax, eax
xor edx, edx
leave
ret 4
Function at 0x4052fd
Capabilities:
Check os version

Disassembly:
sub esp, 0x34c
push ebp
push esi
push edi
lea eax, [esp + 0xc]
mov dword [esp + 0xc], 0x114
push eax
mov esi, 0xc8
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405481
mov eax, dword [esp + 0x1c]
sub eax, 1
je 0x405464
sub eax, 1
jne 0x405481
lea eax, [esp + 0x120]
xor edi, edi
push eax
call fcn.0040548d
pop ecx
test eax, eax
je 0x405371
mov ecx, dword [esp + 0x124]
mov eax, dword [esp + 0x128]
mov ebp, dword [esp + 0x12c]
cmp byte [esp + 0x23a], 1
jmp 0x4053a2
lea eax, [esp + 0x23c]
mov dword [esp + 0x23c], 0x11c
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x405481
mov ecx, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
cmp byte [esp + 0x356], 1
jne 0x4053a7
xor edi, edi
inc edi
sub ecx, 3
je 0x405460
sub ecx, 1
je 0x40545c
sub ecx, 1
je 0x405437
sub ecx, 1
je 0x4053e7
sub ecx, 4
jne 0x405481
test eax, eax
jne 0x405481
cmp ebp, 0x55f0
sbb esi, esi
and esi, 0xfffffff6
add esi, 0x78
jmp 0x405481
sub eax, 0
je 0x405429
sub eax, 1
je 0x40541b
sub eax, 1
je 0x40540d
sub eax, 1
jne 0x405481
mov esi, edi
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x69
jmp 0x405481
mov esi, edi
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x5f
jmp 0x405481
mov esi, edi
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x55
jmp 0x405481
mov esi, edi
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x4b
jmp 0x405481
sub eax, 0
je 0x405458
sub eax, 1
je 0x405454
sub eax, 1
jne 0x405481
mov esi, edi
neg esi
sbb esi, esi
and esi, 0xfffffffb
add esi, 0x41
jmp 0x405481
push 0x3c
jmp 0x405480
push 0x32
jmp 0x405480
push 0x14
jmp 0x405480
push 5
jmp 0x405480
mov eax, dword [esp + 0x14]
test eax, eax
je 0x40547e
cmp eax, 0xa
je 0x40547a
cmp eax, 0x5a
jne 0x405481
push 0x28
jmp 0x405480
push 0x1e
jmp 0x405480
push 0xa
pop esi
pop edi
mov eax, esi
pop esi
pop ebp
add esp, 0x34c
ret

Function at 0x405516
Capabilities:
Copy file

Disassembly:
cmp dword [esp + 4], 0
je 0x405536
cmp dword [esp + 8], 0
je 0x405536
push 0
push dword [esp + 0xc]
push dword [esp + 0xc]
call dword [sym.imp.KERNEL32.dll_CopyFileW]
jmp 0x405538
xor eax, eax
ret 8

Function at 0x40570d
Capabilities:
Create directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
cmp dword [ebp + 8], 0
je 0x405785
push 0x104
push dword [ebp + 8]
lea eax, [ebp - 0x20c]
push eax
call fcn.004151ad
xor eax, eax
mov word [ebp - 4], ax
lea eax, [ebp - 0x20c]
push eax
call fcn.004157c7
lea ecx, [ebp - 0x20c]
add esp, 0x10
lea eax, [ecx + eax*2]
jmp 0x405766
movzx ecx, word [eax - 2]
cmp ecx, 0x20
je 0x405763
cmp ecx, 0x5c
je 0x405763
cmp ecx, 0x2f
jne 0x405770
add eax, 0xfffffffe
lea ecx, [ebp - 0x20c]
cmp eax, ecx
ja 0x405750
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x20c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateDirectoryW]
jmp 0x405787
xor eax, eax
leave
ret 4
Function at 0x405ac8
Capabilities:
Delete file
Set file attributes

Disassembly:
cmp dword [esp + 4], 0
je 0x405af1
test byte [esp + 8], 2
je 0x405ae5
push 0x80
push dword [esp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push dword [esp + 4]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
jmp 0x405af3
xor eax, eax
ret 8

Function at 0x405ba8
Capabilities:
Check if file exists

Disassembly:
xor eax, eax
push ebp
mov ebp, eax
mov eax, dword [0x4d81f8]
push esi
test eax, eax
jne 0x405bcd
push fcn.00405b76
push 0x10
push 0x258
call fcn.004156a0
mov dword [0x4d81f8], eax
push dword [esp + 0xc]
push eax
call fcn.00415528
mov esi, eax
test esi, esi
je 0x405cce
push edi
mov edi, dword [esp + 0x14]
test edi, edi
jne 0x405bef
mov edi, 0x4bc6bc
push ebx
mov ebx, dword [esp + 0x1c]
test ebx, ebx
je 0x405bff
xor eax, eax
cmp word [ebx], ax
jne 0x405c04
mov ebx, 0x4bc594
push edi
call fcn.004157c7
push ebx
mov dword [esp + 0x24], eax
call fcn.004157c7
add eax, dword [esp + 0x24]
pop ecx
pop ecx
lea eax, [eax*2 + 4]
push eax
xor eax, eax
push eax
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [esp + 0x18], eax
test eax, eax
je 0x405cb5
push edi
push eax
call fcn.004157a5
mov eax, dword [esp + 0x24]
pop ecx
pop ecx
test eax, eax
je 0x405c65
cmp word [edi + eax*2 - 2], 0x5c
mov edi, dword [esp + 0x18]
je 0x405c69
push 0x4bba94
push edi
call fcn.00415774
pop ecx
pop ecx
jmp 0x405c69
mov edi, dword [esp + 0x18]
push ebx
push edi
call fcn.00415774
pop ecx
pop ecx
lea eax, [esi + 8]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x405c8d
xor eax, eax
mov ebp, esi
mov dword [esi + 4], eax
jmp 0x405ca3
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jne 0x405ca1
mov dword [esi + 4], 1
mov ebp, esi
xor eax, eax
push edi
push eax
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
test ebp, ebp
jne 0x405ccc
cmp dword [esp + 0x14], 0xffffffff
je 0x405cc0
mov esi, dword [esp + 0x14]
push esi
push dword [0x4d81f8]
call fcn.00415651
pop ebx
pop edi
pop esi
mov eax, ebp
pop ebp
ret 0xc
Function at 0x405d19
Capabilities:
Get disk information
Get file attributes

Disassembly:
mov eax, dword [esp + 4]
sub esp, 0x45c
push esi
or esi, 0xffffffff
push edi
mov edi, esi
test eax, eax
je 0x405e61
xor ecx, ecx
cmp word [eax], cx
je 0x405e61
push 0x104
push eax
lea eax, [esp + 0x10]
push eax
call fcn.004151ad
xor eax, eax
mov word [esp + 0x21c], ax
lea eax, [esp + 0x14]
push eax
call fcn.004157c7
add esp, 0x10
lea ecx, [esp + eax*2 + 6]
cmp eax, 2
je 0x405d72
cmp eax, 3
jne 0x405dac
cmp word [esp + 0xa], 0x3a
jne 0x405dac
cmp eax, 2
jne 0x405d90
lea eax, [esp + 8]
push 0x4bba94
push eax
call fcn.00415774
pop ecx
pop ecx
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x405e61
push 0xfffffffffffffffe
pop edi
jmp 0x405e61
push ebx
push ebp
push 0x5c
pop ebp
push 0x2f
pop ebx
movzx eax, word [ecx]
cmp ax, bp
je 0x405dc1
cmp ax, bx
jne 0x405dcb
xor eax, eax
mov word [ecx], ax
sub ecx, 2
jmp 0x405db4
lea eax, [esp + 0x21c]
push eax
lea eax, [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_FindFirstFileW]
cmp eax, esi
je 0x405e0a
test byte [esp + 0x21c], 0x10
je 0x405df1
push 0xfffffffffffffffe
pop edi
jmp 0x405e01
mov esi, dword [esp + 0x238]
xor edi, edi
or edi, dword [esp + 0x23c]
push eax
call dword [sym.imp.KERNEL32.dll_FindClose]
jmp 0x405e5f
cmp word [esp + 0x10], bp
jne 0x405e18
cmp word [esp + 0x12], bp
je 0x405e37
cmp word [esp + 0x10], bx
jne 0x405e26
cmp word [esp + 0x12], bx
je 0x405e37
push 0x2e
pop eax
cmp word [esp + 0x10], ax
jne 0x405e5f
cmp word [esp + 0x12], ax
jne 0x405e5f
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, esi
je 0x405e4c
test al, 0x10
je 0x405e5f
jmp 0x405e5c
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetDriveTypeW]
cmp eax, 1
jbe 0x405e5f
push 0xfffffffffffffffe
pop edi
pop ebp
pop ebx
mov eax, edi
mov edx, esi
pop edi
pop esi
add esp, 0x45c
ret 4

Function at 0x406160
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 0x40619c
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 0x4061b0
Capabilities:
Write file on windows

Disassembly:
push edi
mov edi, dword [esp + 8]
cmp edi, 0xffffffff
jne 0x4061c9
push dword [0x4d81fc]
call fcn.00415d71
pop edi
ret 4
push esi
push edi
push dword [0x4d81fc]
call fcn.004155bc
mov esi, eax
test esi, esi
je 0x406233
mov ecx, dword [esi + 4]
test ecx, ecx
je 0x40621f
cmp dword [esi + 0x14], 0
mov dword [esp + 0xc], 0
jne 0x40620e
push 0
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 8]
sub eax, dword [esi + 0xc]
push eax
push ecx
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [esi + 8]
mov dword [esi + 0xc], eax
push dword [esi + 4]
push 0
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
push dword [esi]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
push dword [0x4d81fc]
call fcn.00415651
pop esi
pop edi
ret 4

Function at 0x406b00
Capabilities:
Read file on windows

Disassembly:
sub esp, 8
push esi
push dword [esp + 0x10]
mov dword [esp + 8], 0
push dword [0x4d81fc]
call fcn.004155bc
mov esi, eax
test esi, esi
je 0x406b7f
cmp dword [esi + 4], 0
je 0x406b50
push 1
lea eax, [esp + 8]
push eax
push esi
call fcn.0041ad50
test eax, eax
je 0x406b44
inc dword [esi + 0xc]
xor eax, eax
pop esi
add esp, 8
ret 4
mov eax, 1
pop esi
add esp, 8
ret 4
push 0
lea eax, [esp + 0xc]
push eax
push 1
lea eax, [esp + 0x1c]
push eax
push dword [esi]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406b8a
cmp dword [esp + 8], 0
je 0x406b8a
push 1
push 0
push 0xffffffffffffffff
push dword [esi]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov eax, dword [esp + 4]
pop esi
add esp, 8
ret 4
or eax, 0xffffffff
pop esi
add esp, 8
ret 4

Function at 0x406c00
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x4d81fc]
call fcn.004155bc
test eax, eax
je 0x406c1c
mov dword [esp + 4], eax
jmp fcn.00406160
xor eax, eax
ret 4

Function at 0x406dd0
Capabilities:
Write file on windows

Disassembly:
push ecx
push esi
mov esi, dword [esp + 0x10]
mov dword [esp + 4], 0
test esi, esi
je 0x406e35
push edi
mov edi, dword [esp + 0x18]
test edi, edi
je 0x406e2d
push dword [esp + 0x10]
push dword [0x4d81fc]
call fcn.004155bc
test eax, eax
je 0x406e23
cmp dword [eax + 4], 0
je 0x406e12
push edi
push esi
push eax
call fcn.0041b350
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 0x406e90
Capabilities:
Write file on windows

Disassembly:
push dword [esp + 4]
push dword [0x4d81fc]
call fcn.004155bc
test eax, eax
je 0x406eac
mov dword [esp + 4], eax
jmp 0x406ec0
xor eax, eax
ret 0xc
push ecx
mov edx, dword [esp + 0xc]
mov dword [esp], 0
test edx, edx
je 0x406fbf
cmp word [edx], 0
je 0x406fbf
mov ecx, dword [esp + 0x10]
push esi
mov esi, dword [esp + 0xc]
test ecx, ecx
jne 0x406eee
mov ecx, dword [esi + 0x18]
push edi
cmp ecx, 0x19
jne 0x406f44
mov ecx, edx
lea edi, [ecx + 2]
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x406f00
sub ecx, edi
sar ecx, 1
cmp dword [esi + 4], 0
je 0x406f26
lea eax, [ecx + ecx]
push eax
push edx
push esi
call fcn.0041b350
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
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
lea eax, [esp + 0x14]
push eax
xor eax, eax
cmp ecx, 2
push edx
setne al
dec eax
and eax, 0xfde9
push eax
call fcn.0041b470
mov edi, eax
test edi, edi
je 0x406f3a
cmp dword [esi + 4], 0
je 0x406f92
push dword [esp + 0x14]
push edi
push esi
call fcn.0041b350
push edi
push 0
push dword [0x4d7b78]
mov dword [esp + 0x14], eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
push 0
lea eax, [esp + 0xc]
push eax
push dword [esp + 0x1c]
push edi
push dword [esi]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push edi
push 0
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 8]
pop edi
pop esi
pop ecx
ret 0xc
xor eax, eax
pop ecx
ret 0xc

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

Disassembly:
push edi
push dword [0x4d8254]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x407b87
push esi
push dword [0x4d8250]
push 8
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
push edi
push dword [0x4d8254]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov esi, dword [0x4d824c]
jmp 0x407b77
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x407b75
mov eax, dword [esi + 8]
add eax, edi
push eax
call ecx
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x407b65
push edi
push 0x407c49
call fcn.0040989d
pop esi
mov eax, dword [esp + 8]
add eax, edi
pop edi
ret 4
Function at 0x407b91
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x14]
mov ecx, edi
and ecx, 3
je 0x407ba7
push 4
pop eax
sub eax, ecx
add edi, eax
mov esi, dword [0x4d8250]
mov ebx, dword [sym.imp.KERNEL32.dll_TlsSetValue]
test esi, esi
jne 0x407be0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push edi
push 8
push dword [0x4d7b78]
mov dword [0x4d8254], eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
push eax
push dword [0x4d8254]
call ebx
mov esi, dword [0x4d8250]
lea eax, [edi + esi]
push eax
push dword [0x4d8254]
mov dword [0x4d8250], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
push eax
push 8
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ebp, eax
push ebp
push dword [0x4d8254]
call ebx
mov edi, dword [esp + 0x18]
mov ebx, dword [esp + 0x1c]
test edi, edi
jne 0x407c1f
test ebx, ebx
je 0x407c40
push 0x14
push 0x4d824c
call fcn.00409bfb
pop ecx
pop ecx
mov dword [eax], esi
mov dword [eax + 4], edi
mov dword [eax + 8], ebx
test edi, edi
je 0x407c40
lea ecx, [esi + ebp]
push ecx
call edi
pop ecx
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
ret 0xc

Function at 0x408560
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [esp + 0x18]
mov edi, eax
mov ebp, dword [esp + 0x14]
mov esi, dword [edi + 8]
mov ecx, dword [ebp]
sub esi, ebx
lea eax, [esi + 0xa]
push eax
test ecx, ecx
jne 0x408599
push ecx
push dword [0x4d8260]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x4085a8
push ecx
push 0
push dword [0x4d8260]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov ecx, eax
shr esi, 1
mov dword [ebp], ecx
mov eax, dword [edi]
push esi
add eax, ebx
push eax
push ecx
call fcn.004154f0
mov dword [edi + 8], ebx
pop edi
pop esi
pop ebp
pop ebx
ret 8

Function at 0x408710
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax + 8]
add ecx, dword [eax]
mov eax, ecx
ret

Function at 0x408760
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add dword [eax + 8], 2
ret
Function at 0x40989d
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x4d82d0], 0
push ebx
push esi
mov esi, 0x4d82d8
jne 0x4098c9
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x4d82f0], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4d82d0], 1
push dword [0x4d82f0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x409966
push 0x14
push 8
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x409990
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4d82d4]
test eax, eax
je 0x40990b
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x4d82d4], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea edi, [ebx + 0x10]
push 0
push 0
push 0x100000
push edi
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
push 8
push 0xffffffffffffffff
push ebx
push 0x409a13
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x4d82f0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x409990
mov ecx, dword [esp + 0xc]
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x10]
mov dword [eax + 8], ecx
mov ecx, dword [ebx + 8]
mov dword [eax], ecx
mov dword [ebx + 8], eax
pop esi
pop ebx
ret 8
Function at 0x413610
Capabilities:
Get file size
Read file on windows

Disassembly:
sub esp, 8
push esi
push edi
xor edi, edi
push edi
push edi
push 3
push edi
push 1
push closesocket
push dword [esp + 0x2c]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x413771
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x41366f
test ebx, ebx
jle 0x41366f
push edi
lea eax, [esp + 0x10]
push eax
push ebx
push dword [0x4d8290]
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x41366f
cmp dword [esp + 0xc], ebx
jne 0x41366f
mov edi, 1
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test edi, edi
je 0x413770
mov ecx, dword [0x4d8290]
mov edx, ecx
cmp dword [ecx], 0x50555245
jne 0x413770
mov eax, dword [ecx + 8]
add ecx, 0xc
add eax, 0xadbaaccf
mov dword [esp + 0x10], eax
cmp eax, 8
ja 0x413770
lea eax, [edx - 8]
add eax, ebx
cmp ecx, eax
jae 0x413770
push ebp
jmp 0x4136c0
cmp dword [ecx], 0x434e5354
lea ebp, [ecx + 8]
mov edi, dword [ecx + 4]
jne 0x41375a
test edi, edi
jle 0x41375a
lea eax, [edi + 0x18]
push eax
push 0
push dword [0x4d7b78]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x41375a
mov eax, dword [esp + 0x20]
lea ecx, [esi + 0x18]
push edi
push ebp
push ecx
mov dword [esi + 4], ecx
mov dword [esi + 8], edi
mov dword [esi + 0xc], eax
call fcn.00414ba0
mov eax, dword [esp + 0x20]
add esp, 0xc
movzx eax, byte [eax + 0x413784]
jmp dword [eax*4 + 0x413778]
mov eax, dword [0x4d8290]
lea ecx, [edi + ebp]
add eax, 0xfffffff8
add eax, ebx
cmp ecx, eax
jb 0x4136c0
pop ebp
pop ebx
pop edi
pop esi
add esp, 8
ret
Function at 0x414a50
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push ebp
push esi
push edi
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, dword [esp + 0x18]
mov esi, eax
cmp ebx, 0xffffffff
jne 0x414a6e
mov ebx, dword [esi + 8]
mov eax, dword [esp + 0x14]
mov edx, dword [esi + 4]
mov ecx, dword [esi + 8]
lea ebp, [eax + eax]
add ecx, ebp
lea eax, [edx - 4]
cmp ecx, eax
jl 0x414a92
lea eax, [ecx + 0x4000]
mov dword [esi + 4], eax
add eax, 0xa
jmp 0x414aad
cmp edx, 0x100000
jle 0x414ac0
cmp ecx, 0x100000
jge 0x414aa7
mov ecx, 0x100000
mov dword [esi + 4], ecx
lea eax, [ecx + 0xa]
push eax
push dword [esi]
push 0
push dword [0x4d8260]
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov dword [esi], eax
lea eax, [ebx + ebp]
mov dword [esi + 8], eax
mov eax, dword [esi]
pop edi
pop esi
pop ebp
add eax, ebx
pop ebx
ret 8

Function at 0x414ae0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [esp + 4]
neg ecx
add ecx, ecx
add dword [eax + 8], ecx
ret 4

Function at 0x414b30
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, eax
mov eax, dword [esp + 4]
mov edx, dword [ecx]
cmp eax, edx
jb 0x414b57
mov ecx, dword [ecx + 8]
add ecx, edx
cmp eax, ecx
ja 0x414b57
sub eax, edx
inc eax
ret 4
xor eax, eax
ret 4

Function at 0x414b60
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ecx, dword [eax]
mov eax, dword [esp + 4]
dec eax
add eax, ecx
ret 4

Function at 0x4154d0
Capabilities:
Get thread local storage value

Disassembly:
push dword [0x4d65e4]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
add eax, dword [esp + 4]
ret 4