Function at 0x40e9ec
Capabilities:
Create directory
Set registry value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff58
push ebx
push esi
push edi
mov edi, 0x510fd8
mov esi, dword [ebp + 8]
lea eax, [ebp - 8]
lea edx, [edi + 0x2ca]
push eax
push edx
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40ea1e
jmp 0x40f093
mov cl, byte [esi]
lea eax, [ebp - 0xc]
and ecx, 1
lea edx, [edi + 0x2ea]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
lea edx, [ebp - 8]
lea ecx, [edi + 0x2f2]
push edx
push ecx
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40ea67
jmp 0x40f093
xor eax, eax
lea edx, [ebp - 0xc]
mov al, byte [esi + 0x8f]
lea ecx, [edi + 0x305]
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
lea ecx, [ebp - 8]
lea eax, [edi + 0x30e]
push ecx
push eax
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40eab3
jmp 0x40f093
xor edx, edx
lea ecx, [ebp - 0xc]
mov dl, byte [esi + 0x90]
lea eax, [edi + 0x32d]
mov dword [ebp - 0xc], edx
push 4
push ecx
push 4
push 0
push eax
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegSetValueExA
xor ecx, ecx
lea eax, [ebp - 0xc]
mov cl, byte [esi + 0x91]
lea edx, [edi + 0x33c]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
push 4
lea eax, [esi + 0x92]
push eax
push 4
push 0
lea edx, [edi + 0x34b]
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
lea edx, [ebp - 8]
lea ecx, [edi + 0x361]
push edx
push ecx
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40eb41
jmp 0x40f093
xor eax, eax
lea edx, [ebp - 0xc]
mov al, byte [esi + 0x8d]
lea ecx, [edi + 0x387]
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
xor edx, edx
lea ecx, [ebp - 0xc]
mov dl, byte [esi + 0x8e]
lea eax, [edi + 0x38d]
mov dword [ebp - 0xc], edx
push 4
push ecx
push 4
push 0
push eax
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegSetValueExA
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegCloseKey
lea eax, [ebp - 8]
lea edx, [edi + 0x394]
push eax
push edx
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40ebb2
jmp 0x40f093
xor ecx, ecx
lea eax, [ebp - 0xc]
mov cl, byte [esi + 0x96]
lea edx, [edi + 0x3bb]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov al, byte [esi]
lea edx, [ebp - 0xc]
shr eax, 4
lea ecx, [edi + 0x3c1]
and eax, 1
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
lea ecx, [ebp - 8]
lea eax, [edi + 0x3c9]
push ecx
push eax
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
je 0x40ec23
jmp 0x40f093
lea edx, [esi + 0x4a]
push edx
call fcn.004e0ef8
pop ecx
inc eax
push eax
lea ecx, [esi + 0x4a]
push ecx
push 1
push 0
lea eax, [edi + 0x3ea]
push eax
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegSetValueExA
lea ecx, [esi + 0x6b]
push ecx
call fcn.004e0ef8
pop ecx
inc eax
push eax
lea eax, [esi + 0x6b]
push eax
push 1
push 0
lea edx, [edi + 0x3fd]
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
push 4
lea eax, [esi + 4]
push eax
push 4
push 0
lea edx, [edi + 0x40f]
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegCloseKey
push 0x400
call fcn.004e0050
pop ecx
mov ebx, eax
test ebx, ebx
je 0x40edb2
push 0x51fbb8
lea eax, [edi + 0x419]
push eax
push ebx
call fcn.004e3fec
add esp, 0xc
push ebx
lea edx, [esi + 0x4a]
push edx
lea ecx, [edi + 0x433]
push ecx
lea ecx, [edi + 0x42f]
push ecx
call sub.KERNEL32.DLL_WritePrivateProfileStringA
push ebx
lea eax, [esi + 0x6b]
push eax
lea edx, [edi + 0x44a]
push edx
lea ecx, [edi + 0x446]
push ecx
call sub.KERNEL32.DLL_WritePrivateProfileStringA
push 0xa
lea eax, [ebp - 0xa8]
push eax
xor edx, edx
mov dl, byte [esi + 0x8d]
push edx
call fcn.004e80b0
add esp, 0xc
lea ecx, [edi + 0x460]
lea eax, [edi + 0x45c]
push ebx
push 0
push ecx
push eax
call sub.KERNEL32.DLL_WritePrivateProfileStringA
push ebx
push 0
lea edx, [edi + 0x46f]
push edx
lea ecx, [edi + 0x46b]
push ecx
call sub.KERNEL32.DLL_WritePrivateProfileStringA
mov al, byte [esi + 0x8e]
dec al
je 0x40ed3e
dec al
je 0x40ed5b
jmp 0x40ed76
push ebx
lea edx, [ebp - 0xa8]
push edx
lea ecx, [edi + 0x480]
push ecx
lea eax, [edi + 0x47c]
push eax
call sub.KERNEL32.DLL_WritePrivateProfileStringA
jmp 0x40ed76
push ebx
lea edx, [ebp - 0xa8]
push edx
lea ecx, [edi + 0x48f]
push ecx
lea eax, [edi + 0x48b]
push eax
call sub.KERNEL32.DLL_WritePrivateProfileStringA
push 0xa
lea edx, [ebp - 0xa8]
push edx
mov cl, byte [esi]
shr ecx, 4
and ecx, 1
push ecx
call fcn.004e80b0
add esp, 0xc
lea eax, [ebp - 0xa8]
lea edx, [edi + 0x4a0]
lea ecx, [edi + 0x49c]
push ebx
push eax
push edx
push ecx
call sub.KERNEL32.DLL_WritePrivateProfileStringA
push ebx
call fcn.004e0060
pop ecx
xor eax, eax
mov al, byte [esi + 0x8f]
dec eax
jne 0x40eedd
push 0
lea edx, [edi + 0x4b5]
push edx
call sub.KERNEL32.DLL_CreateDirectoryA
lea eax, [edi + 0x4ce]
push eax
lea edx, [edi + 0x4bb]
push edx
call fcn.004e3160
add esp, 8
mov ebx, eax
test ebx, ebx
je 0x40eedd
lea eax, [edi + 0x4d0]
push eax
push ebx
call fcn.004e3178
add esp, 8
lea edx, [edi + 0x4db]
push edx
push ebx
call fcn.004e3178
add esp, 8
test byte [esi], 0x10
je 0x40ee24
lea ecx, [edi + 0x4ef]
push ecx
push ebx
call fcn.004e3178
add esp, 8
xor ecx, ecx
lea eax, [edi + 0x4f3]
mov cl, byte [esi + 0x90]
push ecx
push eax
push ebx
call fcn.004e3178
add esp, 0xc
xor edx, edx
mov dl, byte [esi + 0x91]
lea ecx, [edi + 0x4f9]
push edx
push ecx
push ebx
call fcn.004e3178
add esp, 0xc
mov eax, dword [esi + 0x92]
push eax
lea edx, [edi + 0x4ff]
push edx
push ebx
call fcn.004e3178
add esp, 0xc
test byte [esi], 0x20
je 0x40ee82
lea ecx, [edi + 0x506]
push ecx
push ebx
call fcn.004e3178
add esp, 8
lea eax, [edi + 0x50a]
push eax
push ebx
call fcn.004e3178
add esp, 8
mov dl, byte [esi + 0x8e]
dec dl
je 0x40eea2
dec dl
je 0x40eebd
jmp 0x40eed6
xor ecx, ecx
lea eax, [edi + 0x50c]
mov cl, byte [esi + 0x8d]
push ecx
push eax
push ebx
call fcn.004e3178
add esp, 0xc
jmp 0x40eed6
xor edx, edx
lea ecx, [edi + 0x51f]
mov dl, byte [esi + 0x8d]
push edx
push ecx
push ebx
call fcn.004e3178
add esp, 0xc
push ebx
call fcn.004e2d2c
pop ecx
xor eax, eax
lea ebx, [esi + 0xb5]
mov dword [ebp - 4], eax
jmp 0x40f082
push esi
push edi
lea esi, [edi + 0x532]
lea edi, [ebp - 0x94]
mov eax, edi
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
movsb byte es:[edi], byte [esi]
pop edi
pop esi
lea edx, [ebp - 0x94]
push edx
call fcn.004e0ef8
pop ecx
xor edx, edx
lea ecx, [ebp - 0x94]
add eax, ecx
mov dword [ebp - 0x10], eax
xor eax, eax
mov ecx, dword [ebx]
mov dword [ebp - 0x14], ecx
xor ecx, ecx
mov al, byte [ebp - 0x11]
push eax
xor eax, eax
mov dl, byte [ebp - 0x12]
push edx
lea edx, [edi + 0x553]
mov cl, byte [ebp - 0x13]
push ecx
mov al, byte [ebp - 0x14]
push eax
push edx
mov ecx, dword [ebp - 0x10]
push ecx
call fcn.004e3fec
add esp, 0x18
lea eax, [ebp - 8]
push eax
lea edx, [ebp - 0x94]
push edx
push reloc.WS2_32.DLL_bind
call sub.ADVAPI32.DLL_RegCreateKeyA
test eax, eax
jne 0x40f07c
mov cl, byte [ebx - 4]
lea eax, [ebp - 0xc]
and ecx, 1
lea edx, [edi + 0x55f]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
xor eax, eax
lea edx, [ebp - 0xc]
mov al, byte [ebx + 0x18]
lea ecx, [edi + 0x56c]
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
xor edx, edx
lea ecx, [ebp - 0xc]
mov dl, byte [ebx + 0x19]
lea eax, [edi + 0x579]
mov dword [ebp - 0xc], edx
push 4
push ecx
push 4
push 0
push eax
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegSetValueExA
mov ecx, dword [ebx + 4]
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
lea edx, [edi + 0x587]
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov eax, dword [ebx + 8]
lea edx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
lea ecx, [edi + 0x58f]
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebx + 0xc]
lea ecx, [ebp - 0xc]
mov dword [ebp - 0xc], edx
push 4
push ecx
push 4
lea eax, [edi + 0x59c]
push 0
push eax
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegSetValueExA
mov ecx, dword [ebx + 0x10]
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], ecx
push 4
push eax
push 4
lea edx, [edi + 0x5a9]
push 0
push edx
mov ecx, dword [ebp - 8]
push ecx
call sub.ADVAPI32.DLL_RegSetValueExA
mov eax, dword [ebx + 0x14]
lea edx, [ebp - 0xc]
mov dword [ebp - 0xc], eax
push 4
push edx
push 4
lea ecx, [edi + 0x5b7]
push 0
push ecx
mov eax, dword [ebp - 8]
push eax
call sub.ADVAPI32.DLL_RegSetValueExA
mov edx, dword [ebp - 8]
push edx
call sub.ADVAPI32.DLL_RegCloseKey
inc dword [ebp - 4]
add ebx, 0x1e
xor ecx, ecx
mov cl, byte [esi + 0xb0]
cmp ecx, dword [ebp - 4]
jg 0x40eeed
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret