Function at 0x40c900
Capabilities:
Resolve function by parsing pe exports
Set file attributes

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x40c4
call fcn.0049d400
mov eax, dword [0x4f52c0]
xor eax, esp
mov dword [esp + 0x40c0], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
xor esi, esi
push esi
push 0x80
push 3
push esi
push 1
mov dword [esp + 0x38], eax
mov eax, dword [ebp + 0xc]
push SysReAllocStringLen
push eax
xor ebx, ebx
mov dword [esp + 0x54], esi
mov dword [esp + 0x48], 0x40c5d0
mov dword [esp + 0x4c], 0x40c5f0
mov dword [esp + 0x58], 0x40c5d0
mov dword [esp + 0x5c], 0x40c5f0
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x4c], eax
cmp eax, 0xffffffff
jne 0x40c981
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, esi
jne 0x40cd25
lea ecx, [esp + 0x44]
mov dword [esp + 0x44], 0x407ca0
mov dword [esp + 0x48], 0x407cd0
mov dword [esp + 0xa8], 0x40a430
mov dword [esp + 0xac], 0x40a490
mov dword [esp + 0xb0], 0x40a4a0
mov dword [esp + 0xb4], 0x40a500
mov dword [esp + 0xb8], ecx
mov dword [esp + 0xc0], esi
mov dword [esp + 0xbc], esi
call fcn.00406e70
lea edx, [esp + 0xa8]
push edx
lea eax, [esp + 0x5c]
push eax
lea edx, [esp + 0x44]
lea ecx, [esp + 0x34]
mov dword [esp + 0x60], esi
mov dword [esp + 0x64], esi
mov dword [esp + 0x68], esi
mov dword [esp + 0x6c], esi
mov dword [esp + 0x70], esi
mov dword [esp + 0x74], esi
mov dword [esp + 0x78], esi
mov dword [esp + 0x7c], esi
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], esi
mov dword [esp + 0x98], esi
mov dword [esp + 0x9c], esi
mov dword [esp + 0xa0], esi
mov dword [esp + 0xa4], esi
mov dword [esp + 0xa8], esi
call fcn.00409dc0
add esp, 8
mov dword [esp + 0x18], eax
cmp eax, esi
je 0x40ca62
lea edi, [esp + 0x2c]
lea eax, [esp + 0x58]
call fcn.00407ec0
mov eax, dword [esp + 0x18]
mov dword [esp + 0xc], eax
cmp eax, esi
jne 0x40ccaf
xor eax, eax
mov dword [esp + 0x50], 0xffffffff
mov dword [esp + 0x20], esi
mov dword [esp + 0x54], esi
mov dword [esp + 0x14], eax
cmp dword [esp + 0x74], esi
jbe 0x40cc9e
mov edi, edi
mov edi, dword [esp + 0x98]
mov dword [esp + 0x34], esi
mov dword [esp + 0x1c], esi
mov esi, dword [edi + eax*4 + 4]
sub esi, dword [edi + eax*4]
mov edx, eax
shl edx, 5
add edx, dword [esp + 0x68]
mov dword [esp + 0x10], edx
cmp esi, dword [esp + 0x38]
jbe 0x40cae9
push ebx
call fcn.0049926a
add esp, 4
mov dword [esp + 0x38], esi
add esi, esi
je 0x40cc88
push esi
call fcn.004990eb
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40cc8a
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
mov esi, dword [edi + eax*4]
mov ecx, dword [edi + eax*4 + 4]
sub ecx, esi
test ebx, ebx
je 0x40cb25
mov edi, dword [esp + 0x9c]
lea esi, [edi + esi*2]
test ecx, ecx
je 0x40cb25
mov edx, esi
mov eax, ebx
sub edx, ebx
lea ebx, [ebx]
mov si, word [edx + eax]
mov word [eax], si
add eax, 2
dec ecx
jne 0x40cb10
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x19], 0
je 0x40cb3a
push 0x4c8cec
call fcn.0049b62f
add esp, 4
jmp 0x40cb7e
lea ecx, [esp + 0x3c]
push ecx
lea edx, [esp + 0x30]
push edx
lea ecx, [esp + 0x24]
push ecx
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x64]
push ecx
lea edx, [esp + 0x34]
push edx
lea ecx, [esp + 0x68]
push ecx
push eax
lea edx, [esp + 0xc8]
push edx
lea eax, [esp + 0x7c]
call fcn.0040a190
add esp, 0x24
mov dword [esp + 0xc], eax
test eax, eax
jne 0x40cc9c
xor edi, edi
cmp word [ebx], di
je 0x40cbb2
mov esi, ebx
cmp word [esi], 0x2f
jne 0x40cba7
mov ecx, dword [esp + 0x24]
xor eax, eax
push ebx
mov word [esi], ax
call fcn.0040c6c0
mov ecx, 0x5c
add esp, 4
mov word [esi], cx
inc edi
cmp word [ebx + edi*2], 0
lea esi, [ebx + edi*2]
jne 0x40cb87
mov edx, dword [esp + 0x10]
cmp byte [edx + 0x19], 0
mov ecx, dword [esp + 0x24]
je 0x40cbce
push ebx
call fcn.0040c6c0
add esp, 4
jmp 0x40cc5b
lea eax, [esp + 0x28]
push eax
mov edx, ebx
call fcn.0040c7e0
add esp, 4
test eax, eax
je 0x40cbeb
mov dword [esp + 0xc], 0xb
jmp 0x40cc68
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0x34]
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x28]
push ecx
lea edi, [esp + 0x1c]
call fcn.00407b90
add esp, 4
test eax, eax
jne 0x40cc94
mov edx, dword [esp + 0x1c]
cmp dword [esp + 0x18], edx
jne 0x40cc94
mov edi, dword [esp + 0x10]
mov esi, dword [esp + 0x28]
push edi
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, 0xffffffff
je 0x40cc4a
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40cc7e
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40cc94
cmp byte [edi + 0x1d], 0
je 0x40cc5b
mov eax, dword [edi + 0x14]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x4c8cf0
call fcn.0049b62f
add esp, 4
mov eax, dword [esp + 0x14]
inc eax
xor esi, esi
mov dword [esp + 0x14], eax
cmp eax, dword [esp + 0x74]
jae 0x40cc9e
jmp 0x40ca90
mov dword [esp + 0x28], 0xffffffff
jmp 0x40cc4a
xor ebx, ebx
mov dword [esp + 0xc], 2
jmp 0x40cc9c
mov dword [esp + 0xc], 0xb
xor esi, esi
mov ecx, dword [esp + 0x20]
push ecx
lea edx, [esp + 0x30]
push edx
call dword [esp + 0x38]
add esp, 8
lea edi, [esp + 0x2c]
lea eax, [esp + 0x58]
call fcn.00407ec0
push ebx
call fcn.0049926a
mov eax, dword [esp + 0x50]
add esp, 4
cmp eax, 0xffffffff
je 0x40cce9
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x40cce1
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x40cce9
mov dword [esp + 0x4c], 0xffffffff
mov eax, dword [esp + 0xc]
cmp eax, esi
jne 0x40cd08
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40c0]
xor ecx, esp
call fcn.0049908b
mov esp, ebp
pop ebp
ret
cmp eax, 4
je 0x40cd25
cmp eax, 2
je 0x40cd25
cmp eax, 3
je 0x40cd25
push eax
push 0x4c8cf4
call fcn.0049b62f
add esp, 8
mov ecx, dword [esp + 0x40cc]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.0049908b
mov esp, ebp
pop ebp
ret