joyce8/EMBER2024-capa huggingface dataset:
Function at 0x429dd0
Capabilities:
Get geographical location

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x41c
mov eax, dword [0x430110]
xor eax, esp
mov dword [esp + 0x418], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
cmp dword [ebp + 0xc], esi
push edi
mov dword [esp + 0xc], eax
jle 0x429eab
mov edi, dword [sym.imp.KERNEL32.dll_IsBadStringPtrA]
mov ebx, dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
cmp dword [ebp + 0xc], 0x2d
jne 0x429e38
push 0
push str.Xuwijuhoyodu_bovoru_rijibulogoju_womugerawas_bolajoha
call edi
push str.letebovula_jin
push str.yerav
push str.gegazucut_komazazusi_migowofitasayudofuyacucu
push str.pebegiviba_tuyehumefufutomo_bolazewidiwijerukafomo_hazaherejajimunidac_kalotonufuxupazibedoxepunafefot
call ebx
push 0
call dword [sym.imp.KERNEL32.dll_FreeEnvironmentStringsW]
call fcn.00429d20
mov ecx, dword [esp + 0xc]
xor byte [ecx + esi], al
cmp dword [ebp + 0xc], 0xf
jne 0x429ea1
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetLocaleInfoA]
xor eax, eax
push eax
lea edx, [esp + 0x24]
push edx
push 0x42d8d8
mov dword [esp + 0x1e], eax
mov dword [esp + 0x22], eax
mov dword [esp + 0x26], eax
mov word [esp + 0x2a], ax
xor ecx, ecx
lea eax, [esp + 0x1c]
push eax
push ecx
push ecx
mov word [esp + 0x28], cx
call dword [sym.imp.KERNEL32.dll_GetTimeFormatA]
push str.Fewixetomonelo
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoA]
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesLengthA]
inc esi
cmp esi, dword [ebp + 0xc]
jl 0x429e0b
cmp dword [ebp + 0xc], 0x2d
jne 0x429ec5
mov dword [0x432ab8], 0xa62e7790
mov dword [0x432abc], 0xffffffff
mov ecx, dword [esp + 0x424]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00401fd5
mov esp, ebp
pop ebp
ret
Function at 0x401910
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41033d
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x416008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, edx
mov edi, ecx
mov dword [ebp - 0x10], edi
push 0
mov dword [ebp - 0x10], edi
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, eax
mov dword [ebp - 0x10], 0
push 0
movzx eax, si
push eax
push str.String
push ebx
call dword [sym.imp.KERNEL32.dll_FindResourceExW]
mov esi, eax
test esi, esi
je 0x40198f
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov dword [ebp - 0x10], eax
test eax, eax
je 0x40198f
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x40198f
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
jmp 0x4019b3
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4019a3
movzx eax, ax
or eax, 0x80070000
test eax, eax
je 0x401a34
test eax, eax
js 0x401a34
xor eax, eax
mov ecx, dword [ebp - 0x10]
add eax, 3
add ecx, 0xfffffffd
mov dword [ebp - 0x28], 0
push ecx
push eax
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0xf
mov byte [ebp - 0x28], 0
call fcn.004046a0
lea edx, [ebp - 0x28]
mov dword [ebp - 4], 0
mov ecx, edi
call fcn.00408c20
mov edx, dword [ebp - 0x14]
cmp edx, 0x10
jb 0x401a5a
mov ecx, dword [ebp - 0x28]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401a16
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401a6e
push edx
push ecx
call fcn.00409afe
add esp, 8
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
xor eax, eax
mov dword [edi], 0
push eax
mov dword [edi + 0x10], 0
mov ecx, edi
mov dword [edi + 0x14], 7
push 0x412478
mov word [edi], ax
call fcn.00404540
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
call fcn.0040a5e0
int3
Function at 0x408420
Capabilities:
Enumerate processes on remote desktop session host

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov eax, dword [0x416008]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
xor esi, esi
mov dword [ebp - 0x20], ecx
push edi
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x14], esi
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 8], esi
call fcn.00408580
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
push 1
push esi
push esi
call dword [sym.imp.WTSAPI32.dll_WTSEnumerateProcessesW]
test eax, eax
je 0x4084f9
xor edi, edi
cmp dword [ebp - 8], esi
jbe 0x4084f0
xor ebx, ebx
mov esi, dword [ebp - 0x10]
add esi, ebx
cmp dword [esi + 8], 0
je 0x4084e4
mov eax, dword [esi + 0xc]
test eax, eax
je 0x4084e4
push 0x16
push eax
call dword [sym.imp.ADVAPI32.dll_IsWellKnownSid]
test eax, eax
je 0x4084e4
cmp dword [ebp - 0x14], 0
jne 0x4084bc
cmp dword [esi], 0
jne 0x4084bc
push dword [esi + 8]
push str.lsass.exe
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x4084bc
mov esi, dword [esi + 4]
mov dword [ebp - 0x14], esi
jmp 0x4084e7
cmp dword [ebp - 0xc], 0
jne 0x4084e4
mov eax, dword [ebp - 0x18]
cmp eax, dword [esi]
jne 0x4084e4
push dword [esi + 8]
push str.winlogon.exe
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x4084e4
mov eax, dword [esi + 4]
mov dword [ebp - 0xc], eax
mov esi, dword [ebp - 0x14]
inc edi
add ebx, 0x10
cmp edi, dword [ebp - 8]
jb 0x408475
push dword [ebp - 0x10]
call dword [sym.imp.WTSAPI32.dll_WTSFreeMemory]
mov edi, dword [sym.imp.KERNEL32.dll_OpenProcess]
xor ebx, ebx
push esi
push ebx
push 0x400
call edi
mov esi, eax
test esi, esi
jne 0x408521
push dword [ebp - 0xc]
push eax
push 0x400
call edi
mov esi, eax
test esi, esi
je 0x40855c
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ebx
push eax
push 2
push esi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
je 0x408559
push dword [ebp - 0x1c]
push 1
push 1
push 0
push 0x2000000
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
push dword [ebp - 0xc]
mov ebx, eax
call edi
push esi
call edi
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov dword [eax + 4], ebx
xor ecx, ebp
mov byte [eax], 1
pop ebx
call fcn.0040975a
mov esp, ebp
pop ebp
ret
Function at 0x408af0
Capabilities:
Get token privileges

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x10
mov eax, dword [0x416008]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
mov eax, edx
push ecx
push 0
push 0
push 3
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
cmp eax, 0x7a
jne 0x408bdf
push dword [ebp - 8]
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov esi, eax
test esi, esi
je 0x408bd7
lea eax, [ebp - 8]
push eax
push dword [ebp - 8]
push esi
push 3
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_GetTokenInformation]
test eax, eax
jne 0x408b78
push esi
push eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
jmp 0x408bdf
mov dword [edi], 0
xor eax, eax
mov edx, dword [esi]
test edx, edx
je 0x408b9c
mov ebx, dword [ebp + 8]
lea ecx, [esi + 0xc]
lea esp, [esp]
mov dword [ecx], ebx
lea ecx, [ecx + 0xc]
mov edx, dword [esi]
inc eax
cmp eax, edx
jb 0x408b90
push edx
mov edx, dword [ebp - 0xc]
lea eax, [esi + 4]
push eax
lea ecx, [ebp - 0xc]
call fcn.00408a40
add esp, 8
mov ecx, dword [eax]
mov eax, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
push 0
mov dword [edi], ecx
call eax
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040975a
mov esp, ebp
pop ebp
ret
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
call ebx
test eax, eax
jle 0x408bef
movzx eax, ax
or eax, 0x80070000
test eax, eax
jne 0x408c0a
mov dword [edi], 0x8007065b
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040975a
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
mov dword [edi], eax
xor ecx, ebp
mov eax, edi
pop edi
pop esi
pop ebx
call fcn.0040975a
mov esp, ebp
pop ebp
ret
Function at 0x408fc0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x41091e
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x416008]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov esi, ecx
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x14], 0
xor eax, eax
mov dword [esi], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 7
mov word [esi], ax
mov dword [ebp - 4], eax
mov eax, ebx
cmp dword [ebx + 0x14], 8
mov dword [ebp - 0x14], 1
jb 0x409023
mov eax, dword [ebx]
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov edx, eax
mov dword [ebp - 0x18], edx
test edx, edx
je 0x40916d
mov edi, dword [esi + 0x10]
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x20], edi
cmp edx, edi
ja 0x40905c
mov ecx, esi
cmp eax, 8
jb 0x409051
mov ecx, dword [esi]
xor eax, eax
mov dword [esi + 0x10], edx
mov word [ecx + edx*2], ax
jmp 0x4090bc
mov ecx, edx
sub eax, edi
sub ecx, edi
mov dword [ebp - 0x1c], ecx
cmp ecx, eax
ja 0x4090a8
cmp dword [esi + 0x14], 8
mov eax, esi
mov dword [esi + 0x10], edx
mov dword [ebp - 0x10], esi
jb 0x40907c
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
lea eax, [eax + edi*2]
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x40909a
mov edi, dword [ebp - 0x18]
xor eax, eax
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
lea eax, [edi + ecx]
mov ecx, dword [ebp - 0x10]
xor edi, edi
mov word [ecx + eax*2], di
jmp 0x4090bc
push ecx
push ecx
mov byte [ebp - 0x20], 0
push dword [ebp - 0x20]
push ecx
mov ecx, esi
call fcn.00404ee0
mov edx, dword [ebp - 0x18]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4090c6
mov eax, dword [esi]
cmp dword [ebx + 0x14], 8
jb 0x4090ce
mov ebx, dword [ebx]
push edx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov ebx, dword [esi + 0x10]
mov edi, dword [esi + 0x14]
lea ecx, [eax - 1]
cmp ecx, ebx
ja 0x40910a
mov eax, esi
cmp edi, 8
jb 0x4090ed
mov eax, dword [esi]
xor edx, edx
mov dword [esi + 0x10], ecx
mov word [eax + ecx*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, ecx
mov eax, edi
sub edx, ebx
sub eax, ebx
cmp edx, eax
ja 0x40915c
mov dword [esi + 0x10], ecx
mov eax, esi
mov dword [ebp - 0x10], esi
cmp edi, 8
jb 0x409128
mov eax, dword [esi]
mov dword [ebp - 0x10], eax
lea edi, [eax + ebx*2]
test edx, edx
je 0x40913c
xor eax, eax
mov ecx, edx
shr ecx, 1
rep stosd dword es:[edi], eax
adc ecx, ecx
rep stosw word es:[edi], ax
mov ecx, dword [ebp - 0x10]
lea eax, [ebx + edx]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ecx
push edx
mov byte [ebp - 0x20], 0
mov ecx, esi
push dword [ebp - 0x20]
push edx
call fcn.00404ee0
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
Function at 0x40a610
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x328
mov eax, dword [0x416008]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x17
call dword [sym.imp.KERNEL32.dll_IsProcessorFeaturePresent]
test eax, eax
je 0x40a637
mov ecx, 5
int 0x29
push 2
call fcn.0040a2b8
push 0x50
lea eax, [ebp - 0x320]
push 0
push eax
call sub.msvcrt.dll_memset
push 0x2cc
lea eax, [ebp - 0x2d0]
push 0
push eax
call sub.msvcrt.dll_memset
lea eax, [ebp - 0x320]
add esp, 0x1c
mov dword [ebp - 0x328], eax
lea eax, [ebp - 0x2d0]
mov dword [ebp - 0x324], eax
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], ecx
mov dword [ebp - 0x228], edx
mov dword [ebp - 0x22c], ebx
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x234], edi
mov word [ebp - 0x208], ss
mov word [ebp - 0x214], cs
mov word [ebp - 0x238], ds
mov word [ebp - 0x23c], es
mov word [ebp - 0x240], fs
mov word [ebp - 0x244], gs
pushfd
pop dword [ebp - 0x210]
mov eax, dword [ebp + 4]
mov dword [ebp - 0x218], eax
lea eax, [ebp + 4]
mov dword [ebp - 0x20c], eax
mov dword [ebp - 0x2d0], 0x10001
mov eax, dword [eax - 4]
mov dword [ebp - 0x21c], eax
mov eax, dword [ebp + 4]
mov dword [ebp - 0x320], 0xc0000417
mov dword [ebp - 0x31c], 1
mov dword [ebp - 0x314], eax
call dword [sym.imp.KERNEL32.dll_IsDebuggerPresent]
push 0
mov esi, eax
call dword [sym.imp.KERNEL32.dll_SetUnhandledExceptionFilter]
lea eax, [ebp - 0x328]
push eax
call dword [sym.imp.KERNEL32.dll_UnhandledExceptionFilter]
test eax, eax
jne 0x40a742
test esi, esi
jne 0x40a742
push 2
call fcn.0040a2b8
add esp, 4
push 0xc0000417
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
mov ecx, dword [ebp - 4]
xor ecx, ebp
pop esi
call fcn.0040975a
mov esp, ebp
pop ebp
ret

Function at 0x40c6c0
Capabilities:
Terminate process

Disassembly:
push ebp
mov ebp, esp
push esi
call fcn.0040c6f0
mov esi, dword [ebp + 8]
test al, al
je 0x40c6de
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
push eax
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push esi
call fcn.0040c700
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_ExitProcess]

Function at 0x40c830
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 2
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40c88c
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40c88c
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40c88c
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40c88c
cmp dword [ecx + 0x74], 0xe
jbe 0x40c88c
cmp dword [ecx + 0xe8], 0
je 0x40c88c
push dword [ebp + 8]
call fcn.0040c700
add esp, 4
lea eax, [ebp - 0xc]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 1]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push 0x4164d8
call fcn.0040c4d0
add esp, 8
cmp dword [ebp - 8], 0
jne 0x40c8c1
push dword [ebp + 8]
call fcn.0040c6c0
mov esp, ebp
pop ebp
ret
Function at 0x40c900
Capabilities:
Parse pe header

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push 0
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
test eax, eax
je 0x40c95c
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40c95c
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x40c95c
mov eax, 0x10b
cmp word [ecx + 0x18], ax
jne 0x40c95c
cmp dword [ecx + 0x74], 0xe
jbe 0x40c95c
cmp dword [ecx + 0xe8], 0
je 0x40c95c
push dword [ebp + 8]
call fcn.0040c700
add esp, 4
lea eax, [ebp - 0xc]
mov byte [ebp - 1], 0
mov dword [ebp - 0x18], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x14], eax
lea eax, [ebp - 1]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
push 0x4164d8
call fcn.0040c4d0
add esp, 8
cmp dword [ebp - 8], 0
jne 0x40c991
push dword [ebp + 8]
call fcn.0040c6c0
mov esp, ebp
pop ebp
ret

Function at 0x40cfc0
Capabilities:
Get process heap force flags

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov ecx, dword [eax + 0xa4]
shl ecx, 0x10
or ecx, dword [eax + 0xa8]
cmp ecx, 0x60000
jae 0x40cfea
mov eax, 2
pop ebp
ret
push esi
call sub.msvcrt.dll__errno
lea esi, [eax - 8]
mov eax, dword [esi + 4]
cmp eax, 0xffffffff
je 0x40d00c
test eax, eax
je 0x40d00c
push 0x10
xor esi, esi
call dword [sym.imp.msvcrt.dll__amsg_exit]
add esp, 4
mov ecx, dword [esi + 0x70]
mov eax, ecx
and al, 2
movzx edx, al
mov eax, dword [ebp + 8]
neg edx
sbb edx, edx
inc eax
cmp eax, 3
ja case.default.0x40d023
jmp dword [eax*4 + 0x40d058]
or ecx, 2
lea eax, [edx + 2]
mov dword [esi + 0x70], ecx
pop esi
pop ebp
ret
and ecx, 0xfffffffd
mov dword [esi + 0x70], ecx
lea eax, [edx + 2]
pop esi
pop ebp
ret
call sub.msvcrt.dll__errno
mov dword [eax], 0x16
call fcn.0040a5a0
or eax, 0xffffffff
pop esi
pop ebp
ret
Function at 0x10002aa0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
cmp dword [eax + 0x70], 0
mov dword [eax + 0x4c], ecx
jne 0x10002ab3
mov dword [eax + 0x70], 1
mov dword [eax + 0x54], ecx
mov edx, ecx
sub edx, dword [eax + 0x54]
cmp edx, 0x2710
jge 0x10002ac8
cmp edx, 0xffffd8f0
jge 0x10002acd
mov dword [eax + 0x54], ecx
jmp 0x10002ad1
test edx, edx
js 0x10002aec
mov edx, dword [eax + 0x50]
add dword [eax + 0x54], edx
push esi
push edi
mov edi, ecx
sub edi, dword [eax + 0x54]
pop edi
pop esi
js 0x10002ae7
add edx, ecx
mov dword [eax + 0x54], edx
jmp fcn.100024b0
ret

Function at 0x10002c60
Capabilities:
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x19c
mov eax, dword [0x1001d210]
xor eax, esp
mov dword [esp + 0x198], eax
push edi
xor edi, edi
mov dword [esi + 8], edi
mov dword [esi + 0xc], edi
mov dword [esi + 0x10], edi
mov dword [esi], vtable.CTcpSocket.0
mov dword [esi + 0x38], edi
mov dword [esi + 0x30], edi
mov dword [esi + 0x34], edi
mov eax, vtable.CBuffer.0
mov dword [esi + 0x2c], eax
mov dword [esi + 0x3c], eax
mov dword [esi + 0x48], edi
mov dword [esi + 0x40], edi
mov dword [esi + 0x44], edi
mov dword [esi + 0x4c], eax
lea eax, [esp + 8]
push eax
push 0x202
mov dword [esi + 0x58], edi
mov dword [esi + 0x50], edi
mov dword [esi + 0x54], edi
call dword [sym.imp.WS2_32.dll_WSAStartup]
push edi
push edi
push 1
push edi
call dword [sym.imp.KERNEL32.dll_CreateEventW]
push edi
lea ecx, [esi + 0x18]
push ecx
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_InterlockedExchange]
mov ecx, dword [esp + 0x19c]
mov dword [esi + 0x5c], edi
mov dword [esi + 0x60], edi
mov dword [esi + 0x14], edi
pop edi
xor ecx, esp
mov dword [esi + 0x64], 0xffffffff
mov eax, esi
call fcn.1000935e
mov esp, ebp
pop ebp
ret
Function at 0x10003240
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
mov esi, eax
mov dword [ebp - 4], 0
cmp ebx, 0x40000
jl 0x1000329d
jmp 0x10003260
xor edi, edi
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0x64]
push 0
push 0x40000
push esi
push ecx
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x10003281
inc edi
cmp edi, 0xf
jl 0x10003262
cmp edi, 0xf
je 0x100032ce
add dword [ebp - 4], eax
sub ebx, 0x40000
add esi, 0x40000
cmp ebx, 0x40000
jge 0x10003260
test ebx, ebx
jle 0x100032c6
xor edi, edi
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0x64]
push 0
push ebx
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
test eax, eax
jg 0x100032be
inc edi
cmp edi, 0xf
jl 0x100032a3
cmp edi, 0xf
je 0x100032ce
add dword [ebp - 4], eax
mov eax, dword [ebp - 4]
cmp eax, dword [ebp + 0xc]
je 0x100032d1
or eax, 0xffffffff
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8

Function at 0x100034e0
Capabilities:
Create thread
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 8
push ebx
push esi
mov esi, eax
mov eax, dword [esi + 0x198]
xor ebx, ebx
cmp eax, ebx
jne 0x10003502
mov dword [esi + 0x1b8], 0x598
jmp 0x10003519
cmp eax, 0x598
jbe 0x10003513
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [esi + 0x1b8], eax
push edi
mov dword [esi + 0x64], ebx
call fcn.10003640
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov eax, 1
push 0x1004a470
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], 5
mov dword [esi + 0x38], ebx
mov dword [esi + 0x3c], eax
mov dword [ebp - 8], ebx
call edi
mov dword [esi + 0x48], eax
cmp eax, ebx
jne 0x10003558
push 0x1004a470
call edi
mov dword [esi + 0x48], eax
mov ecx, dword [esi + 0x40]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 4]
push eax
push 0x1001
push 0xffff
mov ebx, 0x40000
push ecx
mov dword [ebp - 4], ebx
call edi
mov eax, dword [esi + 0x40]
push 4
lea edx, [ebp - 4]
push edx
push 0x1002
push 0xffff
push eax
mov dword [ebp - 4], ebx
call edi
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
push ecx
push edx
call fcn.100036d0
test eax, eax
je 0x100035ed
lea eax, [esi + 0x58]
push eax
push 0
push esi
push 0x10003850
push 0
push 0
call fcn.10009d5b
add esp, 0x18
mov dword [esi + 0x54], eax
test eax, eax
je 0x100035df
mov ecx, dword [esi + 0x2c]
push ecx
mov edi, 1
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov dword [esi + 0x5c], 8
push 0x65f
jmp 0x100035fb
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [esi + 0x5c], 0xb
push eax
mov ebx, dword [sym.imp.KERNEL32.dll_SetLastError]
call ebx
xor eax, eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], 5
mov dword [esi + 0x38], eax
mov dword [esi + 0x3c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, esi
call fcn.10003f50
push edi
call ebx
mov edi, dword [ebp - 8]
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
Function at 0x100036d0
Capabilities:
Connect socket
Connect udp socket
Create udp socket
Resolve dns
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
mov eax, dword [0x1001d210]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
push 0x11
push 2
xor edi, edi
push 2
mov dword [ebp - 0x18], edi
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi + 0x40], eax
cmp eax, 0xffffffff
jne 0x10003712
pop edi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1000935e
mov esp, ebp
pop ebp
ret 8
push edi
push edi
lea ecx, [ebp - 0x24]
push ecx
push edi
push edi
push 4
lea edx, [ebp - 0x1c]
push edx
push 0x9800000c
push eax
mov dword [ebp - 0x1c], edi
call dword [sym.imp.WS2_32.dll_WSAIoctl]
mov ecx, dword [esi + 0x40]
mov edi, dword [sym.imp.WS2_32.dll_setsockopt]
push 4
lea eax, [ebp - 0x1c]
push eax
push 0xfffffffffffffffb
push 0xffff
push ecx
call edi
mov eax, dword [esi + 0x40]
push 4
lea edx, [ebp - 0x1c]
push edx
push 4
push 0xffff
push eax
call edi
call dword [sym.imp.WS2_32.dll_WSACreateEvent]
push 0
push 0
push 0
push 0
push ebx
mov dword [esi + 0x44], eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x20], eax
inc eax
push eax
call fcn.10009348
mov ecx, dword [ebp - 0x20]
add esp, 4
push 0
push 0
push ecx
mov edi, eax
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push eax
push ebx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov edx, dword [ebp - 0x20]
push edi
mov byte [edi + edx], 0
call dword [sym.imp.WS2_32.dll_gethostbyname]
push edi
mov ebx, eax
call fcn.10009353
add esp, 4
test ebx, ebx
je 0x100036fe
mov ecx, dword [ebp + 0xc]
mov eax, 2
push ecx
mov word [ebp - 0x14], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x12], ax
mov edx, dword [ebx + 0xc]
mov eax, dword [edx]
mov ecx, dword [eax]
mov edx, dword [esi + 0x44]
mov eax, dword [esi + 0x40]
push 0x30
push edx
push eax
mov dword [ebp - 0x10], ecx
call dword [sym.imp.WS2_32.dll_WSAEventSelect]
cmp eax, 0xffffffff
je 0x10003837
mov edx, dword [esi + 0x40]
push 0x10
lea ecx, [ebp - 0x14]
push ecx
push edx
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
je 0x10003830
cmp eax, 0xffffffff
jne 0x10003827
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x10003830
mov dword [ebp - 0x18], 0
jmp 0x10003837
mov dword [ebp - 0x18], 1
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x18]
pop edi
xor ecx, ebp
pop ebx
call fcn.1000935e
mov esp, ebp
pop ebp
ret 8