joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4035ac
Capabilities:
Generate random numbers using the delphi lcg

Disassembly:
push ebx
xor ebx, ebx
imul edx, dword [ebx + 0x133e008], 0x8088405
inc edx
mov dword [ebx + 0x133e008], edx
mul edx
mov eax, edx
pop ebx
ret

Function at 0x41cd64
Capabilities:
Decompress data using aplib

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff4
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push ebp
mov esi, dword [ebp - 4]
mov edi, dword [ebp - 8]
cld
mov dl, 0x80
mov al, byte [esi]
add esi, 1
mov byte [edi], al
add edi, 1
mov ebx, 2
add dl, dl
jne 0x41cd95
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cd7d
add dl, dl
jne 0x41cda0
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41cdf1
xor eax, eax
add dl, dl
jne 0x41cdad
mov dl, byte [esi]
inc esi
adc dl, dl
jae 0x41ce8e
add dl, dl
jne 0x41cdbc
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdc7
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cdd2
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41cddd
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
je 0x41cde7
mov ebx, edi
sub ebx, eax
mov al, byte [ebx]
mov byte [edi], al
inc edi
mov ebx, 2
jmp 0x41cd8c
mov eax, 1
add dl, dl
jne 0x41cdff
mov dl, byte [esi]
inc esi
adc dl, dl
adc eax, eax
add dl, dl
jne 0x41ce0a
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41cdf6
sub eax, ebx
mov ebx, 1
jne 0x41ce3d
mov ecx, 1
add dl, dl
jne 0x41ce23
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce2e
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce1a
push esi
mov esi, edi
sub esi, ebp
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
dec eax
shl eax, 8
mov al, byte [esi]
inc esi
mov ebp, eax
mov ecx, 1
add dl, dl
jne 0x41ce54
mov dl, byte [esi]
inc esi
adc dl, dl
adc ecx, ecx
add dl, dl
jne 0x41ce5f
mov dl, byte [esi]
inc esi
adc dl, dl
jb 0x41ce4b
cmp eax, 0x7d00
sbb ecx, 0xffffffff
cmp eax, 0x500
sbb ecx, 0xffffffff
cmp eax, 0x80
adc ecx, 0
cmp eax, 0x80
adc ecx, 0
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
jmp 0x41cd8c
mov al, byte [esi]
inc esi
xor ecx, ecx
shr al, 1
je 0x41ceaf
adc ecx, 2
mov ebp, eax
push esi
mov esi, edi
sub esi, eax
rep movsb byte es:[edi], byte [esi]
pop esi
mov ebx, 1
jmp 0x41cd8c
pop ebp
sub edi, dword [ebp - 8]
mov dword [ebp - 0xc], edi
pop edi
pop esi
pop ebx
mov eax, dword [ebp - 0xc]
mov esp, ebp
pop ebp
ret
Function at 0x41e5a4
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov dword [ebp - 4], edx
mov ebx, eax
xor eax, eax
push ebp
push 0x1325a63
push dword fs:[eax]
mov dword fs:[eax], esp
xor eax, eax
mov dword [ebp - 8], eax
mov ecx, ebx
mov eax, ebx
xor edx, edx
push edx
push eax
mov eax, dword [ecx + 0x3c]
cdq
add eax, dword [esp]
adc edx, dword [esp + 4]
add esp, 8
mov edx, dword [eax + 0x78]
test edx, edx
je 0x41e655
add edx, ebx
mov eax, edx
mov esi, dword [eax + 0x18]
mov edx, dword [eax + 0x1c]
add edx, ebx
mov dword [ebp - 0x10], edx
mov edi, dword [eax + 0x20]
add edi, ebx
mov edx, dword [eax + 0x24]
add edx, ebx
mov dword [ebp - 0xc], edx
mov edx, dword [ebp - 4]
cmp edx, 0xffff
jbe 0x41e63e
test esi, esi
jbe 0x41e655
mov eax, dword [edi]
add eax, ebx
mov edx, dword [ebp - 4]
call fcn.004088e4
test eax, eax
jne 0x41e630
mov eax, dword [ebp - 0xc]
movzx eax, word [eax]
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
jmp 0x41e655
add dword [ebp - 0xc], 2
add edi, 4
dec esi
test esi, esi
ja 0x41e60d
jmp 0x41e655
mov ecx, edx
sub ecx, dword [eax + 0x10]
cmp ecx, dword [eax + 0x14]
jae 0x41e655
mov eax, ecx
shl eax, 2
add eax, dword [ebp - 0x10]
mov eax, dword [eax]
mov dword [ebp - 8], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x1325a6a
ret
Function at 0x41eec4
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 8], ecx
mov word [ebp - 2], dx
xor eax, eax
push ebp
push 0x1326473
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp + 8]
call fcn.00404cd0
xor ebx, ebx
mov eax, ebx
and eax, 0x80000001
jns 0x41eeff
dec eax
or eax, 0xfffffffe
inc eax
test eax, eax
jne 0x41ef18
lea eax, [ebp - 0x10]
mov edx, dword [0x13402a4]
mov edx, dword [edx]
mov edx, dword [edx + 0xc]
call fcn.00404d30
jmp 0x41ef2b
lea eax, [ebp - 0x10]
mov edx, dword [0x13402a4]
mov edx, dword [edx]
mov edx, dword [edx + 0x10]
call fcn.00404d30
lea eax, [ebp - 0x10]
mov edx, ebx
sar edx, 1
jns 0x41ef37
adc edx, 0
mov edx, dword [edx*4 + 0x133f10c]
call fcn.00404f20
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
mov eax, dword [ebp - 0x10]
call fcn.00404f04
push eax
call fcn.00406b1c
mov esi, eax
cmp esi, 0xffffffff
je 0x41f045
mov eax, 0x40
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x40
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp word [eax], 0x5a4d
jne 0x41f038
push 0
push 0
mov eax, dword [eax + 0x3c]
push eax
push esi
call fcn.00406ddc
mov eax, edi
call fcn.00403288
mov eax, 0x18
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0x18
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
cmp dword [eax], 0x4550
jne 0x41f038
add eax, 4
mov dx, word [eax]
cmp dx, 0x14c
jb 0x41f038
cmp dx, 0x150
ja 0x41f038
mov eax, edi
call fcn.00403288
mov eax, 0xe0
call fcn.00403268
mov edi, eax
push 0
lea eax, [ebp - 0xc]
push eax
push 0xe0
push edi
push esi
call fcn.00406d7c
test eax, eax
je 0x41f038
mov eax, edi
mov dx, word [eax + 0x44]
cmp dx, word [ebp - 2]
jne 0x41f038
mov eax, dword [eax + 0x10]
mov edx, dword [ebp - 8]
mov dword [edx], eax
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0x10]
call fcn.00404d0c
mov eax, edi
call fcn.00403288
push esi
call fcn.00406ad4
mov eax, dword [ebp + 8]
mov eax, dword [eax]
xor edx, edx
call fcn.0040502c
jne 0x41f05d
inc ebx
cmp ebx, 0x19
jne 0x41eef1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x132647a
lea eax, [ebp - 0x10]
call fcn.00404cd0
ret
Function at 0x412372
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value

Disassembly:
cmp dword [0x4186d0], 0
push ebx
push esi
mov esi, 0x4186d8
jne 0x41239e
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
push esi
mov dword [0x4186f0], eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [0x4186d0], 1
push dword [0x4186f0]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x41243b
push 0x14
push 8
push dword [0x418060]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x412465
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x4186d4]
test eax, eax
je 0x4123e0
mov dword [eax], ebx
push edi
push esi
mov dword [ebx + 4], eax
mov dword [0x4186d4], 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 0x41246a
push dword [edi]
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_RegisterWaitForSingleObject]
push ebx
push dword [0x4186f0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
pop edi
push 0xc
push 0
push dword [0x418060]
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
test eax, eax
je 0x412465
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 0x1000101d
Capabilities:
Persist via com hijack
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x134
push esi
mov esi, 0x12c
push edi
lea eax, [ebp - 0x134]
push esi
push eax
push dword [0x10003040]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor edi, edi
cmp eax, edi
jbe 0x100010a0
cmp eax, esi
jae 0x100010a0
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
push edi
push 0x2001f
push edi
push edi
push edi
push str.SoftwareClassesCLSID0226c835_9475_4dea_b491_ec1a926d0f7aInprocServer32
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x100010a0
lea eax, [ebp - 0x134]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
lea eax, [ebp - 0x134]
push eax
push 1
push edi
push 0x10003044
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push dword [ebp - 4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
pop edi
xor eax, eax
pop esi
leave
ret
Function at 0x401240
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push ecx
push esi
lea eax, [ebp - 4]
mov esi, ecx
push eax
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi], eax
pop esi
mov esp, ebp
pop ebp
ret 8

Function at 0x405e00
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x485b78
mov eax, dword fs:[0]
push eax
sub esp, 8
push ebx
push esi
push edi
mov eax, dword [0x49c33c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
lea esi, [edi + 0x28]
mov dword [ebp - 0x10], esi
mov ecx, dword [ebp + 8]
mov eax, dword [ecx]
call dword [eax + 0x10]
mov cl, byte [esi + 0x18]
mov ebx, eax
test cl, cl
je 0x405e4b
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov cl, byte [esi + 0x18]
mov dword [ebp - 4], 0
cmp byte [edi + 0x25], 0
jne 0x405f13
test ebx, ebx
je 0x405ef6
mov ecx, dword [edi + 8]
test ecx, ecx
jne 0x405e84
push 0x138
call fcn.0042f87b
mov dword [edi + 8], eax
add esp, 4
mov dword [eax], 0
mov ecx, dword [edi + 8]
mov eax, dword [ecx]
mov dword [edi + 8], eax
mov dword [ecx + 0x128], ebx
mov dword [ecx + 4], 0
mov eax, dword [edi + 0xc]
mov dword [ecx], eax
mov byte [ecx + 0x12c], 0
mov dword [ecx + 0x134], 0
mov dword [ecx + 0x130], 0
inc dword [edi + 0x20]
mov eax, dword [edi + 0x1c]
mov dword [edi + 0xc], ecx
cmp eax, dword [edi + 0x20]
jge 0x405ee9
inc eax
mov dword [edi + 0x1c], eax
lea eax, [ebp - 0x14]
push eax
push 0
push edi
push 0x4025e0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
test eax, eax
je 0x405ee9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
push dword [edi + 0x44]
call dword [sym.imp.KERNEL32.dll_ReleaseSemaphore]
mov dword [ebp - 4], 0xffffffff
cmp byte [esi + 0x18], 0
je 0x405e30
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
jmp 0x405e30
test cl, cl
je 0x405f1e
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
Function at 0x40cb90
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
mov esi, ecx
push edi
push dword [esi + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0xc]
test eax, eax
je 0x40cbbb
cmp byte [eax + 0xb4], 0
je 0x40ccfe
mov ecx, dword [ebp + 8]
lea eax, [ecx - 1]
cmp eax, 7
ja case.0x40cbca.4
jmp dword [eax*4 + 0x40cd1c]
push 0
call fcn.0044b147
add esp, 4
cmp dword [esi + 0x1d4], eax
jne 0x40cc20
mov eax, 0x66666667
imul edi
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
lea eax, [eax + eax*4]
shl eax, 4
sub edi, eax
sub edi, 1
js 0x40cc18
push 2
call fcn.0044b147
push eax
push 0x2d
call fcn.0044a969
add esp, 0xc
sub edi, 1
jns 0x40cc01
push ebx
push str._n_s_n
jmp 0x40cc48
push edi
push dword [esi + 0x1c4]
push ebx
push str._s_at_line__d_position__d_n
push 2
call fcn.0044b147
add esp, 4
push eax
call fcn.00406050
add esp, 0x14
jmp 0x40cc89
push ebx
push 0x4966c4
push 2
call fcn.0044b147
add esp, 4
push eax
call fcn.00406050
add esp, 0xc
jmp 0x40cc89
push edi
push str.Index__d_is_out_of_range_n
jmp 0x40cc48
push str.Null_object_reference_is_accessed_n
push 2
call fcn.0044b147
add esp, 4
push eax
call fcn.00406050
add esp, 8
jmp 0x40cc89
push edi
push ebx
push ecx
mov ecx, esi
call fcn.00426f20
mov edi, dword [esi + 0x1d4]
push 0
call fcn.0044b147
add esp, 4
cmp edi, eax
jne 0x40ccee
nop dword [eax]
push dword [esi + 0x1d4]
call fcn.0044bdc4
mov ecx, eax
add esp, 4
cmp ecx, 0xa
je 0x40ccdc
mov eax, dword [esi + 0x1c0]
cmp ecx, 9
jne 0x40ccce
add eax, 8
and eax, 0xfffffff8
mov dword [esi + 0x1c0], eax
jmp 0x40cca0
inc eax
mov dword [esi + 0x1c0], eax
cmp ecx, 0xffffffff
jne 0x40cca0
jmp 0x40ccfb
inc dword [esi + 0x1c4]
mov dword [esi + 0x1c0], 0
jmp 0x40ccfb
push 2
push 0
push edi
call fcn.0044bc57
add esp, 0xc
mov edi, dword [ebp + 0x10]
push edi
push ebx
push dword [ebp + 8]
lea ecx, [ebp - 0xc]
call fcn.00406220
push 0x49a60c
lea eax, [ebp - 0xc]
push eax
call fcn.00434fcb
nop dword [eax]
ror ebx, 1
inc eax
add byte [edx - 0x34], al
inc eax
add byte [ebp - 0x34], bl
inc eax
add byte [edi - 0x34], bh
inc eax
add byte [edi - 0x34], bh
inc eax
add byte [edi - 0x34], bh
inc eax
add byte [edi - 0x34], bh
inc eax
add byte [ebp - 0x34], ah
inc eax
add ah, cl
int3
Function at 0x41c4a0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
mov edx, dword [ebp + 0xc]
sub esp, 0x10
cmp edx, 1
jbe 0x41c654
mov ecx, dword [ebp + 8]
push ebx
push esi
push edi
lea ebx, [ecx + 4]
mov eax, ebx
mov dword [ebp - 8], ebx
lea ecx, [ecx + edx*4]
mov dword [ebp - 4], eax
add ecx, 0xfffffffc
cmp eax, ecx
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
je 0x41c531
lea esi, [ebx + 4]
mov dword [ebp - 4], esi
push dword [0x49d268]
call eax
mov edi, dword [eax]
push edi
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [esi]
mov esi, dword [ecx + eax*4]
mov eax, dword [ebx]
add esi, edx
push esi
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
mov esi, dword [ebp - 4]
add esp, 0xc
mov ecx, dword [ebp + 0xc]
test eax, eax
mov edx, dword [ebp + 8]
cmovg ebx, esi
add esi, 4
dec ecx
mov dword [ebp - 4], esi
lea eax, [esi - 4]
lea ecx, [edx + ecx*4]
cmp eax, ecx
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
jne 0x41c4d8
mov dword [ebp - 4], ebx
mov ebx, dword [ebp - 8]
push dword [0x49d268]
call eax
mov edi, dword [eax]
push edi
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp - 4]
mov eax, dword [eax]
mov esi, dword [ecx + eax*4]
mov eax, dword [ebp + 8]
add esi, edx
push esi
mov eax, dword [eax]
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
mov esi, dword [ebp + 8]
add esp, 0xc
test eax, eax
jle 0x41c578
mov edx, dword [ebp - 4]
mov eax, dword [esi]
mov ecx, dword [edx]
mov dword [esi], ecx
mov dword [edx], eax
mov eax, dword [ebp + 0xc]
dec eax
lea eax, [esi + eax*4]
cmp ebx, eax
je 0x41c651
nop word [eax + eax]
push dword [0x49d268]
mov dword [ebp - 4], ebx
add ebx, 4
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax]
push edi
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebx]
mov esi, dword [ecx + eax*4]
mov eax, dword [ebp - 4]
add esi, edx
push esi
mov eax, dword [eax]
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
add esp, 0xc
test eax, eax
jle 0x41c63f
mov esi, dword [ebx]
mov edi, ebx
mov dword [ebp - 0x10], esi
lea eax, [esi*4]
mov esi, dword [ebp - 4]
mov dword [ebp - 0xc], eax
sub esi, ebx
nop dword [eax]
mov eax, dword [esi + edi]
lea edi, [edi - 4]
mov dword [edi + 4], eax
push dword [0x49d268]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov eax, dword [eax]
mov dword [ebp - 4], eax
push dword [ebp - 4]
mov eax, dword [eax + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp - 0xc]
mov ebx, dword [ecx + eax]
mov eax, dword [esi + edi]
add ebx, edx
push ebx
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
add esp, 0xc
test eax, eax
jg 0x41c5f0
mov esi, dword [ebp - 0x10]
mov ebx, dword [ebp - 8]
mov dword [edi], esi
mov eax, dword [ebp + 0xc]
mov ecx, dword [ebp + 8]
dec eax
lea eax, [ecx + eax*4]
cmp ebx, eax
jne 0x41c590
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x41cbb0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push ebx
push esi
mov esi, dword [ebp + 0xc]
push edi
sub esi, 1
je 0x41cc0e
nop
push dword [0x49d268]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [ebp + 8]
add edi, 4
mov dword [ebp + 0xc], edi
mov ebx, dword [eax]
push ebx
mov eax, dword [ebx + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [edi]
mov edi, dword [ecx + eax*4]
mov eax, dword [ebp + 8]
add edi, edx
push edi
mov eax, dword [eax]
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
add esp, 0xc
test eax, eax
jg 0x41cc18
mov eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
sub esi, 1
jne 0x41cbc0
pop edi
pop esi
mov eax, 1
pop ebx
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
pop ebp
ret

Function at 0x41dc50
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
push esi
mov esi, ecx
push edi
mov byte [esi + 0x4e], 0
call fcn.0041d6d0
mov ecx, dword [esi + 8]
xor eax, eax
cmp dword [esi + 0x10], 1
sete al
push eax
call fcn.00421ce0
mov eax, dword [esi + 8]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add eax, 0x18
mov dword [esi + 4], eax
mov ecx, dword [eax]
mov dword [esi], ecx
mov ecx, dword [eax]
mov dword [ecx + 4], esi
mov dword [eax], esi
mov eax, dword [ebp + 8]
mov edi, dword [eax]
mov eax, dword [esi + 0x24]
mov dword [esi + 0x38], edi
cmp eax, dword [esi + 0x40]
jae 0x41dcd3
cmp byte [esi + 0x4c], 0
push ebx
je 0x41dcc9
mov eax, dword [esi + 0x44]
mov ecx, edi
shr ecx, 5
mov edx, dword [eax + ecx*4]
lea ebx, [eax + ecx*4]
mov ecx, edi
mov eax, 1
and ecx, 0x1f
shl eax, cl
test edx, eax
jne 0x41dcd2
bts edx, ecx
mov dword [ebx], edx
push edi
lea ecx, [esi + 0x18]
call fcn.0041cc50
pop ebx
cmp byte [esi + 0x4d], 0
je 0x41dcf7
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0x38]
mov eax, dword [edx + 0x44]
mov eax, dword [eax + ecx*4]
add eax, dword [edx + 0x3c]
mov ecx, dword [esi + 0xc]
push eax
push dword [esi + 0x3c]
mov ecx, dword [ecx + 0x10]
call fcn.00417980
pop edi
pop esi
pop ebp
ret 4
Function at 0x41de20
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], edi
mov esi, dword [edi + 0xc]
mov dword [ebp - 4], esi
cmp esi, 1
jbe 0x41df70
push ebx
push esi
push str.Sort__d_records_n
call fcn.0041a150
xor ecx, ecx
mov eax, esi
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0042f8b9
mov edi, dword [edi]
add esp, 0xc
xor edx, edx
mov ebx, eax
test edi, edi
je 0x41de98
nop dword [eax]
mov esi, dword [edi + 8]
test esi, esi
jle 0x41de8e
lea ecx, [edi + 0xc]
nop word [eax + eax]
mov eax, dword [ecx]
lea ecx, [ecx + 4]
mov dword [ebx + edx*4], eax
inc edx
sub esi, 1
jne 0x41de80
mov edi, dword [edi + 4]
test edi, edi
jne 0x41de70
mov esi, dword [ebp - 4]
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0xc]
push eax
push dword [0x49d268]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
push esi
push ebx
call fcn.0041cbb0
add esp, 8
test eax, eax
jne 0x41df38
lea eax, [esi - 1]
mov dword [ebp + 0xc], ebx
mov dword [ebp - 8], eax
test eax, eax
je 0x41df19
nop dword [eax]
push dword [0x49d268]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, dword [eax]
push edi
mov eax, dword [edi + 8]
mov eax, dword [eax + 0x28]
mov ecx, dword [eax + 0x44]
mov edx, dword [eax + 0x3c]
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov esi, dword [ecx + eax*4]
mov eax, dword [ebp + 0xc]
add esi, edx
add eax, 4
mov dword [ebp + 0xc], eax
push esi
mov eax, dword [eax]
mov eax, dword [ecx + eax*4]
add eax, edx
push eax
call fcn.0041cda0
add esp, 0xc
test eax, eax
jg 0x41df78
sub dword [ebp - 8], 1
jne 0x41ded0
mov edx, dword [ebp - 4]
mov esi, ebx
dec edx
lea edx, [ebx + edx*4]
cmp edx, ebx
jbe 0x41df38
mov eax, dword [esi]
mov ecx, dword [edx]
mov dword [esi], ecx
add esi, 4
mov dword [edx], eax
sub edx, 4
cmp edx, esi
ja 0x41df26
mov edi, dword [ebp - 0x10]
xor edx, edx
mov edi, dword [edi]
test edi, edi
je 0x41df66
mov esi, dword [edi + 8]
test esi, esi
jle 0x41df5f
lea eax, [edi + 0xc]
nop dword [eax]
mov ecx, dword [ebx + edx*4]
lea eax, [eax + 4]
inc edx
mov dword [eax - 4], ecx
sub esi, 1
jne 0x41df50
mov edi, dword [edi + 4]
test edi, edi
jne 0x41df43
push ebx
call fcn.0042f876
add esp, 4
pop ebx
pop edi
pop esi
mov esp, ebp
pop ebp
ret 8
mov edx, dword [ebp - 4]
mov ecx, 2
mov eax, edx
shr eax, 2
test eax, eax
je 0x41df95
nop dword [eax]
inc ecx
shr eax, 1
jne 0x41df90
lea eax, [ecx + ecx]
push eax
push edx
push ebx
call fcn.0041c900
add esp, 0xc
jmp 0x41df38
Function at 0x41e0f0
Capabilities:
Get thread local storage value

Disassembly:
push esi
mov esi, ecx
xor eax, eax
cmp dword [esi + 0x10], 1
mov ecx, dword [esi + 8]
sete al
push eax
call fcn.00421ce0
mov eax, dword [esi + 8]
push dword [eax + 0x38]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
add eax, 0x18
mov dword [esi + 4], eax
mov ecx, dword [eax]
mov dword [esi], ecx
mov ecx, dword [eax]
mov dword [ecx + 4], esi
mov dword [eax], esi
mov edx, dword [esi + 0x38]
test edx, edx
je 0x41e14a
cmp byte [esi + 0x4d], 0
je 0x41e14a
mov ecx, dword [esi + 8]
mov eax, dword [ecx + 0x44]
mov eax, dword [eax + edx*4]
add eax, dword [ecx + 0x3c]
mov ecx, dword [esi + 0xc]
push eax
push dword [esi + 0x3c]
mov ecx, dword [ecx + 0x10]
call fcn.00417980
pop esi
ret

Function at 0x41e900
Capabilities:
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push esi
mov esi, ecx
cmp dword [esi + 4], 0
je 0x41e91d
mov dword [esi + 0xc], 0xffffffff
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push edi
push 0
push 0
push dword [esi + 8]
call sub.WSOCK32.dll_accept
mov edi, eax
cmp edi, 0xffffffff
jne 0x41e941
call sub.WSOCK32.dll_WSAGetLastError
mov dword [esi + 0xc], eax
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 4
push 0x49c150
push 0x80
push 0xffff
push edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
je 0x41e972
call sub.WSOCK32.dll_WSAGetLastError
push edi
mov dword [esi + 0xc], eax
call sub.WSOCK32.dll_closesocket
pop edi
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push 4
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
push 1
push 6
push edi
call sub.WSOCK32.dll_setsockopt
test eax, eax
jne 0x41e95c
push 4
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x100000
push eax
push 0x1001
push 0xffff
push dword [esi + 8]
call sub.WSOCK32.dll_setsockopt
push 0x14
mov dword [esi + 0xc], 0
call fcn.0042f87b
add esp, 4
mov dword [ebp - 8], eax
test eax, eax
je 0x41e939
mov dword [eax + 8], edi
pop edi
mov dword [eax], vtable.win_socket.0
mov dword [eax + 0x10], 0
mov dword [eax + 4], 0
mov dword [eax + 0xc], 0
pop esi
mov esp, ebp
pop ebp
ret