Function at 0x40c260
Capabilities:
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4518bb
mov eax, dword fs:[0]
push eax
sub esp, 0xb0
mov eax, dword [0x46b008]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, dword [ebp + 8]
xor eax, eax
mov byte [ebp - 0xad], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x30], 7
mov word [ebp - 0x44], ax
mov dword [ebp - 4], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], 7
mov word [ebp - 0x5c], ax
lea eax, [edi + 0x10]
mov byte [ebp - 4], 1
cmp dword [edi + 0x14], 8
mov dword [ebp - 0xb4], eax
mov dword [eax], 0
mov eax, edi
jb 0x40c2da
mov eax, dword [edi]
xor ecx, ecx
mov dword [ebp - 0x18], 7
mov word [eax], cx
xor eax, eax
push 0x10
mov dword [ebp - 0x1c], ecx
lea ecx, [ebp - 0x2c]
push 0x4632b4
mov word [ebp - 0x2c], ax
call fcn.004013e0
lea edx, [ebp - 0x5c]
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x2c]
call fcn.0041a540
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40c34b
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c341
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c74e
push edx
push ecx
call fcn.0041b677
add esp, 8
mov esi, dword [0x46b8a8]
mov ebx, dword [esi]
test ebx, ebx
je 0x40c582
cmp ebx, 0x3ffffc
ja 0x40c582
cmp ebx, 2
jb 0x40c3ae
mov al, bl
lea edx, [esi + ebx]
add al, al
mov cl, bl
add cl, al
mov al, 3
sub al, cl
add byte [edx + 3], al
lea edx, [ebx - 2]
test edx, edx
je 0x40c3a8
jmp 0x40c390
movzx eax, dl
lea ecx, [edx + esi]
imul eax, eax, 0xfd
sub al, byte [edx + esi + 5]
add byte [ecx + 4], al
sub edx, 1
jne 0x40c390
mov al, byte [esi + 5]
sub byte [esi + 4], al
lea eax, [ebp - 0x44]
mov dl, 1
push eax
mov ecx, 1
call fcn.0041b1a0
add esp, 4
test al, al
jne 0x40c428
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x2c]
push str.GetServicePath_failed_with__i.
push eax
call fcn.004123e0
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403310
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40c590
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c419
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c753
push edx
push ecx
call fcn.0041b677
add esp, 8
jmp 0x40c590
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
jb 0x40c434
mov eax, dword [ebp - 0x44]
push 0x80
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
cmp dword [ebp - 0x30], 8
lea eax, [ebp - 0x44]
jb 0x40c44c
mov eax, dword [ebp - 0x44]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov dword [ebp - 0xb8], ecx
cmp ecx, 0xffffffff
jne 0x40c4cf
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 0x2c]
push str.CreateFile_failed_with__i.
push eax
call fcn.004123e0
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403310
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40c590
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c419
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c758
jmp 0x40c419
push 0
lea eax, [ebp - 0xbc]
push eax
mov eax, dword [0x46b8a8]
push ebx
add eax, 4
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0xb8]
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test esi, esi
jne 0x40c556
push ebx
lea eax, [ebp - 0x2c]
push str.WriteFile_failed_with__i.
push eax
call fcn.004123e0
add esp, 0xc
mov ecx, edi
push eax
call fcn.00403310
mov edx, dword [ebp - 0x18]
cmp edx, 8
jb 0x40c590
mov ecx, dword [ebp - 0x2c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c419
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c75d
jmp 0x40c419
push edi
lea eax, [ebp - 0x44]
push eax
call fcn.0040c780
test al, al
je 0x40c590
push edi
lea eax, [ebp - 0x44]
push eax
call fcn.0040ca00
test eax, eax
mov dword [0x46b8bc], eax
setne bl
test bl, bl
jne 0x40c6ac
jmp 0x40c596
push 0x14
push str.Invalid_binary_size.
mov ecx, edi
call fcn.004013e0
mov bl, byte [ebp - 0xad]
lea ecx, [ebp - 0xac]
call fcn.0040cd50
mov ecx, eax
mov byte [ebp - 4], 3
cmp dword [edi + 0x14], 8
jb 0x40c5af
mov edi, dword [edi]
mov eax, dword [ebp - 0xb4]
mov eax, dword [eax]
lea eax, [edi + eax*2]
push eax
push edi
lea eax, [ebp - 0x2c]
push eax
call fcn.0040d5a0
lea ecx, [ebp - 0xac]
mov byte [ebp - 4], 5
call fcn.0040cc60
mov ecx, dword [ebp - 0x1c]
cmp ecx, 0x200
jb 0x40c655
cmp ecx, 0x1ff
jb 0x40c603
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
mov dword [ebp - 0x1c], 0x1ff
jb 0x40c5fa
mov eax, dword [ebp - 0x2c]
mov byte [eax + 0x1ff], 0
jmp 0x40c655
mov edx, dword [ebp - 0x18]
mov edi, 0x1ff
mov eax, edx
sub edi, ecx
sub eax, ecx
cmp edi, eax
ja 0x40c63c
mov dword [ebp - 0x1c], 0x1ff
lea eax, [ebp - 0x2c]
cmp edx, 0x10
jb 0x40c627
mov eax, dword [ebp - 0x2c]
push edi
lea esi, [eax + ecx]
push 0
push esi
call fcn.004336d0
add esp, 0xc
mov byte [esi + edi], 0
jmp 0x40c655
push 0
push edi
mov byte [ebp - 0xb4], 0
lea ecx, [ebp - 0x2c]
push dword [ebp - 0xb4]
push edi
call fcn.0040d980
cmp dword [ebp - 0x18], 0x10
lea eax, [ebp - 0x2c]
jb 0x40c661
mov eax, dword [ebp - 0x2c]
push eax
mov eax, dword [0x46b8a8]
add eax, 4
push 0x200
push eax
call fcn.0043945c
mov edx, dword [ebp - 0x18]
add esp, 0xc
cmp edx, 0x10
jb 0x40c6ac
mov ecx, dword [ebp - 0x2c]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x40c6a2
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c762
push edx
push ecx
call fcn.0041b677
add esp, 8
mov eax, dword [0x46b8a8]
movzx ecx, bl
mov dword [eax], ecx
push dword [0x46b8b4]
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [ebp - 0x48]
cmp edx, 8
jb 0x40c6f8
mov ecx, dword [ebp - 0x5c]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c6ee
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c767
push edx
push ecx
call fcn.0041b677
add esp, 8
mov edx, dword [ebp - 0x30]
cmp edx, 8
jb 0x40c72e
mov ecx, dword [ebp - 0x44]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40c724
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40c76c
push edx
push ecx
call fcn.0041b677
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0041b636
mov esp, ebp
pop ebp
ret 4
call fcn.00436a99
call fcn.00436a99
call fcn.00436a99
call fcn.00436a99
call fcn.00436a99
call fcn.00436a99
call fcn.00436a99
int3