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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x40c4
call fcn.0043aa10
mov eax, dword [0x4611f4]
xor eax, esp
mov dword [esp + 0x40c0], eax
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocStringLen
push edx
mov dword [esp + 0x40], ecx
mov dword [esp + 0x70], edi
mov dword [esp + 0x4c], ebx
mov dword [esp + 0x28], 0x402930
mov dword [esp + 0x2c], 0x402950
mov dword [esp + 0x54], 0x402930
mov dword [esp + 0x58], 0x402950
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esp + 0x4c], eax
cmp eax, 0xffffffff
jne 0x408720
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x408b14
lea eax, [esp + 0x44]
mov dword [esp + 0x44], 0x4038d0
mov dword [esp + 0x48], 0x4038f0
mov dword [esp + 0xa8], 0x4060a0
mov dword [esp + 0xac], 0x406100
mov dword [esp + 0xb0], 0x406110
mov dword [esp + 0xb4], 0x406160
mov dword [esp + 0xb8], eax
mov dword [esp + 0xc0], ebx
mov dword [esp + 0xbc], ebx
call fcn.004029f0
lea ecx, [esp + 0x58]
call fcn.00403b80
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x10]
push eax
lea edx, [esp + 0xb0]
call fcn.00405a60
mov esi, eax
add esp, 8
mov dword [esp + 0x1c], esi
test esi, esi
je 0x4087bb
lea edx, [esp + 0xc]
lea ecx, [esp + 0x58]
call fcn.00403bf0
test esi, esi
jne 0x4089d5
xor edx, edx
mov dword [esp + 0x40], 0xffffffff
mov dword [esp + 0x28], ebx
mov dword [esp + 0x50], ebx
mov dword [esp + 0x14], edx
cmp dword [esp + 0x74], edx
jbe 0x4089c5
jmp 0x4087e0
mov eax, edx
shl eax, 5
add eax, dword [esp + 0x68]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x34], eax
test edi, edi
je 0x408818
mov eax, dword [edi]
test eax, eax
je 0x408818
lea ecx, [esp + 0x14]
push ecx
push dword [edi + 4]
call eax
mov edx, dword [esp + 0x1c]
add esp, 8
mov eax, dword [esp + 0x98]
mov esi, dword [eax + edx*4 + 4]
sub esi, dword [eax + edx*4]
cmp esi, dword [esp + 0x30]
jbe 0x408858
push ebx
call fcn.004327d2
add esp, 4
mov dword [esp + 0x30], esi
add esi, esi
je 0x408ac8
push esi
call fcn.0043280a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x408aca
mov edx, dword [esp + 0x14]
mov ecx, dword [esp + 0x98]
mov edi, dword [ecx + edx*4]
mov esi, dword [ecx + edx*4 + 4]
sub esi, edi
test ebx, ebx
je 0x408891
mov eax, dword [esp + 0x9c]
lea edi, [eax + edi*2]
test esi, esi
je 0x408891
mov ecx, ebx
sub edi, ebx
mov edi, edi
mov ax, word [edi + ecx]
mov word [ecx], ax
lea ecx, [ecx + 2]
dec esi
jne 0x408880
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x34]
cmp byte [eax + 0x19], 0
je 0x4088aa
push 0x4548a4
call fcn.004328b1
add esp, 4
jmp 0x4088ef
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
lea eax, [esp + 0x38]
push eax
lea eax, [esp + 0x60]
push eax
lea eax, [esp + 0x3c]
push eax
lea eax, [esp + 0x58]
push eax
push edx
lea edx, [esp + 0xc8]
lea ecx, [esp + 0x78]
call fcn.00405de0
mov esi, eax
add esp, 0x20
mov dword [esp + 0x1c], esi
test esi, esi
jne 0x4089c5
xor edi, edi
cmp word [ebx], di
je 0x408921
mov esi, ebx
cmp word [esi], 0x2f
jne 0x408916
mov ecx, dword [esp + 0x24]
xor eax, eax
mov edx, ebx
mov word [esi], ax
call fcn.00408480
mov eax, 0x5c
mov word [esi], ax
inc edi
cmp word [ebx + edi*2], 0
lea esi, [ebx + edi*2]
jne 0x4088f8
mov edi, dword [esp + 0x34]
cmp byte [edi + 0x19], 0
je 0x40893b
mov ecx, dword [esp + 0x24]
mov edx, ebx
call fcn.00408480
jmp 0x408a9b
mov edx, dword [esp + 0x24]
push ebx
lea ecx, [esp + 0x24]
call fcn.00408590
add esp, 4
test eax, eax
je 0x40895e
mov esi, 0xb
mov dword [esp + 0x1c], esi
jmp 0x408aac
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x2c]
mov esi, dword [esp + 0x18]
lea eax, [esp + 0x18]
lea edx, [edx + ecx]
push eax
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], esi
call fcn.004037c0
add esp, 4
test eax, eax
jne 0x4089c0
cmp dword [esp + 0x18], esi
jne 0x4089c0
mov esi, dword [esp + 0x20]
push edi
push edi
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
cmp esi, 0xffffffff
je 0x408a8b
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x408a83
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
je 0x408a8b
mov esi, 0xb
push dword [esp + 0x28]
lea eax, [esp + 0x10]
push eax
call dword [esp + 0x18]
add esp, 8
push dword [esp + 0x88]
lea eax, [esp + 0x10]
push eax
call dword [esp + 0x18]
push dword [esp + 0x94]
lea eax, [esp + 0x18]
push eax
call dword [esp + 0x20]
push dword [esp + 0xa0]
lea eax, [esp + 0x20]
push eax
call dword [esp + 0x28]
push dword [esp + 0xac]
lea eax, [esp + 0x28]
push eax
call dword [esp + 0x30]
push dword [esp + 0xb8]
lea eax, [esp + 0x30]
push eax
call dword [esp + 0x38]
push dword [esp + 0xc4]
lea eax, [esp + 0x38]
push eax
call dword [esp + 0x40]
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x88]
mov dword [esp + 0xcc], 0
mov dword [esp + 0xd0], 0
call fcn.00403ad0
push ebx
call fcn.004327d2
mov eax, dword [esp + 0x80]
add esp, 0x34
cmp eax, 0xffffffff
je 0x408adc
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test eax, eax
jne 0x408ad4
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x408adc
mov dword [esp + 0x20], 0xffffffff
cmp byte [edi + 0x1d], 0
je 0x408a9b
push dword [edi + 0x14]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFileAttributesW]
push 0x4548a8
call fcn.004328b1
mov esi, dword [esp + 0x20]
add esp, 4
mov edx, dword [esp + 0x14]
inc edx
mov dword [esp + 0x14], edx
cmp edx, dword [esp + 0x74]
jae 0x4089c5
mov edi, dword [esp + 0x54]
jmp 0x4087e0
xor ebx, ebx
mov esi, 2
jmp 0x4089c5
mov dword [esp + 0x4c], 0xffffffff
test esi, esi
jne 0x408af7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x40c0]
xor ecx, esp
call fcn.00431c68
mov esp, ebp
pop ebp
ret
cmp esi, 4
je 0x408b14
cmp esi, 2
je 0x408b14
cmp esi, 3
je 0x408b14
push esi
push str._nERROR__d_n
call fcn.004328b1
add esp, 8
mov ecx, dword [esp + 0x40cc]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00431c68
mov esp, ebp
pop ebp
ret