joyce8/EMBER2024-capa huggingface dataset:
Function at 0x10001470
Capabilities:
Read file via mapping

Disassembly:
sub esp, 0xc
mov eax, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x18]
push eax
lea edx, [esp + 8]
mov dword [esp + 8], 0xc
lea ecx, [esi + 0x20]
mov dword [esp + 0xc], 0
push ecx
push 0
push 4
push edx
push 0xffffffffffffffff
mov dword [esp + 0x24], 1
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
test eax, eax
je 0x100014d9
push 0
push 0
push 0
push 6
push eax
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x100014d9
push edi
mov ecx, esi
mov esi, dword [esp + 0x18]
mov edi, eax
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
pop edi
pop esi
add esp, 0xc
ret

Function at 0x100014e0
Capabilities:
Encode data using xor

Disassembly:
mov ecx, dword [esp + 4]
push edi
mov edi, dword [esp + 0xc]
cmp ecx, edi
ja 0x1000151b
mov dl, byte [esp + 0x14]
test dl, dl
je 0x1000151b
test ecx, ecx
je 0x1000151b
test edi, edi
je 0x1000151b
push ebp
mov ebp, dword [esp + 0x14]
push esi
mov esi, ebp
dec ecx
mov al, byte [ecx + 1]
inc ecx
xor al, dl
inc dl
mov byte [esi], al
inc esi
cmp ecx, edi
jne 0x10001506
mov eax, ebp
pop esi
pop ebp
pop edi
ret
xor eax, eax
pop edi
ret

Function at 0x10002f0e
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a4
mov edx, dword [ebp + 8]
xor ecx, ecx
mov eax, 0x100063d0
cmp edx, dword [eax]
je 0x10002f30
add eax, 8
inc ecx
cmp eax, 0x10006460
jl 0x10002f21
push esi
mov esi, ecx
shl esi, 3
cmp edx, dword [esi + 0x100063d0]
jne 0x1000305e
mov eax, dword [0x10007028]
cmp eax, 1
je 0x10003038
test eax, eax
jne 0x10002f61
cmp dword [0x1000702c], 1
je 0x10003038
cmp edx, 0xfc
je 0x1000305e
lea eax, [ebp - 0x1a4]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x10002f98
lea eax, [ebp - 0x1a4]
push str._program_name_unknown_
push eax
call fcn.100032d0
pop ecx
pop ecx
lea eax, [ebp - 0x1a4]
push edi
push eax
lea edi, [ebp - 0x1a4]
call fcn.100033c0
inc eax
pop ecx
cmp eax, 0x3c
jbe 0x10002fdb
lea eax, [ebp - 0x1a4]
push eax
call fcn.100033c0
mov edi, eax
lea eax, [ebp - 0x1a4]
sub eax, 0x3b
push 3
add edi, eax
push 0x10005394
push edi
call fcn.10004440
add esp, 0x10
lea eax, [ebp - 0xa0]
push str.Runtime_Error__n_nProgram:
push eax
call fcn.100032d0
lea eax, [ebp - 0xa0]
push edi
push eax
call fcn.100032e0
lea eax, [ebp - 0xa0]
push 0x10005374
push eax
call fcn.100032e0
push dword [esi + 0x100063d4]
lea eax, [ebp - 0xa0]
push eax
call fcn.100032e0
push 0x12010
lea eax, [ebp - 0xa0]
push str.Microsoft_Visual_C_Runtime_Library
push eax
call fcn.100043ae
add esp, 0x2c
pop edi
jmp 0x1000305e
lea eax, [ebp + 8]
lea esi, [esi + 0x100063d4]
push 0
push eax
push dword [esi]
call fcn.100033c0
pop ecx
push eax
push dword [esi]
push 0xfffffffffffffff4
call dword [sym.imp.KERNEL32.dll_GetStdHandle]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
pop esi
leave
ret
Function at 0x401900
Capabilities:
Inspect load icon resource

Disassembly:
push 0xffffffffffffffff
push 0x40ba93
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, dword [esp + 0x14]
push ebx
push ebp
push esi
push edi
mov esi, ecx
push eax
push 0x66
mov dword [esp + 0x18], esi
call fcn.0040b07e
lea edi, [esi + 0x60]
mov dword [esp + 0x1c], 0
mov ecx, edi
call sub.MFC42.DLL_CWnd::CWnd
mov dword [edi], 0x40d86c
lea edi, [esi + 0xa0]
mov byte [esp + 0x1c], 1
mov ecx, edi
call fcn.0040b0c0
lea ebx, [esi + 0xa4]
mov byte [esp + 0x1c], 2
mov ecx, ebx
call fcn.0040b0c0
lea ebp, [esi + 0xa8]
mov byte [esp + 0x1c], 3
mov ecx, ebp
call fcn.0040b0c0
lea ecx, [esi + 0xac]
mov byte [esp + 0x1c], 4
call fcn.0040b0c0
lea ecx, [esi + 0xb0]
mov byte [esp + 0x1c], 5
call fcn.0040b0c0
lea ecx, [esi + 0xb4]
mov byte [esp + 0x1c], 6
call fcn.0040b0c0
lea ecx, [esi + 0xb8]
mov byte [esp + 0x1c], 7
call fcn.0040b0c0
lea ecx, [esi + 0xbc]
mov byte [esp + 0x1c], 8
call fcn.0040b0c0
push 0x4164e8
mov ecx, edi
mov byte [esp + 0x20], 9
mov dword [esi], 0x40d790
call sub.MFC42.DLL_CString::operator
push 0x4164e8
mov ecx, ebx
call sub.MFC42.DLL_CString::operator
push 0x4164e8
mov ecx, ebp
call sub.MFC42.DLL_CString::operator
push 0x4164e8
lea ecx, [esi + 0xac]
call sub.MFC42.DLL_CString::operator
push 0x4164e8
lea ecx, [esi + 0xb0]
call sub.MFC42.DLL_CString::operator
push 0x4164e8
lea ecx, [esi + 0xb4]
call sub.MFC42.DLL_CString::operator
push 0x4164e8
lea ecx, [esi + 0xb8]
call sub.MFC42.DLL_CString::operator
push 0x4164e8
lea ecx, [esi + 0xbc]
call sub.MFC42.DLL_CString::operator
call sub.MFC42.DLL_AfxGetModuleState
push 0x80
push 0xe
push 0x80
call sub.MFC42.DLL_AfxFindResourceHandle
push eax
call dword [sym.imp.USER32.dll_LoadIconA]
mov dword [esi + 0xc0], eax
mov ecx, dword [0x41627c]
push 0x410100
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
call eax
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
mov eax, dword [0x416278]
test eax, eax
je 0x401a97
mov edx, dword [eax]
push eax
call dword [edx + 8]
lea eax, [esp + 0x24]
push eax
push 0x4100f0
push 7
push 0
push 0x4100e0
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jl 0x401ae0
mov ecx, dword [esp + 0x24]
push ecx
call dword [sym.imp.ole32.dll_OleRun]
test eax, eax
jl 0x401ad6
mov eax, dword [esp + 0x24]
push 0x416278
push 0x4100d0
push eax
mov edx, dword [eax]
call dword [edx]
mov eax, dword [esp + 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov ecx, dword [esp + 0x14]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 4
Function at 0x402700
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x40bcd0
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10c
push esi
mov dword [esp + 0xc], 0
lea ecx, [esp + 4]
mov dword [esp + 0x118], 2
call fcn.0040b0c0
mov eax, dword [esp + 0x124]
lea ecx, [esp + 8]
push eax
push ecx
mov byte [esp + 0x120], 3
call fcn.00402820
add esp, 8
mov edx, dword [esp + 8]
mov ecx, dword [esp + 0x12c]
push edx
mov edx, dword [esp + 0x12c]
lea eax, [esp + 0x14]
push 0x100
push eax
push 0x4164e8
push ecx
push edx
mov byte [esp + 0x130], 4
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
lea eax, [esp + 0x10]
lea ecx, [esp + 4]
push eax
push 0x41027c
push ecx
call sub.MFC42.DLL_CString::Format
mov esi, dword [esp + 0x12c]
add esp, 0xc
lea edx, [esp + 4]
mov ecx, esi
push edx
call sub.MFC42.DLL_CString::CString_1
mov dword [esp + 0xc], 1
lea ecx, [esp + 8]
mov byte [esp + 0x118], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 4]
mov byte [esp + 0x118], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x128]
mov byte [esp + 0x118], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x12c]
mov byte [esp + 0x118], 0
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x110]
mov eax, esi
pop esi
mov dword fs:[0], ecx
add esp, 0x118
ret

Function at 0x407940
Capabilities:
Acquire debug privileges

Disassembly:
push esi
push 1
mov esi, ecx
push str.SeDebugPrivilege
call fcn.00407970
mov eax, esi
pop esi
ret

Function at 0x407a70
Capabilities:
Check os version

Disassembly:
sub esp, 0x94
push edi
mov ecx, 0x25
xor eax, eax
lea edi, [esp + 4]
rep stosd dword es:[edi], eax
lea eax, [esp + 4]
mov dword [esp + 4], 0x94
push eax
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edx, dword [esp + 8]
pop edi
cmp edx, 6
sbb eax, eax
inc eax
add esp, 0x94
ret
Function at 0x407ab0
Capabilities:
Create thread

Disassembly:
push ecx
mov dword [esp], 0
call fcn.00407a70
test eax, eax
je 0x407b2b
push str.NtCreateThreadEx
push str.ntdll.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
jne 0x407ae1
pop ecx
ret 0xc
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
push 0
push 0
push 0
push 0
push 0
push ecx
mov ecx, dword [esp + 0x20]
push edx
push ecx
push 0
lea edx, [esp + 0x24]
push 0x1fffff
push edx
call eax
mov eax, dword [esp]
test eax, eax
jne 0x407b6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MyCreateRemoteThread___:_NtCreateThreadEx__
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
xor eax, eax
pop ecx
ret 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 8]
push 0
push 0
push eax
push ecx
push 0
push 0
push edx
call dword [sym.imp.KERNEL32.dll_CreateRemoteThread]
test eax, eax
mov dword [esp], eax
jne 0x407b6b
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MyCreateRemoteThread___:_CreateRemoteThread__
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
xor eax, eax
pop ecx
ret 0xc
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0xffffffff
jne 0x407b94
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.MyCreateRemoteThread___:_WaitForSingleObject__
call dword [sym.imp.MSVCRT.dll_printf]
add esp, 8
xor eax, eax
pop ecx
ret 0xc
mov eax, 1
pop ecx
ret 0xc

Function at 0x4082a0
Capabilities:
Get mac address on windows

Disassembly:
sub esp, 0x288
lea eax, [esp]
push ebx
lea ecx, [esp + 0xc]
push eax
push ecx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
call sub.iphlpapi.dll_GetAdaptersInfo
cmp eax, 0x6f
jne 0x408381
mov edx, dword [esp + 4]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
je 0x408377
push ebp
push esi
lea eax, [esp + 0xc]
push edi
push eax
push ebx
call sub.iphlpapi.dll_GetAdaptersInfo
test eax, eax
jne 0x408346
mov edx, dword [0x4174f0]
mov eax, ebx
mov ecx, dword [eax + 0x190]
lea esi, [ecx + edx]
cmp esi, 0x1000
jae 0x40834f
mov ebp, ecx
lea esi, [eax + 0x194]
lea edi, [edx + 0x4164f0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
add edx, dword [eax + 0x190]
mov dword [0x4174f0], edx
mov eax, dword [eax]
test eax, eax
jne 0x408307
jmp 0x40834f
add eax, 0xf0000000
mov dword [esp + 0x14], eax
push ebx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [esp + 0x14]
xor ecx, ecx
test eax, eax
pop edi
pop esi
sete cl
pop ebp
mov eax, ecx
pop ebx
add esp, 0x288
ret
xor eax, eax
pop ebx
add esp, 0x288
ret
add eax, 0xe0000000
xor ecx, ecx
test eax, eax
sete cl
mov eax, ecx
pop ebx
add esp, 0x288
ret
Function at 0x408500
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
sub esp, 0x7c
push ebx
push ebp
push esi
push edi
mov ecx, 0xb
mov esi, str.devicephysicalmemory
lea edi, [esp + 0x50]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov dword [esp + 0x7e], eax
xor ebx, ebx
mov dword [esp + 0x82], eax
lea ecx, [esp + 0x50]
mov dword [esp + 0x86], eax
lea edx, [esp + 0x28]
push str.ntdll.dll
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x34], 0xf0000
mov dword [esp + 0x38], ebx
mov dword [esp + 0x20], 0xffff
mov word [esp + 0x8e], ax
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], ecx
mov word [esp + 0x2c], 0x2c
mov word [esp + 0x2e], 0x2e
mov dword [esp + 0x48], 0x40
mov dword [esp + 0x3c], 0x18
mov dword [esp + 0x44], edx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x50], ebx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
push str.ZwOpenSection
push esi
call edi
push str.ZwMapViewOfSection
push esi
mov ebp, eax
call edi
push str.ZwUnmapViewOfSection
push esi
mov dword [esp + 0x18], eax
call edi
mov dword [esp + 0x24], eax
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x24]
push 4
push ecx
call ebp
test eax, eax
jne 0x40869b
push 2
push ebx
lea edx, [esp + 0x24]
push 1
lea eax, [esp + 0x3c]
push edx
mov edx, dword [esp + 0x30]
push eax
push 0xffff
lea ecx, [esp + 0x2c]
push ebx
push ecx
push 0xffffffffffffffff
push edx
call dword [esp + 0x38]
test eax, eax
jne 0x40869b
mov eax, dword [esp + 0x14]
lea ecx, [esp + 0x10]
push ecx
mov dword [esp + 0x14], eax
call fcn.00408050
add esp, 4
cmp eax, ebx
jne 0x408640
lea edx, [esp + 0x10]
push edx
call fcn.004080f0
add esp, 4
cmp eax, ebx
jne 0x408640
lea eax, [esp + 0x10]
push eax
call fcn.00408190
add esp, 4
cmp eax, ebx
je 0x408682
mov edx, dword [0x4174f0]
mov esi, dword [esp + 0x10]
mov ecx, eax
mov ebx, ecx
lea edi, [edx + 0x4164f0]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
add edx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov dword [0x4174f0], edx
push ecx
push 0xffffffffffffffff
mov esi, 1
call dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov ecx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
push ecx
push 0xffffffffffffffff
call dword [esp + 0x2c]
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x7c
ret
Function at 0x4086b0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x34
push ebp
push esi
push edi
call fcn.00408500
call fcn.00408420
call fcn.004083a0
call fcn.004082a0
mov ebp, dword [0x4174f0]
xor esi, esi
test ebp, ebp
mov byte [esp + 0xc], 1
mov byte [esp + 0xd], 2
mov byte [esp + 0xe], 4
mov byte [esp + 0xf], 9
mov byte [esp + 0x10], 0
mov ecx, 0x4164f0
jle 0x40870e
mov eax, esi
mov edi, 5
cdq
idiv edi
mov al, byte [esp + edx + 0xc]
mov dl, byte [ecx]
xor dl, al
mov byte [ecx], dl
inc ecx
inc esi
cmp esi, ebp
jl 0x4086f4
mov ecx, 0xa
xor eax, eax
lea edi, [esp + 0x15]
mov byte [esp + 0x14], 0
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
push 0x8003
push ebp
push 0x4164f0
call fcn.00408760
add esp, 0x10
lea edx, [esp + 0x14]
push edx
push 0x41027c
push 0x4164ec
call sub.MFC42.DLL_CString::Format
add esp, 0xc
mov eax, 1
pop edi
pop esi
pop ebp
add esp, 0x34
ret
Function at 0x408760
Capabilities:
Hash data via wincrypt
Initialize hashing via wincrypt

Disassembly:
sub esp, 0x14
lea eax, [esp + 0xc]
push esi
push 0xf0000000
push 1
push 0
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x408789
call dword [sym.imp.KERNEL32.dll_GetLastError]
pop esi
add esp, 0x14
ret
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
lea ecx, [esp + 0xc]
push ecx
push 0
push 0
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x4087c2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [esp + 0x10]
push 0
push ecx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
add esp, 0x14
ret
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0xc]
push 0
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x408804
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [esp + 0xc]
mov esi, eax
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x10]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
mov eax, esi
pop esi
add esp, 0x14
ret
mov eax, dword [esp + 0xc]
mov esi, dword [sym.imp.ADVAPI32.dll_CryptGetHashParam]
push ebx
push edi
lea ecx, [esp + 0x10]
push 0
lea edx, [esp + 0x20]
push ecx
push edx
push 4
push eax
mov dword [esp + 0x24], 4
call esi
mov ecx, dword [esp + 0x1c]
push ecx
call sub.MFC42.DLL_operatornew
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
add esp, 4
mov edi, eax
lea eax, [esp + 0x10]
mov dword [esp + 0x10], edx
push 0
push eax
push edi
push 2
push ecx
call esi
mov ebx, dword [esp + 0x30]
push 0x4164e8
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [esp + 0x10]
xor esi, esi
test eax, eax
jbe 0x40889d
push ebp
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
xor edx, edx
lea eax, [esp + 0x10]
mov dl, byte [esi + edi]
push edx
push str._02X
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov eax, dword [esp + 0x14]
inc esi
cmp esi, eax
jb 0x408872
pop ebp
push edi
call sub.MFC42.DLL_operatordelete
mov edx, dword [esp + 0x18]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov eax, dword [esp + 0x18]
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
pop edi
pop ebx
xor eax, eax
pop esi
add esp, 0x14
ret
Function at 0x401080
Capabilities:
Accept command line arguments
Initialize winsock library

Disassembly:
sub esp, 0x190
push esi
push edi
mov ecx, 0x63
xor eax, eax
lea edi, [esp + 0xa]
mov word [esp + 8], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [esp + 8]
push eax
push 0x202
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x4010d3
push 0xffffffffffffffff
call fcn.0040a2c0
push eax
push str.WSAStartup_failed:__s
call fcn.0040a1d0
add esp, 8
pop edi
or eax, 0xffffffff
pop esi
add esp, 0x190
ret
call dword [sym.imp.KERNEL32.dll_GetCommandLineA]
push eax
push str.GetCommandLine:__s
call fcn.0040a1d0
mov eax, dword [esp + 0x1a4]
add esp, 8
cmp eax, 4
je 0x40119c
cmp eax, 3
je 0x4011bd
cmp eax, 2
jne 0x40118b
push 0x498
call fcn.004207c2
mov esi, eax
add esp, 4
test esi, esi
je 0x40118b
push esi
call fcn.00401d40
mov ecx, dword [esp + 0x1a0]
mov edx, dword [ecx + 4]
push edx
call fcn.004207b7
mov dword [esi + 8], eax
push str.127.0.0.1
push 0x434108
lea eax, [esi + 0xc]
push 0x80
push eax
call fcn.004206db
add esp, 0x14
lea ecx, [esi + 0x8c]
push 0x400
push ecx
push str.libpub.dll
call fcn.004018b0
push eax
call fcn.0040a370
push esi
call fcn.00401d80
test eax, eax
push esi
jne 0x40117d
call fcn.00401e10
push esi
call fcn.00401fb0
push esi
call fcn.00420672
add esp, 4
call dword [sym.imp.WS2_32.dll_WSACleanup]
pop edi
xor eax, eax
pop esi
add esp, 0x190
ret
mov eax, dword [esp + 0x1a0]
mov edx, dword [eax + 0xc]
mov ecx, dword [eax + 8]
push edx
mov edx, dword [eax + 4]
push ecx
push edx
call fcn.00403910
pop edi
pop esi
add esp, 0x190
ret
mov eax, dword [esp + 0x1a0]
mov ecx, dword [eax + 4]
push ecx
call fcn.004207b7
add esp, 4
test eax, eax
je 0x4011e6
push 0
push 1
call fcn.00402480
pop edi
pop esi
add esp, 0x190
ret
mov edi, dword [sym.imp.KERNEL32.dll_Sleep]
xor esi, esi
push 0
push 0
call fcn.00402480
test eax, eax
je 0x401191
push 0x3e8
call edi
inc esi
cmp esi, 8
jl 0x4011ee
jne 0x4010c7
push 1
push 0
call fcn.00402480
pop edi
pop esi
add esp, 0x190
ret
Function at 0x4013a0
Capabilities:
Connect socket
Get socket status
Set socket configuration

Disassembly:
sub esp, 0x21c
push ebx
mov ebx, dword [esp + 0x224]
push ebp
lea eax, [esp + 8]
push esi
push eax
mov esi, 1
push 0x8004667e
push ebx
mov dword [esp + 0x18], esi
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x4013dc
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x21c
ret 0x10
mov ecx, dword [esp + 0x234]
mov edx, dword [esp + 0x230]
push ecx
xor ebp, ebp
push edx
push ebx
mov dword [esp + 0x1c], ebp
call sub.WS2_32.dll_connect
test eax, eax
je 0x4014fb
mov edx, dword [esp + 0x238]
xor ecx, ecx
cmp edx, 0x7fffffff
ja 0x401413
mov ecx, edx
mov eax, 0x431bde83
push edi
mul edx
shr edx, 0x12
mov dword [esp + 0x1c], edx
mov eax, ecx
xor edx, edx
mov ecx, 0xf4240
div ecx
mov dword [esp + 0x24], esi
mov ecx, 0x41
lea esi, [esp + 0x24]
lea edi, [esp + 0x128]
mov dword [esp + 0x28], ebx
lea eax, [esp + 0x128]
rep movsd dword es:[edi], dword [esi]
lea ecx, [esp + 0x24]
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
push ebp
push eax
lea edx, [ebx + 1]
push ecx
push edx
call sub.WS2_32.dll_select
test eax, eax
pop edi
jne 0x401491
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ebp
push eax
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
pop esi
pop ebp
mov eax, 0xfffffffe
pop ebx
add esp, 0x21c
ret 0x10
lea ecx, [esp + 0x20]
push ecx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
jne 0x4014b2
lea edx, [esp + 0x124]
push edx
push ebx
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
je 0x4014fb
lea eax, [esp + 0x14]
lea ecx, [esp + 0x10]
push eax
push ecx
push 0x1007
push 0xffff
push ebx
mov dword [esp + 0x28], 4
call sub.WS2_32.dll_getsockopt
test eax, eax
jge 0x4014fb
lea edx, [esp + 0xc]
mov dword [esp + 0xc], ebp
push edx
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x21c
ret 0x10
lea eax, [esp + 0xc]
mov dword [esp + 0xc], ebp
push eax
push 0x8004667e
push ebx
call sub.WS2_32.dll_ioctlsocket
cmp eax, 0xffffffff
jne 0x401522
pop esi
pop ebp
or eax, eax
pop ebx
add esp, 0x21c
ret 0x10
mov eax, dword [esp + 0x10]
cmp eax, ebp
je 0x40153e
pop esi
mov dword [0x43bde4], eax
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x21c
ret 0x10
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x21c
ret 0x10
Function at 0x401840
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebx
push ebp
mov ebp, dword [esp + 0x18]
push esi
mov esi, dword [esp + 0x18]
push edi
mov edi, dword [esp + 0x18]
test ebp, ebp
je 0x40189f
mov ebx, dword [esp + 0x14]
cmp dword [ebp], 0
je 0x40189f
test esi, esi
jle 0x40189f
push 0
push esi
push edi
push ebx
call sub.WS2_32.dll_recv
test eax, eax
jle 0x401876
add edi, eax
sub esi, eax
jmp 0x401858
je 0x401895
call sub.WS2_32.dll_WSAGetLastError
cmp eax, 0x2733
je 0x40188b
cmp eax, 0x2714
jne 0x401895
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x401858
pop edi
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
ret 0x10
mov eax, dword [esp + 0x1c]
pop edi
sub eax, esi
pop esi
pop ebp
pop ebx
ret 0x10

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

Disassembly:
sub esp, 0x800
push ebx
push ebp
push esi
push edi
mov ecx, 0x1ff
xor eax, eax
lea edi, [esp + 0x11]
mov byte [esp + 0x10], 0
rep stosd dword es:[edi], eax
mov ebp, dword [esp + 0x814]
stosw word es:[edi], ax
test ebp, ebp
stosb byte es:[edi], al
je 0x401d33
mov esi, dword [esp + 0x820]
test esi, esi
je 0x401d33
mov eax, dword [ebp + 4]
test eax, eax
je 0x401d33
mov eax, dword [esp + 0x818]
lea edi, [esp + 0x18]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x81c]
mov ecx, eax
mov dword [esp + 0x14], eax
mov edx, ecx
mov ebx, dword [sym.imp.WS2_32.dll_send]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea esi, [eax + 8]
lea edi, [esp + 0x10]
test esi, esi
jle 0x401d33
mov eax, dword [ebp]
push 0
push esi
push edi
push eax
call ebx
test eax, eax
jle 0x401cd7
sub esi, eax
add edi, eax
jmp 0x401ced
je 0x401d01
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x401ced
cmp eax, 0x2714
jne 0x401d14
mov eax, dword [ebp + 4]
test eax, eax
jne 0x401cbf
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret 0x10
push 0xffffffffffffffff
call fcn.0040a2c0
mov ecx, dword [ebp]
push eax
push ecx
push str.Session:__d_Broken:__s
jmp 0x401d24
push eax
call fcn.0040a2c0
mov edx, dword [ebp]
push eax
push edx
push str.Session:__d_Down:__s
call fcn.0040a1d0
add esp, 0xc
mov dword [ebp + 4], 0
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x800
ret 0x10

Function at 0x402100
Capabilities:
Print debug messages

Disassembly:
sub esp, 0x410
lea eax, [esp]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTime]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0xe]
push eax
mov eax, dword [esp + 0x10]
and ecx, 0xffff
and eax, 0xffff
and edx, 0xffff
push ecx
add eax, 8
push edx
push eax
push str._n__02d:_02d:_02d__05ld__0x_08x_web_client__t
lea ecx, [esp + 0x28]
push 0x400
push ecx
call fcn.004206db
mov ecx, dword [esp + 0x434]
lea edx, [esp + 0x438]
push edx
mov edx, 0x400
sub edx, eax
push ecx
lea eax, [esp + eax + 0x38]
push edx
push eax
call fcn.00420b7f
add esp, 0x30
lea ecx, [esp + 0x11]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
add esp, 0x410
ret