joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10002820
Capabilities:
Allocate or change rwx memory

Disassembly:
push esi
mov esi, dword [0x100096d8]
push 0x100096d0
push 0x40
push 5
push esi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
mov eax, 0x10002870
mov byte [0x100096c8], 0xe9
sub eax, esi
sub eax, 5
mov dword [0x100096c9], eax
mov eax, dword [esi]
mov dword [0x100096c0], eax
movzx eax, byte [esi + 4]
mov byte [0x100096c4], al
mov eax, dword [0x100096c8]
mov dword [esi], eax
movzx eax, byte [0x100096cc]
mov byte [esi + 4], al
pop esi
ret

Function at 0x10003110
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1c
push ebx
mov ebx, ecx
push esi
push edi
cmp dword [ebx + 0x38], 0
je 0x1000313c
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsputn_char_const___long_long___int64__]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x20]
mov esi, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov dword [esp + 0x20], esi
mov ecx, dword [eax]
lea eax, [ebx + 0x30]
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x18], eax
test ecx, ecx
je 0x10003164
mov eax, dword [eax]
mov ecx, dword [eax]
jmp 0x1000316a
xor ecx, ecx
mov dword [esp + 0x18], eax
mov eax, ecx
cdq
mov dword [esp + 0x10], eax
mov ecx, edx
mov dword [esp + 0x14], ecx
test edi, edi
jl 0x100031d2
jg 0x10003181
test esi, esi
je 0x100031d2
test ecx, ecx
jl 0x100031cd
jg 0x1000318b
test eax, eax
je 0x100031cd
cmp edi, ecx
jg 0x1000319f
jl 0x10003195
cmp esi, eax
jae 0x1000319f
mov eax, esi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], edi
push eax
push dword [ebp + 8]
push dword [esp + 0x24]
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [esp + 0x24]
add esp, 0xc
mov edx, dword [esp + 0x10]
mov ecx, dword [ebp + 8]
add ecx, edx
sub esi, edx
mov eax, dword [eax]
sbb edi, dword [esp + 0x14]
sub dword [eax], edx
mov eax, dword [ebx + 0x20]
add dword [eax], edx
jmp 0x100031d5
mov ecx, dword [ebp + 8]
jmp 0x100031df
mov ecx, dword [ebp + 8]
test edi, edi
jl 0x100031f9
jg 0x100031df
test esi, esi
je 0x100031f9
mov eax, dword [ebx + 0x4c]
test eax, eax
je 0x100031f9
push eax
push esi
push 1
push ecx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
sub esi, eax
sbb edi, 0
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x24]
sub eax, esi
sbb edx, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10003210
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, ecx
mov ecx, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 8]
mov dword [ebp - 4], esi
test eax, eax
jg 0x1000323c
jl 0x10003230
test ecx, ecx
jne 0x1000323c
pop esi
xor eax, eax
xor edx, edx
pop ebx
mov esp, ebp
pop ebp
ret 0xc
cmp dword [ebx + 0x38], 0
je 0x10003255
push eax
push ecx
push esi
mov ecx, ebx
call dword [sym.imp.MSVCP140.dll_protected_virtual:_long_long___int64____thiscall_std::basic_streambuf_char__struct_std::char_traits_char__::xsgetn_char___long_long___int64__]
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov eax, dword [ebx + 0x1c]
push edi
mov edi, ecx
mov eax, dword [eax]
mov dword [ebp - 8], eax
test eax, eax
je 0x100032a3
mov eax, dword [ebx + 0x2c]
lea edx, [ebx + 0x2c]
mov dword [ebp - 0xc], edx
mov eax, dword [eax]
test eax, eax
je 0x100032a9
mov edi, dword [ebp - 4]
cmp eax, ecx
mov esi, ecx
cmovb esi, eax
push esi
push dword [ebp - 8]
push edi
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebx + 0x2c]
add edi, esi
mov dword [ebp - 4], edi
add esp, 0xc
mov edi, dword [ebp + 0xc]
sub edi, esi
sub dword [eax], esi
mov eax, dword [ebx + 0x1c]
add dword [eax], esi
mov esi, dword [ebp - 4]
jmp 0x100032a9
lea eax, [ebx + 0x2c]
mov dword [ebp - 0xc], eax
cmp dword [ebx + 0x4c], 0
je 0x10003316
mov ecx, dword [ebx + 0xc]
lea eax, [ebx + 0x3c]
cmp dword [ecx], eax
jne 0x100032d2
mov eax, dword [ebx + 0xc]
mov edx, dword [ebx + 0x54]
mov ecx, dword [ebx + 0x50]
sub edx, ecx
mov dword [eax], ecx
mov eax, dword [ebx + 0x1c]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [eax], edx
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
cmp edi, 0xfff
jbe 0x10003304
nop
push dword [ebx + 0x4c]
push 0xfff
push 1
push esi
call eax
add esp, 0x10
add esi, eax
sub edi, eax
cmp eax, 0xfff
jne 0x10003316
cmp edi, eax
mov eax, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
ja 0x100032e0
test edi, edi
je 0x10003316
push dword [ebx + 0x4c]
push edi
push 1
push esi
call eax
add esp, 0x10
sub edi, eax
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
sub eax, edi
pop edi
pop esi
sbb edx, 0
pop ebx
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10003690
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
mov eax, dword [0x10009008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, ecx
cmp ebx, 0xffffffff
jne 0x100036c0
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret 4
mov eax, dword [esi + 0x20]
push edi
mov ecx, dword [eax]
test ecx, ecx
je 0x100036fc
mov edx, dword [esi + 0x30]
mov edi, dword [edx]
lea eax, [edi + ecx]
cmp ecx, eax
jae 0x100036fc
lea ecx, [edi - 1]
mov eax, ebx
mov dword [edx], ecx
mov edx, dword [esi + 0x20]
pop edi
mov esi, dword [edx]
lea ecx, [esi + 1]
mov dword [edx], ecx
mov byte [esi], bl
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret 4
cmp dword [esi + 0x4c], 0
je 0x100037d3
mov edi, dword [esi + 0xc]
lea eax, [esi + 0x3c]
cmp dword [edi], eax
jne 0x10003724
mov edx, dword [esi + 0x54]
mov ecx, dword [esi + 0x50]
sub edx, ecx
mov dword [edi], ecx
mov eax, dword [esi + 0x1c]
mov dword [eax], ecx
mov eax, dword [esi + 0x2c]
mov dword [eax], edx
mov ecx, dword [esi + 0x38]
test ecx, ecx
jne 0x10003730
movsx eax, bl
jmp 0x10003768
lea eax, [ebp - 0x2c]
mov byte [ebp - 0x25], bl
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [ebp - 0x25]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::out_struct__Mbstatet___char_const___char_const___char_const____char___char___char___const]
sub eax, 0
je 0x10003792
sub eax, 1
je 0x10003792
sub eax, 2
jne 0x100037d3
movsx eax, byte [ebp - 0x25]
push dword [esi + 0x4c]
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fputc]
add esp, 8
or ecx, 0xffffffff
cmp eax, ecx
cmovne ecx, ebx
pop edi
pop esi
mov eax, ecx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp - 0x2c]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x100037b0
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x100037d3
lea ecx, [ebp - 0x25]
mov byte [esi + 0x3d], 1
or eax, 0xffffffff
cmp dword [ebp - 0x30], ecx
pop edi
pop esi
cmovne eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret 4
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10004a7b
mov esp, ebp
pop ebp
ret 4
Function at 0x10003b70
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x10009008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov esi, ecx
cmp dword [esi + 0x38], 0
je 0x10003c2c
cmp byte [esi + 0x3d], 0
je 0x10003c2c
mov eax, dword [esi]
push edi
push 0xffffffffffffffff
call dword [eax + 0xc]
cmp eax, 0xffffffff
je 0x10003c1a
mov ecx, dword [esi + 0x38]
lea eax, [ebp - 0x28]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x24]
push eax
lea eax, [esi + 0x40]
push eax
call dword [sym.imp.MSVCP140.dll_public:_int___thiscall_std::codecvt_char__char__struct__Mbstatet_::unshift_struct__Mbstatet___char___char___char___const]
sub eax, 0
je 0x10003be1
sub eax, 1
je 0x10003be5
sub eax, 2
jne 0x10003c1a
mov byte [esi + 0x3d], al
mov al, 1
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret
mov byte [esi + 0x3d], 0
mov edi, dword [ebp - 0x28]
lea eax, [ebp - 0x24]
sub edi, eax
je 0x10003c03
push dword [esi + 0x4c]
push edi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
cmp edi, eax
jne 0x10003c1a
cmp byte [esi + 0x3d], 0
pop edi
sete al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret
pop edi
xor al, al
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10004a7b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov al, 1
xor ecx, ebp
pop esi
call fcn.10004a7b
mov esp, ebp
pop ebp
ret
Function at 0x100030e0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 8
push esi
push edi
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov edi, eax
cmp edi, 0xffffffff
jne 0x10003111
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov dword [esp + 8], esi
call fcn.10002f00
mov dword [esp + 0xc], eax
test esi, esi
jne 0x10003119
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
mov edx, 0x10079284
lea ecx, [esp + 8]
call fcn.10002e70
int3

Function at 0x10003400
Capabilities:
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push esi
mov esi, dword [ebp + 0x10]
push edi
cmp dword [esi + 4], 0x5b0
jne 0x1000343e
push str.GuildedCapture_message_hook_enter
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
mov ecx, dword [0x10089320]
mov eax, dword [esi + 0xc]
test ecx, ecx
je 0x10003439
cmp ecx, eax
je 0x1000343e
push eax
call dword [sym.imp.USER32.dll_UnhookWindowsHookEx]
jmp 0x1000343e
mov dword [0x10089320], eax
cmp dword [esi], 0
je 0x1000349f
call fcn.10020de0
mov eax, dword fs:[0x2c]
mov ecx, dword [0x10088574]
mov edi, dword [esi]
mov ecx, dword [eax + ecx*4]
mov eax, dword [0x100895fc]
cmp eax, dword [ecx + 4]
jle 0x10003498
push 0x100895fc
call fcn.1004158f
add esp, 4
cmp dword [0x100895fc], 0xffffffff
jne 0x10003498
call fcn.100183a0
push 0x1006b7e0
call fcn.10041aaf
push 0x100895fc
call fcn.10041545
add esp, 8
mov eax, 0x100896b4
xchg dword [eax], edi
push esi
push dword [ebp + 0xc]
push dword [ebp + 8]
push 0
call dword [sym.imp.USER32.dll_CallNextHookEx]
pop edi
pop esi
mov esp, ebp
pop ebp
ret 0xc
Function at 0x10003a10
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x1a0
mov eax, dword [0x1008600c]
xor eax, esp
mov dword [esp + 0x19c], eax
push esi
push edi
mov esi, ecx
mov eax, 1
lock xadd dword [0x100893e4], eax
inc eax
mov edi, 0x100893e8
cmp eax, 1
jne 0x10003a55
lea eax, [esp + 0x10]
push eax
push 2
call dword [sym.imp.WS2_32.dll_WSAStartup]
xchg dword [edi], eax
cmp byte [ebp + 8], 0
je 0x10003a65
xor eax, eax
lock xadd dword [edi], eax
test eax, eax
jne 0x10003a7d
mov ecx, dword [esp + 0x1a4]
mov eax, esi
pop edi
pop esi
xor ecx, esp
call fcn.1004144e
mov esp, ebp
pop ebp
ret 4
mov dword [esp + 8], eax
call fcn.10002f00
mov edx, str.winsock
mov dword [esp + 0xc], eax
lea ecx, [esp + 8]
call fcn.10002e70
int3

Function at 0x10004cb0
Capabilities:
Get thread local storage value

Disassembly:
push ebx
push esi
push dword [0x100895a0]
mov esi, dword [esp + 0x10]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ebx, [esi + 3]
shr ebx, 2
test eax, eax
je 0x10004cf7
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x10004cf7
mov eax, dword [ecx]
test eax, eax
je 0x10004cf7
mov dword [ecx], 0
mov dl, byte [eax]
movzx ecx, dl
cmp ecx, ebx
jb 0x10004cee
mov byte [eax + esi], dl
pop esi
pop ebx
ret
push eax
call fcn.10041b03
add esp, 4
lea eax, [ebx*4 + 1]
push eax
call fcn.10041665
add esp, 4
movzx ecx, bl
xor edx, edx
cmp ebx, 0xff
cmova ecx, edx
mov byte [eax + esi], cl
pop esi
pop ebx
ret

Function at 0x100050f0
Capabilities:
Terminate thread

Disassembly:
sub esp, 8
push esi
mov esi, ecx
push 0xffffffffffffffff
push 0
mov eax, dword [esi + 8]
mov dword [esp + 0xc], eax
mov eax, dword [esi + 4]
mov dword [esp + 0x10], eax
lea eax, [esp + 0xc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov ecx, 0x10089404
lock xadd dword [ecx], eax
mov ecx, dword [esi + 4]
push 0
push ecx
test eax, eax
je 0x1000513e
call dword [sym.imp.KERNEL32.dll_TerminateThread]
pop esi
add esp, 8
ret
push method.std::basic_streambuf_char__struct_std::char_traits_char__.virtual_56
call dword [sym.imp.KERNEL32.dll_QueueUserAPC]
push 0xffffffffffffffff
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
pop esi
add esp, 8
ret
Function at 0x10005160
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x14
push ebx
push esi
push edi
push 0
push 0
push 1
mov esi, ecx
push 0
mov dword [esp + 0x20], esi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov ebx, dword [ebp + 8]
mov edi, eax
mov dword [ebx + 4], edi
test edi, edi
jne 0x100051b5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x18], esi
call fcn.10002f00
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x1000527b
mov esi, dword [esp + 0x10]
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [esi + 8], eax
mov dword [ebx + 8], eax
cmp dword [esi + 8], 0
jne 0x100051f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov esi, eax
call dword [edx]
mov dword [esp + 0x18], esi
call fcn.10002f00
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x10005289
mov esi, dword [esp + 0x10]
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0
push ebx
push 0x100052b0
push 0
push 0
call fcn.1004ea4f
add esp, 0x18
mov dword [esi + 4], eax
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x10005262
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebx]
mov ecx, ebx
push 1
mov dword [esp + 0x1c], eax
call dword [edx]
test edi, edi
je 0x1000523f
push edi
call esi
mov eax, dword [esp + 0x10]
mov eax, dword [eax + 8]
test eax, eax
je 0x1000524d
push eax
call esi
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x18], ebx
call fcn.10002f00
mov dword [esp + 0x1c], eax
test ebx, ebx
jne 0x10005297
test edi, edi
je 0x10005272
push 0xffffffffffffffff
push edi
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push edi
call esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov edx, str.thread.entry_event
lea ecx, [esp + 0x18]
call fcn.10002e70
mov edx, str.thread.exit_event
lea ecx, [esp + 0x18]
call fcn.10002e70
mov edx, str.thread
lea ecx, [esp + 0x18]
call fcn.10002e70
int3
Function at 0x100053e0
Capabilities:
Access peb ldr_data
Get kernel32 base address
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1006572e
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x1008600c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x14], edi
mov eax, dword [ebp + 8]
mov dword [edi + 4], 0
mov dword [edi + 8], 0
mov dword [edi + 0xc], eax
mov dword [edi + 0x10], 0
mov dword [ebp - 4], 0
mov dword [edi], 0x1007a4c8
mov dword [edi + 0x14], 0
lea ebx, [edi + 0x18]
mov dword [edi + 0x1c], 0
mov dword [ebx], 0
mov dword [edi + 0x20], 0
mov dword [edi + 0x24], 0
call fcn.10005ee0
mov dword [edi + 0x28], eax
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
mov byte [ebp - 4], 3
lea ecx, [edi + 0x38]
mov dword [edi + 0x34], 0
call fcn.10004e70
mov esi, eax
call fcn.10002f00
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
test esi, esi
jne 0x10005556
mov dword [edi + 0x50], esi
mov dword [edi + 0x54], esi
mov dword [edi + 0x58], esi
mov dword [edi + 0x5c], 0xffffffff
mov dword [edi + 0x60], esi
push 0xffffffffffffffff
push esi
push esi
push 0xffffffffffffffff
mov byte [ebp - 4], 6
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov dword [edi + 0x14], eax
test eax, eax
jne 0x100054dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
call fcn.10002f00
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], eax
test esi, esi
jne 0x10005563
cmp byte [ebp + 0x10], 0
je 0x10005540
lock inc dword [ebx]
push 0xc
call fcn.10041665
mov esi, eax
add esp, 4
mov dword [ebp + 0x10], esi
mov byte [ebp - 4], 7
push 0x10
mov dword [esi + 4], 0
mov dword [esi + 8], 0
call fcn.10041665
push eax
mov ecx, esi
mov dword [ebp + 8], eax
mov dword [eax], 0x1007a4a4
mov dword [eax + 0xc], edi
call fcn.10005160
mov ebx, dword [edi + 0x60]
test ebx, ebx
je 0x1000553d
push dword [ebx + 4]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xc
push ebx
call fcn.10041ac4
add esp, 8
mov dword [edi + 0x60], esi
mov eax, edi
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 edx, str.mutex
lea ecx, [ebp - 0x1c]
call fcn.10002e70
mov edx, str.iocp
lea ecx, [ebp - 0x1c]
call fcn.10002e70
int3
Function at 0x100058d0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100657b5
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x1008600c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
xor edx, edx
lea eax, [esi + 0x18]
lock xadd dword [eax], edx
test edx, edx
jne 0x10005932
call fcn.10005a50
mov eax, dword [ebp + 8]
mov dword [eax], 0
mov dword [eax + 4], 0x10086b38
xor eax, eax
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
lea eax, [ebp - 0x24]
mov dword [ebp - 0x28], 0
push eax
call fcn.10043205
add esp, 4
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 0
mov ecx, esi
mov dword [ebp - 4], 0
push dword [0x100895a0]
neg ecx
lea eax, [esi + 0x14]
sbb ecx, ecx
and ecx, eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x1c]
push eax
push dword [0x100895a0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ebx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push ebx
push eax
push ecx
mov ecx, esi
mov byte [ebp - 4], 1
xor edi, edi
call fcn.10005b30
test eax, eax
je 0x100059cc
nop
cmp edi, 0xffffffff
lea eax, [edi + 1]
push ebx
cmove eax, edi
mov edi, eax
lea eax, [ebp - 0x34]
push eax
push ecx
mov ecx, esi
call fcn.10005b30
test eax, eax
jne 0x100059b0
push dword [ebp - 0x14]
push dword [0x100895a0]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
xor esi, esi
nop dword [eax]
mov eax, dword [ebp + esi*4 - 0x34]
test eax, eax
je 0x100059f1
push eax
call fcn.10041b03
add esp, 4
inc esi
cmp esi, 3
jl 0x100059e0
lea eax, [ebp - 0x24]
push eax
call fcn.100432f0
add esp, 4
mov eax, edi
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 0x10006120
Capabilities:
Set socket configuration

Disassembly:
sub esp, 0xc
push ebx
push ebp
mov ebp, ecx
mov dword [esp + 0x10], edx
push esi
push edi
cmp ebp, 0xffffffff
je 0x1000622e
cmp byte [esp + 0x20], 0
mov edi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
je 0x10006176
mov al, byte [edx]
test al, 8
je 0x10006176
or al, 8
xor ecx, ecx
push 4
mov byte [edx], al
lea eax, [esp + 0x18]
push eax
push 0x80
push 0xffff
push ebp
mov dword [esp + 0x28], ecx
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
je 0x10006176
call fcn.10002f00
call edi
push ebp
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
test ebx, ebx
jne 0x10006193
mov eax, dword [esp + 0x24]
mov dword [eax], ebx
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
call fcn.10002f00
mov esi, eax
call edi
mov edi, dword [esp + 0x24]
mov dword [edi], eax
mov dword [edi + 4], esi
call fcn.10002f00
mov ecx, eax
mov eax, dword [edi + 4]
mov eax, dword [eax + 4]
cmp eax, dword [ecx + 4]
jne 0x100061bf
cmp dword [edi], 0x2733
je 0x100061d9
call fcn.10002f00
mov ecx, eax
mov eax, dword [edi + 4]
mov eax, dword [eax + 4]
cmp eax, dword [ecx + 4]
jne 0x10006208
cmp dword [edi], 0x4d5
jne 0x10006208
lea eax, [esp + 0x14]
mov dword [esp + 0x14], 0
push eax
push 0x8004667e
push ebp
call dword [sym.imp.WS2_32.dll_ioctlsocket]
mov eax, dword [esp + 0x18]
push ebp
and byte [eax], 0xfc
call dword [sym.imp.WS2_32.dll_closesocket]
mov ebx, eax
test ebx, ebx
jne 0x10006212
mov dword [edi], eax
mov eax, ebx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov eax, ebx
mov dword [edi + 4], esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xc
ret

Function at 0x10006240
Capabilities:
Set socket configuration

Disassembly:
push ecx
push esi
push edi
mov edi, edx
mov esi, ecx
mov eax, dword [edi]
cmp eax, 0x4cf
jg 0x10006285
je 0x10006278
cmp eax, 0x79
je 0x1000626b
cmp eax, 0x4c9
jne 0x1000629a
call fcn.10002f00
mov dword [edi], 0x274d
jmp 0x10006297
call fcn.10002f00
mov dword [edi], 0x274c
jmp 0x10006297
call fcn.10002f00
mov dword [edi], 0x2743
jmp 0x10006297
cmp eax, 0x4d0
jne 0x1000629a
call fcn.10002f00
mov dword [edi], 0x2751
mov dword [edi + 4], eax
cmp dword [edi], 0
jne 0x100062e7
cmp esi, 0xffffffff
jne 0x100062b6
call fcn.10002f00
mov dword [edi], 0x2719
mov dword [edi + 4], eax
pop edi
pop esi
pop ecx
ret
push 0
push 0
push 0x7010
push 0xffff
push esi
call dword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x100062d5
mov dword [edi], eax
pop edi
pop esi
pop ecx
ret
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [edi], eax
mov dword [edi + 4], esi
pop edi
pop esi
pop ecx
ret
Function at 0x10006390
Capabilities:
Send data
Send data on socket

Disassembly:
push ecx
push ebx
push esi
push edi
push 0
push 0
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x18], 0
push eax
push dword [esp + 0x24]
push edx
push ecx
call dword [sym.imp.WS2_32.dll_WSASend]
mov ebx, eax
call fcn.10002f00
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edi, dword [esp + 0x1c]
mov dword [edi], eax
mov dword [edi + 4], esi
cmp eax, 0x40
jne 0x100063dd
call fcn.10002f00
mov dword [edi], 0x2746
jmp 0x100063ef
cmp eax, 0x4d2
jne 0x100063f2
call fcn.10002f00
mov dword [edi], 0x274d
mov dword [edi + 4], eax
test ebx, ebx
je 0x100063fe
or eax, 0xffffffff
pop edi
pop esi
pop ebx
pop ecx
ret
mov eax, dword [esp + 0xc]
mov dword [edi], 0
pop edi
pop esi
pop ebx
pop ecx
ret
Function at 0x100069f0
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x1008600c]
xor eax, esp
mov dword [esp + 0x418], eax
push ebx
push esi
lea eax, [esp + 0x1c]
mov dword [esp + 0x10], ecx
push edi
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], 0x400
push 0
push 0
lea eax, [esp + 0x18]
mov dword [esp + 0x14], 0
push eax
lea eax, [esp + 0x18]
mov dword [esp + 0x1c], 0
push eax
push 1
lea eax, [esp + 0x2c]
push eax
push dword [ecx]
call dword [sym.imp.WS2_32.dll_WSARecv]
mov ebx, eax
call fcn.10002f00
mov edi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
cmp esi, 0x40
jne 0x10006a72
call fcn.10002f00
mov edi, eax
mov esi, 0x2746
jmp 0x10006a98
cmp esi, 0x4d2
jne 0x10006a88
call fcn.10002f00
mov edi, eax
mov esi, 0x274d
jmp 0x10006a98
cmp esi, 0x2738
je 0x10006a9c
cmp esi, 0xea
je 0x10006a9c
test ebx, ebx
jne 0x10006ab7
mov eax, dword [esp + 0xc]
xor esi, esi
mov ecx, dword [esp + 0x14]
cmp eax, 0x400
je 0x10006a21
test eax, eax
jg 0x10006af8
je 0x10006ae1
call fcn.10002f00
mov ecx, dword [edi + 4]
cmp ecx, dword [eax + 4]
jne 0x10006acc
cmp esi, 0x2733
je 0x10006af8
call fcn.10002f00
mov ecx, dword [edi + 4]
cmp ecx, dword [eax + 4]
jne 0x10006ae1
cmp esi, 0x4d5
je 0x10006af8
xor al, al
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x418]
xor ecx, esp
call fcn.1004144e
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x424]
mov al, 1
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.1004144e
mov esp, ebp
pop ebp
ret