Function at 0x4051c0
Capabilities:
Get file attributes
Set file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42d0b3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x2ac
push ebx
push esi
push edi
mov esi, ecx
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x30], esi
call fcn.0042a7bc
mov eax, dword [eax + 4]
lea ecx, [ebp - 0x1b4]
push 0x104
push ecx
mov edx, dword [eax + 0x68]
push edx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x405221
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
push 0
lea eax, [ebp - 0x1b4]
push 1
push eax
mov ecx, 0x4623d0
mov dword [ebp - 4], 0
call fcn.004074f0
xor eax, eax
jmp 0x4052a7
test eax, eax
mov dword [ebp - 4], 0xffffffff
je 0x4052fb
call fcn.0042a7bc
mov eax, dword [eax + 4]
mov ecx, dword [eax + 0x164]
push ecx
push 0xa
call fcn.00404290
add esp, 8
push 0
push 0x10
push str.Open_failed
call fcn.004288b2
push 1
mov ecx, 0x4623d0
call fcn.00407b00
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0xc
mov ecx, 0x4623d0
call fcn.00407660
mov ebx, eax
push 5
push 0x3f3
mov ecx, esi
mov dword [ebp - 0x2c], ebx
call fcn.00425ea2
mov ecx, eax
call fcn.00426008
push 5
lea ecx, [esi + 0x64]
call fcn.00426008
mov eax, dword [esi + 0x80]
mov edx, ebx
mov edi, dword [sym.imp.USER32.dll_SendMessageA]
and edx, 0xffff
shl edx, 0x10
push edx
push 0
push 0x401
push eax
call edi
mov ecx, dword [esi + 0x80]
push 0
push 0
push 0x402
push ecx
call edi
xor edi, edi
mov dword [ebp - 4], 2
mov dword [ebp - 0x14], edi
mov dword [ebp - 0x20], edi
cmp edi, ebx
jge 0x40556b
lea ecx, [ebp - 0xb0]
call fcn.00408b80
lea edx, [ebp - 0xb0]
push edi
push edx
mov ecx, 0x4623d0
mov byte [ebp - 4], 3
call fcn.00407670
lea eax, [ebp - 0x24]
lea ecx, [ebp - 0xb0]
push eax
call fcn.00409190
mov eax, dword [eax]
lea ecx, [ebp - 0x18]
push eax
mov byte [ebp - 4], 4
call fcn.0042264f
lea ecx, [ebp - 0x24]
mov byte [ebp - 4], 6
call fcn.00422625
xor edi, edi
mov dword [ebp - 0x28], edi
cmp edi, dword [ebp + 0x10]
jge 0x40540a
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp - 0x18]
mov ecx, edi
push eax
shl ecx, 6
add ecx, edi
lea ebx, [edx + ecx*8]
push ebx
call fcn.004122f4
add esp, 8
test eax, eax
jne 0x40543b
mov ecx, dword [ebp + 8]
add ebx, 0x104
push ecx
lea edx, [ebp - 0x2b8]
push ebx
push edx
call fcn.00412664
lea eax, [ebp - 0x2b8]
add esp, 0xc
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x28]
test ebx, ebx
jne 0x40543e
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00422625
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 2
call fcn.00408c20
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x2c]
inc edi
mov dword [ebp - 0x20], edi
jmp 0x40536c
inc edi
jmp 0x4053c4
push ebx
lea ecx, [ebp - 0x1c]
call fcn.0042264f
push 0x45df24
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 7
call fcn.00422930
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.0042296c
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
test al, 1
je 0x40547f
and al, 0xfe
push eax
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea ecx, [ebp - 0x18]
push ecx
lea ecx, [esi + 0xdc]
call fcn.004226ce
mov edi, dword [ebp - 0x20]
mov eax, dword [esi + 0x80]
push 0
lea edx, [edi + 1]
push edx
push 0x402
push eax
call dword [sym.imp.USER32.dll_SendMessageA]
push 0
mov ecx, esi
call fcn.0042555d
push 0xffff
push 0
push 0
push 0
push 0
push ebx
push edi
mov ecx, 0x4623d0
call fcn.004082e0
call fcn.0042a7bc
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x18]
push ebx
push ecx
mov eax, dword [eax + 0x168]
push eax
push 0x3c
call fcn.00404290
add esp, 0x10
lea edx, [ebp - 0x60]
push 1
push 0
push 0
push 0
push edx
call dword [sym.imp.USER32.dll_PeekMessageA]
test eax, eax
je 0x405513
lea eax, [ebp - 0x60]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea ecx, [ebp - 0x60]
push ecx
call dword [sym.imp.USER32.dll_DispatchMessageA]
lea ecx, [ebp - 0x1c]
mov byte [ebp - 4], 6
call fcn.00422625
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.00422625
lea ecx, [ebp - 0xb0]
mov byte [ebp - 4], 2
call fcn.00408c20
mov ebx, dword [ebp - 0x2c]
inc edi
mov dword [ebp - 0x20], edi
jmp 0x40536c
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
test ebx, ebx
je 0x4055b1
mov edi, dword [esi + 0xdc]
call fcn.0042a7bc
mov eax, dword [eax + 4]
push edi
mov edx, dword [eax + 0x16c]
push edx
push 0xa
call fcn.00404290
add esp, 0xc
call fcn.0042a7bc
mov eax, dword [eax + 4]
push 0
push 0x10
mov eax, dword [eax + 0xdc]
push eax
call fcn.004288b2
push 0x4623a8
lea ecx, [esi + 0xdc]
call fcn.0042271e
push 0
push 0x3f3
mov ecx, esi
call fcn.00425ea2
mov ecx, eax
call fcn.00426008
mov ecx, dword [ebp - 0xc]
mov eax, ebx
neg eax
sbb eax, eax
pop edi
and al, 0xfe
pop esi
inc eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 0xc